Backend Node.js Skill
Core Principles
- Create connections once: DB/Redis pools are singletons — never instantiate per request.
- Validate at boundaries: All external input validated with Zod/TypeBox before business logic.
- Catch async errors: Unhandled promise rejections crash Node.js — always handle.
- Fail fast on bad config: Validate all env vars at startup with Zod — exit(1) if invalid.
- Graceful shutdown: SIGTERM handler closes connections, drains in-flight requests.
References
references/express-fastify.md— Fastify with TypeBox, Express with Zod, middleware, error handlingreferences/database-access.md— Drizzle, Prisma, Knex, connection pooling, transactionsreferences/async-patterns.md— Promise.all, BullMQ queues, worker threads, streams, backpressurereferences/security.md— Input validation, rate limiting, CORS, helmet, dependency audit
Scripts
scripts/detect-node-stack.sh— Reads package.json to identify framework, ORM, test runner
Assets
assets/tsconfig-recommended.json— Strict TypeScript configuration for Node.js
Source: rnavarych/alpha-engineer — distributed by TomeVault.