nodejs
Skill15 starsChanged 42 days agoMITView on GitHub
Expert Node.js assistance covering asynchronous event loop, streams, worker threads, buffer manipulation, and ESM. Use when building scalable backend services, CLI utilities, or network servers.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Nov 1, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- weiweimhy/agent-skillstheir own version, first seen Jul 1, 2026
- kimtth/agent-skill-100-lines-or-lesstheir own version, first seen Jun 26, 2026
- TheDecipherist/claude-code-mastery-project-starter-kittheir own version, first seen Jun 26, 2026
- crustacean-dev/stack-guardrailstheir own version, first seen Mar 24, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- kimtth/agent-skill-100-lines-or-less★ 2same name
- rogue-dev-studio/ai-agents-rogue★ 2same name
- conjure-3301/skills★ 0same name
- crustacean-dev/stack-guardrails★ 0same name
- weiweimhy/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 110
Use stream.pipeline for automatic backpressure management:
- Very specific: line 132
Use the node: protocol prefix (import fs from 'node:fs') for all built-in modules.
- Very specific: line 133
Use node:stream/promises and pipeline to handle stream backpressure and error propagation.
- Very specific: line 139
Use CommonJS (require()) in greenfield applications.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Node.js
Node.js is a cross-platform asynchronous event-driven JavaScript runtime, featuring a built-in Test Runner, native WebSocket client, and modern ESM module execution.
When to Use
- Scalable Asynchronous Microservices: Building event-driven I/O-intensive web APIs on Node.js 22 LTS.
- Real-Time Data Streaming & WebSockets: Processing streaming data using native
node:streamandTransformstreams. - CLI Development & Build Tooling: Building developer tools, linters, and deployment automations with npm.
- Worker Threads & CPU-Bound Offloading: Offloading cryptographic hashing, compression, and image manipulation.
Quick Start
// Native Test Runner (No Jest needed)
import { test, assert } from "node:test";
test("synchronous passing test", (t) => {
assert.strictEqual(1, 1);
});
// Native WebSocket
const ws = new WebSocket("ws://example.com/socket");
ws.onopen = () => console.log("Connected");Core Concepts
Modern Native HTTP Server & Fetch
Zero-dependency HTTP server utilizing Node.js modern standard APIs:
import { createServer } from "node:http";
const server = createServer(async (req, res) => {
const url = new URL(req.url, `http://${req.headers.host}`);
if (url.pathname === "/api/health" && req.method === "GET") {
res.writeHead(200, { "Content-Type": "application/json" });
res.end(JSON.stringify({ status: "ok", nodeVersion: process.version }));
return;
}
res.writeHead(404, { "Content-Type": "application/json" });
res.end(JSON.stringify({ error: "Route not found" }));
});
server.listen(3000, () => {
console.log("Node.js server listening on http://localhost:3000");
});Stream Pipelines with node:stream/promises
Safe, backpressure-managed file and network streaming:
import { createReadStream, createWriteStream } from "node:fs";
import { pipeline } from "node:stream/promises";
import { createGzip } from "node:zlib";
async function compressFile(sourcePath, destPath) {
try {
await pipeline(
createReadStream(sourcePath),
createGzip(),
createWriteStream(destPath),
);
console.log(`Successfully compressed ${sourcePath} -> ${destPath}`);
} catch (err) {
console.error("Pipeline compression failed:", err);
}
}Native Test Runner with node:test
Fast, zero-dependency testing built directly into the runtime:
import test, { describe, it } from "node:test";
import assert from "node:assert/strict";
describe("User Authentication", () => {
it("validates password minimum length", () => {
const password = "supersecretpass";
assert.ok(password.length >= 8, "Password must be >= 8 chars");
});
it("verifies async promise resolution", async () => {
const token = await Promise.resolve("jwt-token-xyz");
assert.equal(token, "jwt-token-xyz");
});
});Common Patterns
High-Throughput Stream Pipeline with Backpressure
Problem: Reading large files directly into memory with fs.readFile causes OOM crashes under load.
Solution:
Use stream.pipeline for automatic backpressure management:
import { pipeline } from "node:stream/promises";
import fs from "node:fs";
import zlib from "node:zlib";
async function compressLogFile(inputPath, outputPath) {
await pipeline(
fs.createReadStream(inputPath),
zlib.createGzip(),
fs.createWriteStream(outputPath),
);
console.log("Compression pipeline completed successfully.");
}Best Practices
Do:
- Target Node.js 22 LTS or newer with native fetch, web streams, and native test runner.
- Use the
node:protocol prefix (import fs from 'node:fs') for all built-in modules. - Use
node:stream/promisesandpipelineto handle stream backpressure and error propagation. - Handle uncaught exceptions (
process.on('uncaughtException')) and trigger graceful shutdown.
Don't:
- Block the single-threaded Event Loop with heavy synchronous calls (
fs.readFileSync, long regex). - Use CommonJS (
require()) in greenfield applications; adopt ECMAScript Modules ("type": "module"). - Ignore unhandled promise rejections; configure
--unhandled-rejections=strict.
Troubleshooting
| Error | Cause | Solution |
ERR_REQUIRE_ESM: Must use import to load ES Module | Using require() on a modern ESM-only package. | Use import or dynamic await import('...') in CommonJS. |
MaxListenersExceededWarning: Possible EventEmitter memory leak | Adding event listeners in loop without removing them. | Remove listeners with emitter.off() or increase limit using emitter.setMaxListeners(n). |
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed | Node.js process exceeded default 1.4GB memory limit. | Start with expanded heap: node --max-old-space-size=4096 app.js. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

