cratis/ai.distribution/diagnose-slice

Claude Code and agent skill by cratis/ai.distribution

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use this skill to diagnose why a Cratis slice misbehaves — read model not updating, TypeScript proxy missing, command rejected unexpectedly, projection/observer quarantined, AutoMap mismatch, reactor side effects not appended, or specs flaking. Symptom → likely cause → the rule/skill that owns the fix. Use when something "isn't working" and the cause isn't obvious.

Install

npx vskill@latest install cratis/ai.distribution/diagnose-slice

SKILL.md

The same SKILL.md was published earlier as cratis/ai.distribution/diagnose-slice.

Symptom → likely cause → fix for the common ways a Cratis application slice misbehaves. Each row routes to the rule/skill that owns the detail — start there. Reproduce a real defect with a spec before and after the fix.

Backend / Chronicle

SymptomLikely causeFix →
Read model query returns empty / staleprojection not wired: event→read-model property names differ (AutoMap only maps matching names), or a default value masks missing wiringadd-projection, cratis-readmodel; [SetFrom<T>] for name diffs; no default values on [ReadModel] props
App crashes on startup with a projection errorduplicate [FromEvent<T>] for the same event on one read modeladd-projection (one [FromEvent<T>] per event)
Command always "not successful" with no validation errors[Roles]/authorization: an unauthorized result isn't successful and carries no validation errorsauth-and-identity, cratis-command; assert ShouldNotBeAuthorized()
Command rejected unexpectedlya CommandValidator/ConceptValidator rule, or Provide() short-circuited with ValidationResult.Erroradd-business-rule, cratis-command
Handler returns HTTP 500 instead of rejectingthrew from Provide()/Handle() for a business rule (that's an exception, not a rejection)return Result<TEvent, ValidationResult> — add-business-rule
Reactor's returned events never appendedreturned EventForEventSourceId on a Chronicle version before reactor supportreturn event objects, or ReactorSideEffect for another target — reactors.md
Projection/reactor stops processing ("quarantined")a handler threw; the partition paused and the observer quarantined (does not auto-resume)read the failure off the server first — inspect-running-chronicle; then fix the handler (make it idempotent) and replay — reactors.md
Duplicate side effect on replaynon-idempotent reactor without [OnceOnly]mark the handler [OnceOnly] — reactors.md
Chronicle analyzer warns on an event propertya nullable event propertymodel the optional fact as a separate event — vertical-slices.md, event-modeling
A read model needs a field from another slicewrong stream boundary / missing eventre-model (information completeness) — event-modeling; never cross-read another read model at runtime

Frontend / proxies

SymptomLikely causeFix →
TS can't find the command/query proxy (Cannot find module)proxies regenerate on a Debug build; you only built Releasebuild Debug — new-vertical-slice (backend phase)
Edited a generated file and it revertedgenerated proxies (// @generated by Cratis) are never hand-editedfix the C# source and rebuild — general.md
DataPage won't show live datapassed a snapshot query, or expected a non-existent observableQuery proppass the observable query to the single query prop (auto-detected) — cratis-react-page, components.md
Dialog/dropdown renders behind an overlayused raw primereact/dialog or primereact/dropdownuse the Cratis wrappers from @cratis/components/* — dialogs.md, components.md

Specs

SymptomLikely causeFix →
Spec code leaks into a Release buildspec not wrapped in #if DEBUG … #endifwrap the file — specs.scenarios.csharp.md
Off-by-one in event-tail assertionssequence numbers are zero-based (tail of one event is 0)specs.scenarios.csharp.md
Order-dependent flake on a uniqueness rulea hardcoded value collides across testsuse a per-test value (Guid.NewGuid()); don't reach for [Collection] for collisions — specs.scenarios.csharp.md

When the symptom is only visible on a running server

Everything above is diagnosed from the code. When the read model is stale in a deployed store and the same slice behaves locally, the answer is in the server's own state rather than the source — a failed partition carrying the exception that stopped it, an observer that never registered, an event that was never appended. Use inspect-running-chronicle; the cratis CLI reads all of it.

The distinction that matters: a failed partition does not retry itself, so what looks like "the projection is slow" is usually "the projection stopped, permanently, with a recorded reason nobody has read".

When nothing here fits

Re-read the owning rule (vertical-slices.md, reactors.md, or the cratis-readmodel skill), confirm the build is clean in both Debug and Release, and reproduce the symptom with a spec. Don't infer framework behavior from package internals — if the rules/skills don't answer it, ask.

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cratis/ai.distribution/diagnose-slice/badge)](https://verified-skill.com/skills/cratis/ai.distribution/diagnose-slice)

Something wrong with this skill or its page? Tell us.