lutherwaves/spellcasting/casting-a-service-layer
Claude Code and agent skill by lutherwaves/spellcasting
- community
Checking that the SKILL.md file is still in the repository.
Use when adding domain logic (types + service interface + implementation) for a resource without HTTP — typically because the route is handled differently (worker, scheduled job, internal-only)
Install
npx vskill@latest install lutherwaves/spellcasting/casting-a-service-layerSKILL.md
The same SKILL.md was published earlier as lutherwaves/spellcasting/casting-a-service-layer.
casting-a-service-layer
Emits the domain layer for a resource — types DTO + service interface + storage-backed implementation + table-driven test. No HTTP wiring.
Prerequisites
- Existing magic service at cwd (cmd/server.go imports magic middlewares).
pkg/features/exists; if not, create it:mkdir -p pkg/features pkg/types.
Inputs
| Input | Type | Example | |
|---|---|---|---|
RESOURCE | lowercase singular | todo |
Derived: Resource, RESOURCES, Resources as in casting-a-feature.
Procedure
1. Copy templates
2. Substitute placeholders
Note: order matters in the sed — replace the longest tokens first (RESOURCETABLE, Resources) before the shorter prefixes (Resource, RESOURCE).
3. Vet + test
4. Commit
Capability boundary
Service layer uses storage.StorageAdapter only (no project-specific storage helpers). Lucene filters pass through to storage.Search — the adapter parses and evaluates the raw Lucene string. Use mql.NewParser(input).Parse() only when you need in-process AST evaluation (validation, transformation, inspection). See magic-capabilities.
Doc references
storage.StorageAdapter: https://pkg.go.dev/github.com/tink3rlabs/magic@v0.17.3/storage#StorageAdapterstorage.StorageAdapter.Search(Lucene passthrough): https://pkg.go.dev/github.com/tink3rlabs/magic@v0.17.3/storage#StorageAdaptermql.NewParser(in-process AST parsing only): https://pkg.go.dev/github.com/tink3rlabs/magic@v0.17.3/mql#NewParser
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-service-layer/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-service-layer)