# Nodejs

> Node.js backend patterns and best practices. Server setup, async I/O, process management, environment configuration. Trigger: When building backend services, CLI tools, or server-side scripts with Node.js.

- Skill: `majiayu000/nodejs-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/nodejs-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/nodejs-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/nodejs-2

---


# Node.js Skill

## When to Use

- Building backend services or APIs
- Writing CLI tools or scripts
- Managing async I/O and processes

## Critical Patterns

- Use async/await for I/O
- Environment variable management
- Graceful shutdown and error handling

## Decision Tree

- HTTP server? → Use built-in http or framework
- CLI tool? → Use process.argv and commander/yargs
- Long-running process? → Use process signals

## Edge Cases

- Unhandled promise rejections
- Memory leaks in long-running apps
- Child process management

