AiSkillz

Early "As-Is" Access - free for the first 20 accounts. 18 of 20 places left: complete registration to claim one. No credit card needed.

← Back to skills
Backend & APIsVia MCPAny / model-agnosticLicense: My own work (all rights reserved)

Express.js API Patterns

Created by CodeCraft LLC

Structure and review Express.js REST APIs for production

Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.

by Jace (@jamick)v1.4.2 · updated 2026-12-01Report copyright infringement

Description

Structure and review Express.js REST APIs for production - feature-based routers, an app factory separate from listen() for testing, middleware order (helmet, body limits, trust proxy, rate limits, routes, 404, error handler), Zod validation middleware, a custom AppError and four-argument error middleware, async errors on Express 5 vs Express 4, thin controllers over services, JWT authentication with role guards and Request type augmentation, per-route and per-key rate limiting, and one consistent JSON response shape. Use whenever the project depends on express, the user builds or refactors an Express API, adds routes, validation, auth or rate limiting, sees unhandled promise rejections or hanging requests, errors return HTML stack traces, or asks how to organize Express code.

#backend#express#api#patterns

Included with all-access

$9.00 one-time, permanent access

Get all-access · $12.00/mo, billed yearly

or

Buy 2 or more together for up to 40% off · View cart

You get a licence, not ownership. Access lasts while this skill is available on AiSkillz; if it's removed within 90 days of purchase, we'll send you a copy to keep. Terms

Official and free skills are included with the all-access subscription

Changelog

Subscribers also see which files changed in each version.

v1.4.2Dec 1, 2026Latest

Added

  • README: a **Sources** line listing the official pages the skill is written from, each link checked, so the source-overlap check can run against them.
v1.4.1Nov 29, 2026

Changed

  • Added a contents list to reference files over 100 lines (validation-and-errors.md, structure-and-routing.md, auth-and-rate-limits.md), so a partial read still shows every section.
v1.4.0Nov 26, 2026

Changed

  • Checked against the Express support, migration and error-handling guides and the express-rate-limit and helmet changelogs (November 2026).
  • Error handler now delegates when res.headersSent and maps body-parser 4xx errors (malformed JSON, too large) instead of returning 500.
  • Rate limiting moved to express-rate-limit 8: limit instead of max, ipKeyGenerator for IP fallbacks (IPv6 /56 grouping), API-key limiter keyed on the verified key ID.
  • JWT middleware pins issuer and audience and validates claims with Zod instead of casting.
  • Validation middleware typed with z.ZodType (works on Zod 3 and 4).
  • Deep-dive section made on-demand with open/skip triggers.

Added

  • Patch-level rule (Express 5.3.0 and express-rate-limit 8.7.5 security fixes) and the Express 4 → 5 breaking changes.
  • CORS allow-list rule, graceful shutdown and keep-alive timeouts in the server entry, Express 5 listen error callback.
  • Pitfalls and checklist items for the above.
v1.3.0Nov 20, 2026

Added

  • Review method: every code review starts by mapping the code flows in scope and gives each flow its own sub-agent at high effort, which reviews that flow end to end against this checklist; the main agent merges, re-checks Blockers and de-duplicates. Covers single-flow reviews, nested sub-agents, failed sub-agents and environments without sub-agents.
v1.2.0Nov 6, 2026

Changed

  • Review report rule: reviews that cover changes (a diff, PR or uncommitted work) open with a short "What the changes do" section - factual bullets grouped by purpose, inferred intent marked, deploy or migration impact stated.
v1.1.0Nov 4, 2026

Changed

  • Review report rule at the top of the skill, loaded before any review: one entry per finding as Level · type · file:line · finding · proposed fix, outside facts sourced or marked unverified, and no narrative.
v1.0.0Oct 16, 2026

Added

  • First release.