litestar-routing
Installation
SKILL.md
Routing
Use this skill when API path design, handler registration, route composition, and parameter behavior are core to the task.
Execution Workflow
- Define endpoint contracts with semantic handler decorators and strict type annotations.
- Choose composition model:
- Register simple handlers directly on app.
- Use routers for path grouping and nested route trees.
- Use controllers for OOP-style endpoint grouping under a shared controller path.
- Choose parameter sources and constraints (path/query/header/cookie/layered parameters).
- Apply route metadata and indexing (
name,opt) for discoverability and policy hooks. - Validate reverse-routing, unique path+method combinations, and layered precedence behavior.