lutherwaves/spellcasting/casting-a-route
Claude Code and agent skill by lutherwaves/spellcasting
- community
Checking that the SKILL.md file is still in the repository.
Use when adding the HTTP layer for a resource that already has (or will get) a service layer — chains casting-a-service-layer first if the service is missing
Install
npx vskill@latest install lutherwaves/spellcasting/casting-a-routeSKILL.md
The same SKILL.md was published earlier as lutherwaves/spellcasting/casting-a-route.
casting-a-route
Emits pkg/routes/<resource>/ with five handlers (List, Get, Create, Update, Delete), validation, table-driven test, and appends the mount line to cmd/server.go. Auto-chains the service layer if missing.
Prerequisites
- Existing magic service at cwd.
- A service layer for
RESOURCEexists atpkg/features/${RESOURCE}/service.go.
If the service layer is missing AND the user did not pass --custom:
- Invoke
casting-a-service-layervia theSkilltool, passing the sameRESOURCEargument. - After it completes, resume from step 1 of this skill's procedure.
If --custom was passed (user said e.g. "just the routes, I'll wire it myself"), skip the chain and proceed — leave the service-interface import unresolved and instruct the user to wire it.
Inputs
RESOURCE (lowercase singular). Same token derivations as casting-a-feature.
Procedure
1. Copy templates
2. Substitute placeholders
3. Mount in cmd/server.go
Find the block router.Route("/", func(r chi.Router) { and append, after the existing r.Mount lines (or as the first one if none exist):
The agent appends these. Use goimports after the edit to fix import ordering, or gofmt if goimports isn't available.
4. Vet + test
5. Commit
Capability boundary
Routes use chi, chi/render, magic/middlewares.ErrorHandler, magic/errors, and (for guarded subroutes only) magic/middlewares.RequireRole. No project-specific common libraries; no per-resource ACL authorizers beyond RequireRole. See magic-capabilities.
Doc references
chi.Router: https://pkg.go.dev/github.com/go-chi/chi/v5middlewares.ErrorHandler: https://pkg.go.dev/github.com/tink3rlabs/magic@v0.17.3/middlewares#ErrorHandlermiddlewares.RequireRole: https://pkg.go.dev/github.com/tink3rlabs/magic@v0.17.3/middlewares#RequireRole- Reference route shape: https://github.com/tink3rlabs/todo-service (
pkg/routes/)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/casting-a-route/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lutherwaves/spellcasting/casting-a-route)