Catalogue / backend-nodejs
backend-nodejs
MITSignedNode.js backend patterns — Fastify/Express, database access, async patterns, security hardening--- name: backend-nodejs description: Node.js backend patterns — Fastify/Express, database access, async patterns, security hardening allowed-tools: Read, Grep, Glob, Bash ---
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
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 1.3 kB | 86d08aa0ae11 |
| SKILVAULT_SOURCE.json | 1.8 kB | c681cc95f53a |
| THIRD_PARTY_NOTICES.md | 2.1 kB | c2e125b5f806 |
| assets/tsconfig-recommended.json | 846 B | a0e5abe7c275 |
| references/async-patterns.md | 4.6 kB | 4f75c89ebf0a |
| references/database-access.md | 3.5 kB | d1f00fb55613 |
| references/express-fastify.md | 3.9 kB | 8bdfcc16d451 |
| references/security.md | 4.5 kB | a687b64c9768 |
| scripts/detect-node-stack.sh | 2.5 kB | ea0551c42ee8 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | c5b74102c7fd | 29 Nov 2026 |
Locking a skill to one version needs Pro.