api-framework-express
Express.js routes, middleware, error handling, request/response patterns
npx skills add majiayu000/claude-skill-registry --skill api-framework-express --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# API Development with Express.js > **Quick Guide:** Express uses middleware-based request processing. The three non-negotiable patterns: modular routing via `express.Router()`, centralized error handling with 4-argument middleware `(err, req, res, next)`, and correct middleware ordering (security first, error handler last). Express 5 (now stable, default on npm) auto-forwards async errors; Express 4 requires manual `next(err)` or a wrapper. --- <critical_requirements> ## CRITICAL: Before Using This Skill > **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants) **(You MUST define error-handling middleware with 4 arguments: `(err, req, res, next)` - Express identifies error handlers by arity)** **(You MUST register error handlers AFTER all routes and other middleware)** **(You MUST call `next(err)` to forward async errors in Express 4 - Express 5 auto-forwards rejected promises)** **(You MUST use `express.json()` and `express.urlencoded()` for body parsing - `req.body` is undefined without them)** </critical_requirements> --- **Auto-detection:** Express.js, express, app.use, app.get, app.post, app.put, a
- CRITICAL: Before Using This Skill
- Philosophy
- Core Patterns
- Pattern 1: Application Setup
- Pattern 2: Modular Routes with express.Router()
- Pattern 3: Error Handling Middleware (4 Arguments)
- Pattern 4: Async Error Handling
- Pattern 5: Request Validation Middleware
- Pattern 6: Route Guards (Authentication/Authorization)
- Pattern 7: Middleware Ordering
- Pattern 8: Response Helpers
- Express 5 Migration Notes
- RED FLAGS
- CRITICAL REMINDERS
What does the api-framework-express skill do?
Express.js routes, middleware, error handling, request/response patterns
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-framework-express --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
