What problem does it solve?
This Skill prevents Axum router startup panics and routing bugs caused by version-specific path syntax and incorrect composition of routes, nests, merges, fallbacks, and middleware layers.
Core Features & Use Cases
- Axum 0.7 vs 0.8 path-syntax safety: correctly migrate from :id and *path to {id} and {*path}, avoiding the deliberate 0.8 startup panic.
- Correct routing composition: choose between .route, .nest, .merge, and service mounting (nest_service) so handlers land at the right paths and methods.
- Correct 404 vs 405 behavior: ensure unmatched paths return 404 while wrong-method requests return 405 using the right fallback strategy.
- Middleware placement without surprises: apply .layer vs .route_layer so middleware runs on the intended requests (and never turns real 404s into auth errors).
Quick Start
Ask: “Generate an Axum 0.8 Router that mounts a sub-router under /api/v1, uses correct {id}/{*path} syntax, separates 404 and 405 handling, and places auth with route_layer and logging with layer, then explain any panics to avoid.”