name: express-api-change description: Implement or review Express API route, middleware, service, and repository changes. Use when the user asks to add endpoints, change API behavior, validate requests, fix Express bugs, or update Node API tests. license: MIT compatibility: Codex, Claude Code, OpenCode, Pi.dev, Copilot, Cursor metadata: version: "1.0.0"
Express API Change
Steps
- Read
src/app.ts, the relevant route module, and the matching service/repository files. - Update request validation at the route boundary.
- Keep business logic in services and persistence in repositories.
- Add or update Jest tests for success and error paths.
- Run the smallest relevant test command, then lint if code style changed.
Example
Input: "Add a POST /orders endpoint."
Output: Route, validation, service method, repository call, and focused tests.