Build production-ready Node.js backend services
Node.js Backend Patterns

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,…
--- name: nodejs-backend-patterns description: 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. --- # Node.js Backend Patterns Comprehensive guidance for building scalable, maintainable, and production-ready Node.js backend applications with modern frameworks, architectural patterns, and best practices. ## When to Use This Skill - Building REST APIs or GraphQL servers - Creating microservices with Node.js - Implementing authentication and authorization - Designing scalable backend architectures - Setting up middleware and error handling - Integrating databases (SQL and NoSQL) - Building real-time applications with WebSockets
Overview
Comprehensive guidance for building scalable, maintainable, and production-ready Node.js backend applications with modern frameworks, architectural patterns, and best practices.
Manual install (npx, ZIP)
npx skills add wshobson/agents --skill nodejs-backend-patterns -g -a claude-codemkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \
| tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/javascript-typescript/skills/nodejs-backend-patternsNew-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/37ba782d7467da1b3c43/nodejs-backend-patterns.zip" -OutFile "$env:TEMP\nodejs-backend-patterns.zip"; Expand-Archive "$env:TEMP\nodejs-backend-patterns.zip" -DestinationPath "$HOME\.claude\skills" -ForceConnects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md1.9 KBreferences/2 files · 23.9 KB
Read the files here
Show the full text46 lines
Node.js Backend Patterns
Comprehensive guidance for building scalable, maintainable, and production-ready Node.js backend applications with modern frameworks, architectural patterns, and best practices.
When to Use This Skill
- Building REST APIs or GraphQL servers
- Creating microservices with Node.js
- Implementing authentication and authorization
- Designing scalable backend architectures
- Setting up middleware and error handling
- Integrating databases (SQL and NoSQL)
- Building real-time applications with WebSockets
- Implementing background job processing
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
- Use TypeScript: Type safety prevents runtime errors
- Implement proper error handling: Use custom error classes
- Validate input: Use libraries like Zod or Joi
- Use environment variables: Never hardcode secrets
- Implement logging: Use structured logging (Pino, Winston)
- Add rate limiting: Prevent abuse
- Use HTTPS: Always in production
- Implement CORS properly: Don't use
*in production - Use dependency injection: Easier testing and maintenance
- Write tests: Unit, integration, and E2E tests
- Handle graceful shutdown: Clean up resources
- Use connection pooling: For databases
- Implement health checks: For monitoring
- Use compression: Reduce response size
- Monitor performance: Use APM tools
Testing Patterns
See javascript-testing-patterns skill for comprehensive testing guidance.
| 1 | |
| 2 | name nodejs-backend-patterns |
| 3 | description 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 | |
| 5 | |
| 6 | # Node.js Backend Patterns |
| 7 | |
| 8 | Comprehensive 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 | |
| 23 | Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. |
| 24 | |
| 25 | ## Best Practices |
| 26 | |
| 27 | **Use TypeScript**: Type safety prevents runtime errors |
| 28 | **Implement proper error handling**: Use custom error classes |
| 29 | **Validate input**: Use libraries like Zod or Joi |
| 30 | **Use environment variables**: Never hardcode secrets |
| 31 | **Implement logging**: Use structured logging (Pino, Winston) |
| 32 | **Add rate limiting**: Prevent abuse |
| 33 | **Use HTTPS**: Always in production |
| 34 | **Implement CORS properly**: Don't use `*` in production |
| 35 | **Use dependency injection**: Easier testing and maintenance |
| 36 | **Write tests**: Unit, integration, and E2E tests |
| 37 | **Handle graceful shutdown**: Clean up resources |
| 38 | **Use connection pooling**: For databases |
| 39 | **Implement health checks**: For monitoring |
| 40 | **Use compression**: Reduce response size |
| 41 | **Monitor performance**: Use APM tools |
| 42 | |
| 43 | ## Testing Patterns |
| 44 | |
| 45 | See `javascript-testing-patterns` skill for comprehensive testing guidance. |
| 46 |
Details
- Updated
- Sep 21, 2026
- License
- MIT
- Stars on the repo
- ★ 39,857
- Checked
- Source
- wshobson/agents ↗
- Creator
- wshobson · 179 listings
Similar skills
See all →
SkillGuides stable API and interface design
MCPPulls up-to-date, version-specific library docsContext7
SkillFetch up-to-date documentation and code examples for anyContext7 Documentation Lookup
SkillHow to use the Adaptyv Bio Foundry API and Python SDK
SkillMaster C/.NET backend development patterns for building
SkillGuides the usage of Gemini Interactions API on GeminiGemini Interactions API SkillMore from wshobson
SkillMaster C/.NET backend development patterns for building
SkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliance
SkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Design
SkillMigrate from AngularJS to Angular using hybrid modeAngular migration
SkillUnderstand anti-reversing, obfuscationAnti reversing techniques
SkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patterns