Nodejs

ALWAYS consult this skill before writing, editing, reviewing, or refactoring any Node.js code. It prevents the most common LLM-generated Node.js mistakes: bare 'fs'/'path' imports without the node: prefix, sync APIs (readFileSync) in async contexts, exec() shell injection, JSON.parse(JSON.stringify()) instead of structuredClone(), Math.random() instead of crypto.randomUUID(), missing graceful shutdown, and callback-style APIs when promise versions exist. Trigger on: any server-side JavaScript/TypeScript, CLI tools, scripts, Express/Fastify/Koa apps, anything importing fs/path/crypto/child_process/http/stream/worker_threads, package.json edits, require()-to-ESM refactors, or any mention of Node.js, npm, or server-side JS. Also trigger when you see code with require(), readFileSync, exec(), JSON.parse(JSON.stringify()), or Math.random() in a Node.js context — the skill tells you what to replace them with. Do NOT trigger for browser-only JS, React/Vue/Svelte components, Deno, or Bun-specific code.

crustacean-dev f06ebaa 8.9 KB Updated

File contents

crustacean-dev/stack-guardrails/tree/main/skills/nodejs commit f06ebaa947

Frequently asked questions

npx skillmds@latest add crustacean-dev/nodejs