Skip to content
Back to skills

Write Reliable Nodejs Code

ASecurity

Write reliable Node.js avoiding event loop blocking, async pitfalls, ESM gotchas, and memory leaks.

  • 19 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentsgonodenodejstestingsecurityperformance

Security analysis

A100/100

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

Scanned September 19, 2026

npx -y skills add rondoflow/rondoflow --skill write-reliable-nodejs-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Write Reliable Nodejs Code?

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

Security grade badge for Write Reliable Nodejs Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rondoflow-write-reliable-nodejs-code/badge)](https://www.skillsdirectory.com/skills/rondoflow-write-reliable-nodejs-code)

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: write-reliable-nodejs-code
description: "Write reliable Node.js avoiding event loop blocking, async pitfalls, ESM gotchas, and memory leaks."
category: "Content & Writing"
author: community
version: "1.0.1"
icon: pencil
---

## Quick Reference

| Topic | File |
|-------|------|
| Callbacks, Promises, async/await, event loop | `async.md` |
| CommonJS vs ESM, require vs import | `modules.md` |
| Error handling, uncaught exceptions | `errors.md` |
| Readable, Writable, Transform, backpressure | `streams.md` |
| Memory leaks, event loop blocking, profiling | `performance.md` |
| Input validation, dependencies, env vars | `security.md` |
| Jest, Mocha, mocking, integration tests | `testing.md` |
| npm, package.json, lockfiles, publishing | `packages.md` |

## Critical Traps

- `fs.readFileSync` blocks entire server — use `fs.promises.readFile`
- Unhandled rejection crashes Node 15+ — always `.catch()` or try/catch
- `process.env` values are strings — `"3000"` not `3000`, parseInt needed
- `JSON.parse` throws on invalid — wrap in try/catch
- `require()` cached — same object, mutations visible everywhere
- Circular deps return incomplete export — restructure to avoid
- Event listeners accumulate — `removeListener` or `once()`
- `async` always returns Promise — even for plain return
- `pipeline()` over `.pipe()` — handles errors and cleanup
- No `__dirname` in ESM — use `fileURLToPath(import.meta.url)`
- `Buffer.from(string)` — encoding matters, default UTF-8

Files in this skill

  • SKILL.md1.5 KB
  • manifest.json320 B

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…