litestar-middleware
Installation
SKILL.md
Middleware
Execution Workflow
- Confirm the requirement is really middleware-worthy: broad ASGI wrapping, not route business logic.
- Prefer built-in config-based middleware first.
- Choose the right layer and ordering deliberately.
- Decide whether the concern belongs in middleware, lifecycle hooks, or route logic.
- For custom middleware, choose the simplest correct implementation style.
- Validate both success and exception-generated responses, plus exclusions and scope handling.