cratis/ai.distribution/cratis-vertical-slice
Claude Code and agent skill by cratis/ai.distribution
- community
Checking that the SKILL.md file is still in the repository.
Explains how vertical feature slices are structured in a Cratis Chronicle + Arc application — folder layout, the single backend .cs file, the four slice types (State Change/View/Automation/Translation), and how features compose slices. Use when asking how slices work, where files go, or which slice type to choose. To actually build a new slice end-to-end, use new-vertical-slice instead.
Install
npx vskill@latest install cratis/ai.distribution/cratis-vertical-sliceSKILL.md
The same SKILL.md was published earlier as cratis/ai.distribution/cratis-vertical-slice.
Core principle
A vertical slice contains everything for a single behavior: the command or query, the events it produces, the projections that build read models, the React component, and the specs. Everything lives together because everything changes together.
One feature folder → many slices. One slice folder → one .cs file (all backend) + one .tsx file (frontend).
Step 1 — Identify the feature and slice type
First, name the feature (a domain noun, pluralized) and identify the slice type:
| Slice type | What it does | Key artifacts | |
|---|---|---|---|
| State Change | Mutates system state | Command + events + validators/constraints | |
| State View | Projects events into queryable data | Read model + projection + queries | |
| Automation | Reacts to events, makes decisions | Reactor + optional local read models | |
| Translation | Adapts events between slices | Reactor → triggers commands in own slice |
Step 2 — Create the folder structure
The feature folder lives directly under the app source root (or under an optional <Module>/ grouping) — there is no top-level Features/ wrapper.
✅ Correct:
❌ Wrong — never split by artifact type:
Namespace rule: the namespace mirrors the folder path under the source root — there is no Features segment. MyApp.Authors.Registration (or MyApp.<Module>.Authors.Registration when a module groups the feature).
Step 3 — Write the backend slice file
All backend artifacts for one slice go in a single <SliceName>.cs file. File header:
For a State Change slice, the file contains:
For a State View slice, the file contains:
See references/slice-anatomy.md for all artifact patterns.
Step 4 — Define domain concepts
For every domain value create a concept — one file per concept, in the feature folder (or Common/ if shared across features). Identity concepts derive from EventSourceId<T>; value concepts from ConceptAs<T>.
EventSourceId<T> already supplies the conversions to Guid, EventSourceId, and string — don't redeclare them.
See references/concepts.md for all concept patterns.
Step 5 — Build to generate TypeScript proxies
This generates .ts proxy files in the configured <CratisProxiesOutputPath>. The frontend cannot be written until this succeeds — the proxies are the contract.
Step 6 — Write the React component
Step 7 — Compose the feature page
The feature's <Feature>.tsx assembles slices into a page:
Development workflow order
Work in this exact sequence — TypeScript proxies are generated from C# during dotnet build:
- Implement the C# slice file (step 3)
- Write integration specs for state-change slices
dotnet build— generates TypeScript proxies (step 5)- Implement React component(s) (step 6)
- Register in the feature composition page (step 7)
- Add/update routes if needed
Reference files
references/slice-anatomy.md— complete patterns for every artifact typereferences/slice-types.md— when to use each slice type with decision guidereferences/concepts.md— ConceptAs<T> patterns for all primitive backing types
Security
- Security scanPassed, 100 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/cratis-vertical-slice/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/cratis/ai.distribution/cratis-vertical-slice)