Skills · Coding

Node.js Backend Patterns

Unverified30/40

Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add nodejs-backend-patterns

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

The whole source

No sign-in, no blur, nothing truncated
nodejs-backend-patterns/SKILL.md46 lines1.9 KBRawView on GitHub
Frontmatter — 2 properties
namenodejs-backend-patterns
descriptionBuild production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
1---
2name: nodejs-backend-patterns
3description: Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Node.js Backend Patterns
7 
8Comprehensive guidance for building scalable, maintainable, and production-ready Node.js backend applications with modern frameworks, architectural patterns, and best practices.
9 
10## When to Use This Skill
11 
12- Building REST APIs or GraphQL servers
13- Creating microservices with Node.js
14- Implementing authentication and authorization
15- Designing scalable backend architectures
16- Setting up middleware and error handling
17- Integrating databases (SQL and NoSQL)
18- Building real-time applications with WebSockets
19- Implementing background job processing
20 
21## Detailed patterns and worked examples
22 
23Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
24 
25## Best Practices
26 
271. **Use TypeScript**: Type safety prevents runtime errors
282. **Implement proper error handling**: Use custom error classes
293. **Validate input**: Use libraries like Zod or Joi
304. **Use environment variables**: Never hardcode secrets
315. **Implement logging**: Use structured logging (Pino, Winston)
326. **Add rate limiting**: Prevent abuse
337. **Use HTTPS**: Always in production
348. **Implement CORS properly**: Don't use `*` in production
359. **Use dependency injection**: Easier testing and maintenance
3610. **Write tests**: Unit, integration, and E2E tests
3711. **Handle graceful shutdown**: Clean up resources
3812. **Use connection pooling**: For databases
3913. **Implement health checks**: For monitoring
4014. **Use compression**: Reduce response size
4115. **Monitor performance**: Use APM tools
42 
43## Testing Patterns
44 
45See `javascript-testing-patterns` skill for comprehensive testing guidance.
46 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Coding