backend-controllers
Installation
SKILL.md
Backend Controllers & Handlers
Use this skill when
- Designing route handlers and controllers
- Mapping HTTP requests to application commands/queries
- Keeping the HTTP layer isolated from business logic
Do not use this skill when
- Designing the full API surface (use api-contracts)
- Writing business logic
Instructions
- Controllers parse, validate, and map; they do not contain business logic.
- Bind URL params, query, and body explicitly.
- Translate domain results to HTTP status codes consistently.
- Return a uniform response shape for success and error.
- Keep validation at the boundary, not scattered in methods.
- Do not leak exceptions: convert to the error contract.
- Document each endpoint’s status codes and examples.