Express patterns for 5.x routes and async errors, middleware order, body parsing, trust proxy, and security. Load before any edit in an Express app, however small, and for Express questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Express Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-express-patterns)
---
name: express-patterns
description: Express patterns for 5.x routes and async errors, middleware order, body parsing, trust proxy, and security. Load before any edit in an Express app, however small, and for Express questions.
---
# Express patterns
Default assumption: Express 5.3, per the Express releases on GitHub.
A row applies when the `express` version in the project's `package.json` and lockfile is at least its version. 5.x and 4.x are both supported, each in its latest release only, and 5.x needs Node 18 or later. JavaScript itself is javascript-patterns, and TypeScript is typescript-patterns.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| -------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing Express code, a route path, or raising the Express version | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing Express code or its middleware setup | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Writing middleware, an error handler, a router, a body parser, or sessions | [reference/practices.md](reference/practices.md) |
| Configuring or running ESLint on an Express app | [reference/tooling.md](reference/tooling.md) |