/grain:event-modelfrom grain
Authors and validates Grain service topology including CQRS flows, registry declarations, and Allium rule links. Checks event schemas, read-model state schemas, and runtime coverage.
Ships in grain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Register each service area with (em/defeventmodel :area area-map). Registration
replaces that area's entry. Blocks live under :commands, :events, :read-models,
:queries, :todo-processors, :periodic-tasks and :screens. In :flows,
each step has :from and :to endpoints identified by [kind :area/name];
nil marks a boundary.
emv/connection-grammar lists legal flow steps. emv/intent-edges lists
dependency targets. A processor's :subscribes names trigger events and its
:reads names queries. Match topology to the runtime declarations
:grain.event-model/reads and :grain.event-model/produces where applicable.
Match every event block’s :schema to its defevent payload schema and every
keyed read model’s topology :schema to its per-instance :state-schema.
Commands must link to an Allium rule and screens to a surface. Every supplied reference must resolve by kind and name in a repository-relative spec:
:grain/allium [{:spec "components/example-service/example-service.allium"
:kind :rule :name "CreateCounter"}]
Load the application’s models, schemas and handlers before checking live coverage.
(require '[ai.obney.grain.event-model.interface :as em]
'[ai.obney.grain.event-model-validator.interface :as emv])
(emv/verify-event-model!) ;; strict verdict with :valid? and :findings
(emv/event-model-coverage (em/registered-model))
Check draft EDN with (emv/validate-event-model model).
At boot, (emv/verify-or-throw!) raises on failure. Pass {:event-store store}
to also check active retention policies. In development or CI, run the link check
from the project root with the Allium CLI on PATH:
(require '[ai.obney.grain.code-agent-tools.interface :as tools])
(tools/validate-spec-composition (em/registered-model)
{:project-root "." :event-model-opts emv/strict-defaults})
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (obneyai/grain) — no native marketplace selected
npx claudepluginhub p/obneyai-grain18 skills in this plugin
/event-model-distillRecover a Grain Event Model from existing code and live registries./event-model-elicitDiscover Grain service topology for a new feature or service area./event-model-propagateDerive Grain tests for registered topology, boot validation and Allium trace links./event-model-tendEdit an existing Grain Event Model when blocks, schemas, dependencies, flows or trace links change./event-model-weedDiagnose drift between a Grain Event Model, the live registries and linked Allium declarations./grainCoordinate Allium behaviour specs, Grain Event Models, tests and implementation for a Grain feature or spec review.Other plugins' skills for the same job