nodejs

A set of Node.js runtime standards for services, command-line tools, workers, and servers. Node.js is the program runtime used to execute JavaScript outside a web browser.

In plain words
What is it for?
Implementing or reviewing Node.js code, including event-loop behaviour, error handling, streams, process signals, buffers, dependency installation, and startup configuration.
Why use it?
It helps avoid failures involving unfinished asynchronous work, rejected promises, process shutdown, streams, memory, and environment loading.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ndisisnd/cook/nodejs
Any agent
npx skills add ndisisnd/cook --skill nodejs
Clone the repo
git clone --depth 1 https://github.com/ndisisnd/cook

Made for: Claude Code, Codex.

Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,816 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00065 $0.01816
Opus 5 $0.00032 $0.00908
Sonnet 5 $0.00013 $0.00363
Haiku 4.5 $0.00006 $0.00182

Measured yesterday against content hash 517690100fca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nodejs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

standards/nodejs/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Node.js Standards

Default load: this file only. Pull refs/runtime-safety.md, refs/async-errors.md, refs/tooling.md, or refs/testing.md only when the task explicitly needs that depth.

Node.js owns runtime failure modes only: event-loop behaviour, promise rejection lifecycle in the process, streams/backpressure, worker threads, process signals, Buffer memory safety, dependency install mechanics, and boot-time environment loading. TypeScript rules stay in standards/typescript/; API contracts, security policy, auth, performance strategy, architecture, CI shape, and database persistence stay in their global or database refs and should be linked rather than copied.

Priority: P0 — Runtime Safety

  • Every promise is awaited, returned, or has an explicit rejection handler; no floating promises. Node exits on unhandled rejections by default on maintained modern releases, and unobserved rejections still make failures nondeterministic. void is allowed only for a documented fire-and-forget call that attaches .catch() or routes through a helper that centralizes rejection logging. Signal: a call returning a Promise on a statement line with no await, return, .catch, or approved fire-and-forget helper.
  • Global unhandledRejection / uncaughtException handlers are last-resort logging plus graceful exit, never primary control flow, and never resume normal operation after uncaughtException. Catch errors where they occur. Signal: business logic such as retry, fallback, or response handling inside a process.on('uncaughtException') handler, or a handler that logs and keeps serving indefinitely.
  • Throws across callback, timer, and event boundaries are caught locally and converted to rejections or error events. Normal throws inside an async function become promise rejections; throws in later callbacks (setTimeout, EventEmitter, stream callbacks) escape the original .catch(). Signal: a throw inside a bare setTimeout, emitter.on, or stream callback with no try/catch or error propagation.
  • Handle SIGTERM and SIGINT for graceful shutdown: fail readiness or stop accepting connections, drain in-flight work up to a fixed deadline, close DB/Redis/pool resources, then exit before the orchestrator kills the process. Signal: a long-lived server with no signal handler, no shutdown timeout, or process.exit() called inside a request handler.
  • Never block the event loop on the request path. No synchronous CPU work such as large JSON.parse, crypto.pbkdf2Sync, compression, image transforms, and no sync fs such as readFileSync or existsSync in a hot handler; offload CPU work to worker_threads or a queue, and use async APIs for I/O. Signal: a *Sync call or tight CPU loop inside a request handler.
  • Respect stream backpressure. Prefer stream.pipeline() or stream/promises.pipeline() for multi-stream flows so errors and cleanup propagate; .pipe() is acceptable only when error and cleanup paths are handled. Honour write() returning false and wait for 'drain'. Signal: a.pipe(b) with no error handling, or .write() in a loop ignoring the return value.
  • Use Buffer.alloc for buffers that may be read before full overwrite; use Buffer.allocUnsafe only when every byte is overwritten before any read, response, log, persistence, crypto/compression input, or serialization. Unsafe buffers can leak prior heap contents. Signal: Buffer.allocUnsafe or allocUnsafeSlow flowing to an external sink without a complete overwrite first.

Read the full file on GitHub · 90 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 90 lines · 65 tokens per session scan A 517690100fca

Subscribe to this mod's changes

nodejs is a skill published in the GitHub repository ndisisnd/cook (2 stars, last pushed 21d ago), licensed MIT. It adds 65 tokens to every session and 1,816 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

moai-domain-frontend

Frontend development specialist covering React 19, Next.js 16, Vue 3.5, and modern UI/UX patterns with component architecture. Use when building web UIs, implementing components, optimizing frontend performance, or integrating state management.

modu-ai/moai-adk · 54 tokens

va-preview

Start a live preview so the user can see your work in their browser or phone. Use after starting a dev server or creating HTML files. Only available when the VibeAround MCP server is connected.

jazzenchen/VibeAround · 43 tokens

va-md-preview

Preview a markdown file with beautiful GitHub-style rendering. Use after creating or updating markdown documents like README, docs, or reports. Only available when the VibeAround MCP server is connected.

jazzenchen/VibeAround · 42 tokens

moai-domain-html-report

Markdown-to-single-file-HTML report renderer. Six modes (status, incident, plan, explainer, financial, pr) selected by report type, crossed with three audience tiers (expert, basic, learn) derived from the active output style. The basic and learn tiers enrich the HTML with mermaid flowcharts, worked examples, and…

modu-ai/moai-adk · 128 tokens

browserstack

Run tests on BrowserStack. Use when user mentions "browserstack", "cross-browser", "cloud testing", "browser matrix", "test on safari", "test on firefox", or "browser compatibility".

adriannoes/awesome-agentic-ai · 44 tokens

migrate

Migrate from Cypress or Selenium to Playwright. Use when user mentions "cypress", "selenium", "migrate tests", "convert tests", "switch to playwright", "move from cypress", or "replace selenium".

adriannoes/awesome-agentic-ai · 50 tokens