litestar-routing
Installation
SKILL.md
Litestar Routing
Use this skill for route handlers, Controllers, Routers, domain clustering, and endpoint module layout.
Code Style Rules
- Cluster Controllers by domain, not HTTP method.
- Keep handlers thin: parse request data, call a service, return a DTO or response object.
- Put shared path, dependencies, guards, and tags on the Controller class.
- Use
FromPath[T],FromQuery[T],FromHeader[T], andFromCookie[T]for unconstrained request parameters. - Use
Annotated[T, PathParameter(...)],QueryParameter(...),HeaderParameter(...), orCookieParameter(...)when the parameter needs constraints, metadata, or a wire name. Do not use implicit parameters or the deprecatedfield: T = Parameter(...)form. - Use typed path parameters and explicit return annotations.