Index of every page on this site: llms.txt
All skills
wshobson avatar

/nodejs-backend-patterns

@4220308
by Seth Hobsonwshobson/agents43k stars
4,518
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/wshobson/agents/nodejs-backend-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈77 tokens for metadata: the name and description. ≈415 when used: this file. ≈6.1k more on demand in 2 files.

Description uses 3.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈310 characters, or 3.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

  1. Use TypeScript: Type safety prevents runtime errors
  2. Implement proper error handling: Use custom error classes
  3. Validate input: Use libraries like Zod or Joi
  4. Use environment variables: Never hardcode secrets
  5. Implement logging: Use structured logging (Pino, Winston)
  6. Add rate limiting: Prevent abuse
  7. Use HTTPS: Always in production
  8. Implement CORS properly: Don't use * in production
  9. Use dependency injection: Easier testing and maintenance
  10. Write tests: Unit, integration, and E2E tests
  11. Handle graceful shutdown: Clean up resources
  12. Use connection pooling: For databases
  13. Implement health checks: For monitoring
  14. Use compression: Reduce response size
  15. Monitor performance: Use APM tools

Testing Patterns

See javascript-testing-patterns skill for comprehensive testing guidance.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides secure and production-ready architectural patterns for Node.js backend development, following industry best practices for security and scalability.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    1 file scanned · No issues

  • ZeroLeaks7mo

    1 finding · Score: 82/100

Signed by skilld at 4220308. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 6 months ago
  • TypeScript
  • nodejs
  • express
  • fastify
  • rest-api
  • graphql
  • microservices
  • authentication
  • middleware
  • error-handling

README badge

README badge for wshobson/agents/nodejs-backend-patterns

Provides patterns and best practices for building production Node.js backends with Express or Fastify, covering middleware, error handling, authentication, database integration, and API design. Use when creating REST APIs, GraphQL servers, microservices, or real-time applications with WebSockets.

Generated from the current SKILL.md.

Does this skill cover both Express and Fastify?
Yes. The skill provides patterns for building Node.js backends with Express or Fastify, including middleware, error handling, and API design for both frameworks.
What databases does this skill support?
Both SQL and NoSQL databases. The skill covers database integration patterns without being tied to a specific database or ORM.
Does this include authentication and authorization patterns?
Yes. Implementing authentication and authorization is listed as a core pattern covered by the skill.
Should I use TypeScript with this skill?
The skill recommends TypeScript as a best practice for type safety, but it is not a hard requirement—patterns can be applied in JavaScript.
Does this cover testing patterns?
The skill references a separate `javascript-testing-patterns` skill for comprehensive testing guidance and defers to that for unit, integration, and E2E test patterns.

Generated from the current SKILL.md. These answers refresh after source changes.