Router
On this page 2
stacks-router · Native Stacks · model-invoked
Use when working with routing in a Stacks application - defining routes, HTTP methods, route groups, middleware, named routes, URL generation, request enhancement (Laravel-style input/query/file helpers), response helpers, error responses, route model binding, or rate limiting. Covers @stacksjs/router, routes/, and app/Routes.ts.
Read the skill for the implementation workflow and its current signatures. The Native capabilities catalog maps the package to source and retained evidence; driver limits are explicit.
Inside the skill
- Key Paths
- Route Definition
- The strings are typed
- Typed Routes (zero generation)
- Route Registry (app/Routes.ts)
- Binding, signed access, and request lifecycle
- Enhanced Request (Laravel-style)
- Response Helpers
- Error Responses
- Request Context
- Middleware
- Query Tracking
- Default API route families
- Server Integration
- URL Generation
- Gotchas
Using it
This skill is model-invoked. Your agent can select it for matching tasks, and you can call it directly.
/stacks-router
Source: stacks-router/SKILL.md.
It ships in @stacksjs/defaults with its supporting files. Run
buddy setup:ai to refresh the agent setup. Override it per project with
app/Skills/stacks-router/SKILL.md. See Using skills.