{"id":"b3823fe0-bc61-4ba1-89ac-6c211e337d94","shortId":"KQTa4w","kind":"skill","title":"litestar-routing","tagline":"Auto-activate for Controller classes, Router, route decorators, @get/@post/@put/@patch/@delete, route_handler, path params, app/domain modules, or DomainPlugin layout. Use when designing Litestar routes, handlers, Controller grouping, Router composition, or domain folders. Not fo","description":"# Litestar Routing\n\nUse this skill for route handlers, Controllers, Routers, domain clustering, and endpoint module layout.\n\n## Code Style Rules\n\n- Cluster Controllers by domain, not HTTP method.\n- Keep handlers thin: parse request data, call a service, return a DTO or response object.\n- Put shared path, dependencies, guards, and tags on the Controller class.\n- Use typed path parameters and explicit return annotations.\n\n## Quick Reference\n\n- Controller and route patterns: [routing.md](references/routing.md)\n- Domain folder layout: [domains.md](references/domains.md)\n- End-to-end vertical slice: [example.md](references/example.md)\n\n<workflow>\n\n## Workflow\n\n1. Identify the domain boundary and URL prefix.\n2. Pick a Controller when routes share path, guards, dependencies, or tags.\n3. Keep data access in services and validation in DTOs.\n4. Wire the Controller into the app or DomainPlugin.\n\n</workflow>\n\n<guardrails>\n\n## Guardrails\n\n- Do not group Controllers by HTTP method.\n- Do not put authorization logic in handlers; use Guards.\n- Do not hand-roll query parameter pagination; use the data-services skill.\n- Do not put app-wide plugin setup in route modules.\n\n</guardrails>\n\n<validation>\n\n## Validation Checkpoint\n\n- [ ] Routes are domain-clustered.\n- [ ] Handlers are async when they perform I/O.\n- [ ] Shared guards and dependencies live on the Controller.\n- [ ] DTO and service concerns link to their owning skills.\n\n</validation>\n\n<example>\n\n## Example\n\n```python\nfrom litestar import Controller, get\n\nclass UserController(Controller):\n    path = \"/users\"\n\n    @get(\"/\")\n    async def list_users(self, users_service: UserService) -> list[UserRead]:\n        return await users_service.list_users()\n```\n\n</example>\n\n## References Index\n\n- [routing.md](references/routing.md)\n- [domains.md](references/domains.md)\n- [example.md](references/example.md)\n\n## Official References\n\n- <https://docs.litestar.dev/> - Litestar documentation\n- <https://docs.litestar.dev/latest/reference/> - Litestar API reference\n\n## Shared Styleguide Baseline\n\n- [General](../litestar-styleguide/references/general.md)\n- [Python](../litestar-styleguide/references/python.md)\n- [Litestar](../litestar-styleguide/references/litestar.md)","tags":["litestar","routing","skills","litestar-org","advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx"],"capabilities":["skill","source-litestar-org","skill-litestar-routing","topic-advanced-alchemy","topic-agent-skills","topic-agentskills","topic-ai-agents","topic-claude-code-plugin","topic-claude-code-skills","topic-gemini-cli-extension","topic-htmx","topic-inertia","topic-litestar","topic-mcp","topic-python"],"categories":["litestar-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/litestar-org/litestar-skills/litestar-routing","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add litestar-org/litestar-skills","source_repo":"https://github.com/litestar-org/litestar-skills","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (2,223 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:54.572Z","embedding":null,"createdAt":"2026-05-18T13:20:58.465Z","updatedAt":"2026-05-18T19:13:54.572Z","lastSeenAt":"2026-05-18T19:13:54.572Z","tsv":"'/latest/reference/':278 '/litestar-styleguide/references/general.md':286 '/litestar-styleguide/references/litestar.md':290 '/litestar-styleguide/references/python.md':288 '/users':247 '1':124 '2':132 '3':144 '4':154 'access':147 'activ':6 'annot':101 'api':280 'app':160,198 'app-wid':197 'app/domain':22 'async':214,249 'author':174 'auto':5 'auto-activ':4 'await':260 'baselin':284 'boundari':128 'call':74 'checkpoint':206 'class':9,93,243 'cluster':53,61,211 'code':58 'composit':36 'concern':230 'control':8,33,50,62,92,104,135,157,167,226,241,245 'data':73,146,191 'data-servic':190 'decor':12 'def':250 'delet':17 'depend':86,141,222 'design':29 'docs.litestar.dev':273,277 'docs.litestar.dev/latest/reference/':276 'document':275 'domain':38,52,64,110,127,210 'domain-clust':209 'domainplugin':25,162 'domains.md':113,267 'dto':79,227 'dtos':153 'end':116,118 'end-to-end':115 'endpoint':55 'exampl':236 'example.md':121,269 'explicit':99 'fo':41 'folder':39,111 'general':285 'get':13,242,248 'group':34,166 'guard':87,140,179,220 'guardrail':163 'hand':183 'hand-rol':182 'handler':19,32,49,69,177,212 'http':66,169 'i/o':218 'identifi':125 'import':240 'index':264 'keep':68,145 'layout':26,57,112 'link':231 'list':251,257 'litestar':2,30,42,239,274,279,289 'litestar-rout':1 'live':223 'logic':175 'method':67,170 'modul':23,56,204 'object':82 'offici':271 'own':234 'pagin':187 'param':21 'paramet':97,186 'pars':71 'patch':16 'path':20,85,96,139,246 'pattern':107 'perform':217 'pick':133 'plugin':200 'post':14 'prefix':131 'put':15,83,173,196 'python':237,287 'queri':185 'quick':102 'refer':103,263,272,281 'references/domains.md':114,268 'references/example.md':122,270 'references/routing.md':109,266 'request':72 'respons':81 'return':77,100,259 'roll':184 'rout':3,11,18,31,43,48,106,137,203,207 'router':10,35,51 'routing.md':108,265 'rule':60 'self':253 'servic':76,149,192,229,255 'setup':201 'share':84,138,219,282 'skill':46,193,235 'skill-litestar-routing' 'slice':120 'source-litestar-org' 'style':59 'styleguid':283 'tag':89,143 'thin':70 'topic-advanced-alchemy' 'topic-agent-skills' 'topic-agentskills' 'topic-ai-agents' 'topic-claude-code-plugin' 'topic-claude-code-skills' 'topic-gemini-cli-extension' 'topic-htmx' 'topic-inertia' 'topic-litestar' 'topic-mcp' 'topic-python' 'type':95 'url':130 'use':27,44,94,178,188 'user':252,254,262 'usercontrol':244 'userread':258 'users_service.list':261 'userservic':256 'valid':151,205 'vertic':119 'wide':199 'wire':155 'workflow':123","prices":[{"id":"07a3a833-9699-4c69-9d87-dea08ae59811","listingId":"b3823fe0-bc61-4ba1-89ac-6c211e337d94","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"litestar-org","category":"litestar-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:58.465Z"}],"sources":[{"listingId":"b3823fe0-bc61-4ba1-89ac-6c211e337d94","source":"github","sourceId":"litestar-org/litestar-skills/litestar-routing","sourceUrl":"https://github.com/litestar-org/litestar-skills/tree/main/skills/litestar-routing","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:58.465Z","lastSeenAt":"2026-05-18T19:13:54.572Z"}],"details":{"listingId":"b3823fe0-bc61-4ba1-89ac-6c211e337d94","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"litestar-org","slug":"litestar-routing","github":{"repo":"litestar-org/litestar-skills","stars":7,"topics":["advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx","inertia","litestar","mcp","python","sqlspec"],"license":"mit","html_url":"https://github.com/litestar-org/litestar-skills","pushed_at":"2026-05-13T16:04:09Z","description":"Opinionated first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework ecosystem — publishable to Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and VS Code/Copilot from a single repo.","skill_md_sha":"340727dd6c72ed6580c43e9c5be11308ca840e7a","skill_md_path":"skills/litestar-routing/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/litestar-org/litestar-skills/tree/main/skills/litestar-routing"},"layout":"multi","source":"github","category":"litestar-skills","frontmatter":{"name":"litestar-routing","description":"Auto-activate for Controller classes, Router, route decorators, @get/@post/@put/@patch/@delete, route_handler, path params, app/domain modules, or DomainPlugin layout. Use when designing Litestar routes, handlers, Controller grouping, Router composition, or domain folders. Not for non-Litestar routing or frontend routers."},"skills_sh_url":"https://skills.sh/litestar-org/litestar-skills/litestar-routing"},"updatedAt":"2026-05-18T19:13:54.572Z"}}