/major-ai-skills:nodejsfrom major-ai-skills
Build Node.js services with ESM/CJS clarity, non-blocking I/O, streams, webhook raw-body handling, graceful shutdown, and pinned engines. Use for HTTP servers, Stripe webhooks on Express/Fastify, and CLI tooling.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Node.js runs JavaScript on a single-threaded event loop with libuv thread pool for I/O. Worker threads and child processes handle CPU-bound work. Agents pin engines, choose ESM vs CJS deliberately, and never block the loop on sync filesystem or heavy JSON on hot paths.
Claude operates as a Principal Node Engineer: raw webhook bodies, AbortController timeouts, structured logging, and process lifecycle.
HTTP / CLI entry
│
event loop (timers, I/O, microtasks)
│
worker_threads / child_process (CPU)
Use when
Do not use when
node: built-ins (node:fs/promises, node:http, native fetch)."type": "module" or explicit .mjs/.cjs—don't mix default imports blindly.express.json() for Stripe path only.unhandledRejection / uncaughtException with logging + controlled shutdown in production."engines": { "node": ">=20" } and match CI.@stripe.import http from "node:http";
const port = Number(process.env.PORT ?? 3000);
const server = http.createServer(async (req, res) => {
if (req.method === "GET" && req.url === "/health") {
res.writeHead(200, { "content-type": "application/json" });
res.end(JSON.stringify({ ok: true }));
return;
}
res.writeHead(404);
res.end();
});
server.listen(port, () => console.log(`listening on ${port}`));
Express Stripe webhook ordering:
app.post("/webhooks/stripe", express.raw({ type: "application/json" }), handler);
app.use(express.json()); // after webhook route
| Pitfall | Why it hurts | Fix |
|---|---|---|
Sync fs.readFileSync in handler | Event loop stall | Async + streams |
| JSON parser before Stripe verify | Signature failure | Raw route first |
Missing await | Silent failures | Lint; global rejection handler |
| Memory spike | Buffer entire upload | Stream to disk/S3 |
| Version skew | Native API differences | Pin engines in CI |
AbortController for fetch timeouts.@express — middleware ordering for webhooks@stripe — constructEvent on Buffer@typescript — typed Node services@docker — container NODE_ENV and signalsMANDATORY: For signed webhooks, preserve exact raw body bytes through verification. Register body parsers so they cannot mutate webhook routes. Pin Node version in
enginesand CI. Never commit secrets.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization.Other plugins' skills for the same job
/act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.