smithery.ai

express

Express.js server best practices including middleware, error handling, and security.

First seen Mar 15, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,160 B
  • docs SUMMARY.md 99 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Express.js Best Practices

Project Structure

  • src/routes/ for route handlers
  • src/middleware/ for middleware
  • src/controllers/ for business logic
  • src/models/ for data models
  • src/utils/ for utilities

Middleware

  • Use helmet for security headers
  • Use cors for CORS handling
  • Use morgan for logging
  • Use compression for gzip
  • Use express.json() for body parsing
  • Order middleware correctly

Error Handling

  • Use async error wrapper or express-async-errors
  • Centralized error handler middleware
  • Send appropriate status codes
  • Log errors with context
  • Never expose stack traces in production

Security

  • Validate all inputs with Joi/Zod
  • Sanitize user data
  • Use rate limiting
  • Implement CSRF protection
  • Use secure session config

Performance

  • Use caching (Redis)
  • Implement pagination
  • Use streaming for large responses
  • Enable gzip compression
  • Use connection pooling for databases