/harness-claude:node-streams-patternfrom harness-claude
Provides patterns for using Node.js stream APIs (Readable, Writable, Transform) with pipeline for error-safe, backpressure-aware data processing.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:node-streams-pattern still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Process large data efficiently using Node.js Readable, Writable, and Transform streams
import { createReadStream } from 'node:fs';
import { pipeline } from 'node:stream/promises';
const readable = createReadStream('large-file.csv', { encoding: 'utf-8' });
for await (const chunk of readable) {
processChunk(chunk);
}
import { createReadStream, createWriteStream } from 'node:fs';
import { createGzip } from 'node:zlib';
import { pipeline } from 'node:stream/promises';
await pipeline(createReadStream('input.json'), createGzip(), createWriteStream('output.json.gz'));
import { Transform } from 'node:stream';
const uppercase = new Transform({
transform(chunk, encoding, callback) {
this.push(chunk.toString().toUpperCase());
callback();
},
});
await pipeline(createReadStream('input.txt'), uppercase, createWriteStream('output.txt'));
import { Transform } from 'node:stream';
const filterActive = new Transform({
objectMode: true,
transform(user, encoding, callback) {
if (user.isActive) this.push(user);
callback();
},
});
import { Readable } from 'node:stream';
async function* generateRecords() {
for (let i = 0; i < 1_000_000; i++) {
yield { id: i, value: Math.random() };
}
}
const readable = Readable.from(generateRecords());
import { createReadStream } from 'node:fs';
app.get('/download', (req, res) => {
res.setHeader('Content-Type', 'application/octet-stream');
const stream = createReadStream('large-file.zip');
stream.pipe(res);
stream.on('error', (err) => {
res.status(500).end('Error reading file');
});
});
import { createReadStream } from 'node:fs';
import { createInterface } from 'node:readline';
const rl = createInterface({
input: createReadStream('data.csv'),
crlfDelay: Infinity,
});
for await (const line of rl) {
const [name, email] = line.split(',');
await processUser({ name, email });
}
pipeline instead of .pipe() — pipeline handles error propagation and cleanup:// Bad: errors not propagated, streams not cleaned up
readable.pipe(transform).pipe(writable);
// Good: errors propagated, streams destroyed on error
await pipeline(readable, transform, writable);
Streams process data in chunks without loading the entire dataset into memory. A 10GB file can be processed with a 64KB buffer.
Stream types:
Backpressure: When a writable stream cannot consume data as fast as the readable produces it, Node.js automatically pauses the readable stream. This prevents memory exhaustion. pipeline handles backpressure correctly; manual .pipe() does not always.
highWaterMark: Controls the internal buffer size (default 16KB for byte streams, 16 objects for object mode). Lower values reduce memory but increase I/O operations.
Trade-offs:
readFilepipeline handles errors and cleanup — but requires all streams to implement destroy correctlyhttps://nodejs.org/api/stream.html
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job