Skip to content
Back to skills

Nodejs

ASecurity

Node.js runtime — event loop and blocking, async patterns and error handling, streams and backpressure, worker threads, memory and GC, graceful shutdown, config and env handling, security (prototype pollution, ReDoS), diagnostics. Use for Node.js services and scripts (Node.js, event loop, streams, async, graceful shutdown).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgonodenodejssecurity

Works with

  • cursor

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill nodejs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nodejs?

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

Security grade badge for Nodejs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-nodejs/badge)](https://www.skillsdirectory.com/skills/vectora-os-nodejs)

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
description: Node.js runtime — event loop and blocking, async patterns and error handling, streams and backpressure, worker threads, memory and GC, graceful shutdown, config and env handling, security (prototype pollution, ReDoS), diagnostics. Use for Node.js services and scripts (Node.js, event loop, streams, async, graceful shutdown).
metadata:
  category: languages-frameworks
---

# Node.js

## Purpose

Write Node.js code that keeps the event loop free and fails predictably.

**Use when:** any Node.js server or script.

**Not for:** browser code.

## Inputs

- Code, runtime metrics.

## Outputs

- Code and review findings for runtime behaviour.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "node.js"` for prior decisions, patterns and anti-patterns.

## Steps

1. **Event loop.** Keep CPU work off the loop (workers, chunking); watch event loop delay.
   Done when no sync heavy work on hot paths.
2. **Errors.** Await every promise; handle rejections; no floating promises.
   Done when lint rule enforces.
3. **Streams.** Use `pipeline` with backpressure for large data.
   Done when memory is bounded.
4. **Lifecycle.** Graceful shutdown: stop accepting, drain, close pools with timeout.
   Done when SIGTERM handled.

## Best practices

- Use `AbortSignal` for cancellation and timeouts.
- Validate env at startup.

## Common mistakes

- `JSON.parse` of huge payloads on the loop.
- Unbounded `Promise.all` fan-out.

## Example

CSV export via `pipeline(dbCursor, transform, res)` with backpressure; memory flat at 80 MB for 2M rows.

## Reusable prompt

```text
Apply the Node.js skill (.agents/skills/nodejs/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Review the Node.js code for event-loop blocking, promise handling, backpressure and graceful shutdown.
Return: Code and review findings for runtime behaviour..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.