Skip to content
Back to skills

Nodejs Runtime Professional Usage

ASecurity

Use when Node.js event-loop, stream, Buffer, process, Worker, async-context, cancellation, or handle semantics change. Skip TypeScript, browser, build, and business rules.

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
developmenttypescriptnodenodejsapibackend

Works with

  • terminal
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add machenjie/rd-skills --skill nodejs-runtime-professional-usage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nodejs Runtime Professional Usage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nodejs Runtime Professional Usage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/machenjie-nodejs-runtime-professional-usage/badge)](https://www.skillsdirectory.com/skills/machenjie-nodejs-runtime-professional-usage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nodejs-runtime-professional-usage
description: "Use when Node.js event-loop, stream, Buffer, process, Worker, async-context, cancellation, or handle semantics change. Skip TypeScript, browser, build, and business rules."
---

# nodejs-runtime-professional-usage

## Registry Trigger

**Use when**

- Node.js behavior depends on scheduling, cancellation, streams, buffers, processes, workers, async context, modules, cache identity, or active resources.
- Runtime versions, flags, entrypoints, or lifecycle behavior can change the outcome.

**Do not use when**

- Route TypeScript design to `typescript-professional-usage`, browser APIs to `web-platform-professional-usage`, package/build policy to build guidance, and business rules to the backend owner.

## Skill Role

Own Node.js runtime and core-library semantics. Exclude product, build, package-policy, browser, and typing decisions.

## High-Value Rules

- Define the supported Node.js release, flags, entrypoint, module mode, and host constraints.
- Bound synchronous callbacks, promise continuations, and `process.nextTick()` chains. Use bounded Workers for evidenced CPU or unavoidable synchronous blocking work when offload protects the caller budget.
- Use one cancellation owner with supported `AbortSignal` propagation and reconciliation of abort, timeout, cleanup, and late completion.
- Enforce stream backpressure, byte/object modes, completion, and destroy/error paths.
- Define Buffer encoding, byte length, initialized allocation, copy/view choice, alias lifetime, and conversion.
- Define signals, exit codes, children, IPC, Workers, shutdown, and the terminal uncaught-exception boundary.
- Isolate `AsyncLocalStorage` context and resolve ESM/CommonJS, exports, side effects, cycles, and cache identity for supported consumers.
- Require every owned runtime resource to close, destroy, or terminate, or explicitly transfer liveness ownership to a named owner with bounded lifetime, shutdown, and reacquisition behavior; `unref()` alone is not cleanup.

## Anti-Patterns

- Next-tick or microtask recursion starves timers and I/O.
- Ignored backpressure grows memory or loses trailing output.
- A Buffer view outlives mutable or pooled backing memory.
- Exit or signal handling abandons cleanup and child resources.
- Module or cache mismatch breaks consumers or duplicates singleton state.
- Active handles keep the process alive after teardown, or unreferenced work outlives its declared owner.

## Execution Checklist

- Exercise the supported Node.js version, flags, metadata, and entrypoint.
- Probe starvation, cancellation, slow consumers, stream failure, Buffer boundaries, termination, Worker failure, module consumers, and post-teardown resources.
- Scope diagnostics and tests to the exercised workload and platform.

## Stop Conditions

- Stop on unknown runtime, module mode, lifecycle owner, cancellation path, binary contract, resource owner, or unproved liveness transfer.
- Stop loss, corruption, orphaning, leaks, or entrypoint changes without invalid and boundary evidence.
- Route non-Node.js decisions to their named owners.

## Output Contract

- Node.js runtime decision with scheduling and cancellation; stream, binary, process, and Worker behavior; context, module cache, and resource ownership; verification, proof limits, and residual risk

## Targeted References

| Path | Type | Load when | Do not load when | Required by | Required output |
|---|---|---|---|---|---|
| [event loop and cancellation contracts](references/event-loop-and-cancellation-contracts.md) | targeted | Event-loop phase blocking microtask timer cancellation Worker or async-context behavior is unresolved | Scheduling cancellation and context behavior remain unchanged and focused evidence already settles them | analysis-agent, task-agent, review-agent | decision-record, failure-decision, proof-limit |
| [streams and backpressure contracts](references/streams-and-backpressure-contracts.md) | targeted | Stream flow completion backpressure Buffer encoding aliasing or binary ownership changes | No stream or binary boundary changes | analysis-agent, task-agent, review-agent | boundary-decision, validation-plan, residual-risk |
| [process modules and resources contracts](references/process-modules-and-resources-contracts.md) | targeted | Process signal child Worker module export cache or active-resource lifecycle changes | Process module and resource ownership remain unchanged | analysis-agent, task-agent, review-agent | boundary-decision, decision-record, proof-limit |

Files in this skill

  • SKILL.md4.4 KB
  • references/event-loop-and-cancellation-contracts.md3.2 KB
  • references/process-modules-and-resources-contracts.md3.8 KB
  • references/streams-and-backpressure-contracts.md2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…