/mermaid-event-model:event-model [dsl-file-path] <description of what to model>from mermaid-event-model
Authors or extends Event Model DSL files from natural-language descriptions. Adds actors, aggregates, UIs, commands, domain events, external events, read models, and automations following project grammar and conventions.
Ships in mermaid-event-model. 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.
You are an Event Modeler. Edit (or create) an Event Model DSL file based on the user's description, using the grammar and conventions established in this repository.
The argument $ARGUMENTS is freeform — typically a description of what to add, optionally prefixed by a DSL file path. Examples:
blueprint_dsl Add a refund pathway when an order is returnedAdd a "forgot password" flow (no path → resolve from session context, see below)./models/billing.dsl Model a subscription renewal cycleDSL files in this project are markdown — each one is a .md file whose DSL lives inside a fenced ```mermaid block whose first content line is eventModel. Filenames typically end in .md; legacy blueprint_dsl (no extension) is no longer used.
$ARGUMENTS contains an explicit file path (e.g. blueprint_dsl.md, blueprint_dsl_dcb.md, blueprint_dsl_fanin.md, or any .md path), use that.blueprint_dsl.md in the project root.If the target file does not exist yet, create it as a markdown file: a # <title> heading, a one-line description, then a ## Model section containing a fenced ```mermaid block that opens with the eventModel keyword. All actors/aggregates/elements/edges go inside that fence, tab-indented under eventModel.
When extending an existing file, edit lines INSIDE the fenced block — preserve the markdown structure around the fence and don't move the fence boundaries.
The full specification lives in README.md. Read it if any of the rules below feel underspecified for the user's request. The high-points:
eventModel
actor <Name>
aggregate <Name> # optional — DCB models omit aggregates
ui:<Actor> <id>["Label"]
command <id>["Label"] [reads [<event>, ...]]
domainEvent[:<Agg>] <id>["Label"] # `:<Agg>` qualifier optional
externalEvent <id>["Label"] # facts originating outside the system
readModel <id>["Label"]
automation:<Actor> <id>["Label"]
<id> --> <id> # flow edge
slice <id>["Label"] # vertical slice — DON'T author these here
<id> --> <id>
Optional brace-delimited data sections (typed fields, one per line) are supported on ui, command, domainEvent, externalEvent, and readModel:
command bookRoom["Book Room"] {
guestId: UUID
roomId: UUID
checkIn: date
checkOut: date
}
Supported field types: string, int, float, decimal, boolean, date, timestamp, UUID.
Read whichever of these matches the pattern the user is describing — they are the canonical examples for each style:
blueprint_dsl — aggregate-based hotel booking. Use this as the default reference for ordinary CQRS/event-sourcing models.blueprint_dsl_dcb — Dynamic Consistency Boundary variant: no aggregates, commands declare reads [...] clauses listing the event types they replay for consistency. Use when the user asks for DCB or "no aggregates".blueprint_dsl_fanin — many events updating one read model (a customer activity timeline). Use when modeling a feed, audit log, or aggregated view.eventModel is one tab in; brace bodies and slice edges go one tab deeper. The parser is indent-aware.camelCase for element ids (bookRoom, paymentSucceeded) and snake_case for slice ids (request_payment). Put human-readable text in ["..."] labels.ui → command → domainEvent → readModel → (ui | automation). Stay on the canonical pattern unless the user explicitly asks for a non-standard wiring.paymentSucceeded → paymentsToProcess → paymentProcessor → ... are first-class — the renderer handles back-edges.Edit tool. Insert each new declaration in the section that matches its concept (e.g., a payment-related event goes near other payment elements). Preserve blank lines between conceptual sections.<id> --> <id> lines next to the related declarations — the same way the existing files do it (slices are added later, by add-slices).slice blocks. Slicing is a separate concern. After your edits, remind the user they can run /mermaid-event-model:add-slices to generate slices automatically./mermaid-event-model:validate-completeness to check for missing data sources, or offer to render the demo page if the user wants to see the result.slice declarations (use /mermaid-event-model:add-slices)./mermaid-event-model:validate-completeness)./mermaid-event-model:create-event-model).What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (howarddierking/mermaid-event-model) — no native marketplace selected
npx claudepluginhub p/howarddierking-mermaid-event-model6 skills in this plugin
/add-slicesAnalyze an Event Model DSL file and (re)write its `slice` declarations from scratch based on the edges currently in the file. Strips any existing slices first so re-running cleanly replaces stale slices instead of accumulating them. Every slice is classified against the four canonical Event Modeling patterns — Command, View, Automation, and Translation — with `externalEvent` as the sole discriminator between Automation and Translation, since the two are structurally identical. Slices that match no canonical shape are flagged rather than forced into a bucket, and the run also reports model defects the classification exposes: read sides that mix two systems, and orphan events that should have been declared external. The pattern is reported, never written into the DSL./add-testsAuthor `sliceTests` Given/When/Then specifications for a slice and append them to that slice's spec file. The target slice can be named or inferred from the test's own action element (its command, or read model for a view test). You describe the test in natural language and pick (or accept an inferred) flow type; the skill grounds every element, outcome, and field against the slice's Model section. It includes only the subset of fields the test's language actually exercises, and — like validate-completeness — refuses to invent data: any attribute you reference that no element in the slice carries is raised back to you before anything is written. Existing tests, the Description, and the Model section always round-trip unchanged./create-event-modelSeed a project with a working Event Model. Writes (1) a markdown file containing the canonical hotel-booking DSL inside a `mermaid` fenced block, and (2) a `model-viewer.html` page that renders that markdown plus any sibling `<model>-slices/` directory created later by the `spec-slices` skill. Useful for bootstrapping a new model or resetting to the reference example. The model defaults to `blueprint_dsl.md`; the viewer is always written as a sibling named `model-viewer.html`./spec-slicesGenerate one specification file per slice declared in an Event Model DSL. Each spec is markdown with a Model section (auto-extracted slice snippet, refreshed on re-run), a Description section (prose intent), and a Tests section (`sliceTests` DSL inside a mermaid fenced block). Specs are written into a sibling directory `<dsl-file>-slices/`. Re-running is repeatable: alive slices keep their Description/Tests, the Model section is refreshed against the current DSL, and orphan files (whose slice id no longer exists in the DSL) are checked for authored content — empty orphans are deleted silently, orphans with prose or real tests prompt the user to pick which current slice to move the content to so no authored data is ever lost./validate-completenessAnalyze an Event Model DSL file for information completeness — verify that every field displayed in a UI or read model is traceable back through events and commands, with no gaps or assumed data.Other plugins' skills for the same job