Command Palette

Search for a command to run...

Назад к скиллам
скилл № 03134

NodeJS

Builds, debugs, and hardens Node.js servers, CLIs, and npm packages: async, modules, streams, memory, and process lifecycle. Use when writing or reviewing…

БесплатноБез исполняемых скриптов
clawicот clawic★ 23 звезды на GitHub

Установить NodeJS в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

User preferences and memory live in ~/Clawic/data/nodejs/ (see setup.md on first use, memory-template.md for the file format). If you have data at an old location (~/nodejs/ or ~/clawic/nodejs/), move it to ~/Clawic/data/nodejs/, and say in one line that you moved it and from where.

When To Use

  • Writing or reviewing Node services, CLIs, libraries, workers, or release scripts
  • Debugging a live process: hangs, crash loops, growing RSS, slow endpoints, import failures, unclean shutdown
  • Deciding the runtime shape of a package: ESM vs CJS, exports map, lockfile policy, native dependencies, publish surface
  • Production incidents: intermittent 502s behind a proxy, EMFILE, event loop stalls, containers OOMKilled overnight
  • Running TypeScript, tests, or child processes on Node — the runtime side, not the type system
  • Not for browser-only JavaScript, TypeScript type design, or the Bun/Deno runtimes (each has its own skill)

Quick Reference

Situation Play
One core pinned, every request slows at once Event loop blocked. Record node --cpu-prof, read widest self-time frames, not deepest stacks → performance.md
Process finishes its work but never exits An open handle: server, socket, setInterval, worker, or pool. process.getActiveResourcesInfo() names it → debug.md
RSS climbs while heapUsed stays flat Buffers/native memory, not a JS leak — heap snapshots will show nothing → performance.md
Intermittent 502/504 behind ALB or nginx keepAliveTimeout below the proxy's idle timeout (rule 5) → http.md
ERR_REQUIRE_ESM, ERR_MODULE_NOT_FOUND, __dirname is not defined Module-format mismatch or a missing file extension → modules.md
EADDRINUSE on restart Old process still holding the port, or two workers binding it; in tests, bind port 0 → debug.md
EMFILE / ENFILE Unbounded concurrency or leaked descriptors (rule 4) → filesystem.md
Exit 134 with FATAL ERROR: ... heap out of memory V8's heap ceiling, not the container's limit (rule 8) → performance.md
Memory grows during a copy, upload, or export Backpressure ignored: write() returned false and nobody waited → streams.md
npm install works, npm ci fails Lockfile out of sync with package.json (rule 6) → packages.md
Native module fails to build or load after an upgrade ABI mismatch, missing toolchain, or musl vs glibc → runtime.md
Child process hangs, or its output is truncated maxBuffer exceeded, or nobody drains the stdio pipe → concurrency.md
A .ts file won't run, or imports resolve at build but not at runtime Type-stripping limits or moduleResolution mismatch → typescript.md
CLI crashes with EPIPE when piped into head stdout closed early; handle the error instead of letting it throw → cli.md
Suite green locally, red in CI Port collisions, fake timers, shared module state, file ordering → testing.md
Untrusted input reaching exec, a path join, or a regex Injection, traversal, ReDoS — the exact checks → security.md
SIGTERM drops in-flight requests on deploy No drain sequence, or node is PID 1 with no signal handler → production.md
Anything else Reproduce with the smallest script that still fails, then re-add flags, env vars, and imports one at a time

Depth on demand: debug.md symptom→cause chains · commands.md diagnostic toolkit · async.md event loop and promises · modules.md ESM/CJS · errors.md failure handling and shutdown · streams.md backpressure · http.md servers, clients, timeouts · performance.md profiling and leaks · concurrency.md workers, cluster, child processes · filesystem.md files, paths, descriptors · security.md hardening · testing.md suites and mocks · packages.md npm, lockfiles, publishing · typescript.md running TS on Node · runtime.md versions, flags, native modules · production.md deploy, config, logging, observability · cli.md command-line tools.

Core Rules

  1. Budget sync work at ~10 ms per slice. Max throughput per process ≈ 1000 ms ÷ block_ms: a 50 ms sync JSON.parse in a request handler caps that process near 20 req/s, and every concurrent request inherits the stall. Repeatedly over budget → worker_threads; one-off → partition with setImmediate (→ async.md).
  2. Handle operational errors, crash on programmer errors (Joyent doctrine). ECONNRESET, ENOENT, bad user input → handle at the call site. TypeError, undefined property → let it crash; the supervisor restarts a clean process. Catch-all recovery keeps corrupted state serving traffic.
  3. "Async" fs, dns.lookup, crypto, and zlib share 4 libuv threads (default UV_THREADPOOL_SIZE; max 1024). The 5th concurrent fs.promises.readFile queues behind the first 4. Slow "async" crypto/fs under load → raise the pool to roughly the number of concurrent slow calls, or move the work off the process.
  4. Cap concurrency explicitly. `Promise.
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _meta.json
  • async.md
  • cli.md
  • commands.md
  • concurrency.md
  • debug.md
  • errors.md
  • filesystem.md
  • http.md
  • memory-template.md
  • modules.md
  • packages.md
  • performance.md
  • production.md
  • runtime.md
  • security.md
  • setup.md
  • streams.md
  • testing.md
  • typescript.md

FAQ

Что делает скилл NodeJS?

Builds, debugs, and hardens Node.js servers, CLIs, and npm packages: async, modules, streams, memory, and process lifecycle. Use when writing or reviewing code that runs on Node, when a process hangs or refuses to exit, leaks memory, gets OOM-killed, pins one CPU core at 100%, or dies on an unhandled rejection; when the error reads EADDRINUSE, EMFILE, ECONNRESET, ERR_MODULE_NOT_FOUND, ERR_REQUIRE_ESM, or "__dirname is not defined"; when import and require interop breaks, streams buffer everything in RAM, a server returns intermittent 502s behind a load balancer, or SIGTERM drops in-flight requests; when npm install, lockfiles, peer dependencies, workspaces, native module builds, or publishing misbehave; when a suite passes locally and fails in CI; or when containerizing, profiling, and shutting down a service cleanly. Not for browser-only JavaScript, TypeScript type-system design, or the Bun and Deno runtimes.

Как установить скилл NodeJS?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл NodeJS запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить NodeJS с