/mermaid-event-model:create-event-modelfrom mermaid-event-model
Seeds a project with an Event Model: a markdown file containing a canonical hotel-booking DSL inside a mermaid block, plus an HTML viewer that renders it. Useful for bootstrapping models or resetting to the reference example.
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.
Read when SKILL.md points to them.
Seed a project with a working Event Model: a markdown file wrapping the canonical hotel-booking DSL, plus a model-viewer.html page that renders it (and lists any companion slice specs in a sidebar).
The argument $ARGUMENTS is the target path for the model file. If no argument is provided, default to blueprint_dsl.md in the project root. If the argument doesn't already end in .md, append .md.
Locate the template files. Use the Bash tool with dirname on the path to this SKILL.md to find the skill directory — do not hard-code an absolute path. The two templates are:
template.md — markdown wrapper containing the canonical DSL inside a fenced mermaid block. Has a {{MODEL_NAME}} placeholder in the title.template.html — the model-viewer.html page (markdown + diagram + slice-spec sidebar). Also has a {{MODEL_NAME}} placeholder for the default model the viewer loads.Determine the two output paths:
$ARGUMENTS path (or blueprint_dsl.md if absent), with .md appended if missing.model-viewer.html.Compute the model basename: the model output filename without its .md extension. This is the {{MODEL_NAME}} substitution value (e.g. blueprint_dsl.md → blueprint_dsl).
Write template.md to the model output, substituting {{MODEL_NAME}} with the basename. Preserve tab indentation in the embedded DSL exactly — the parser is indent-aware and uses tabs.
Write template.html to the viewer output, substituting {{MODEL_NAME}} with the same basename so the viewer loads the correct model by default.
If either output file already exists, confirm with the user before overwriting (per file).
Confirm to the user what you wrote and where, plus the command to view it:
python3 -m http.server 8000
# then open http://localhost:8000/model-viewer.html
The viewer accepts ?model=<basename> to load a different model in the same directory. The slice-spec sidebar fills in once the user runs /mermaid-event-model:spec-slices against the model.
template.mdA markdown file wrapping the canonical hotel-booking event model in a fenced mermaid block. The DSL itself exercises every feature:
hotelProximityTranslatorprocessPayment)paymentSucceeded ↔ paymentsToProcess — exercises the renderer's back-edge handlingtemplate.htmlA model-viewer.html page that:
.md (markdown prose around the embedded eventModel diagram) in the main pane<model>-slices/ in a sidebar, falling back to "(no slice specs found)" until the user runs spec-slicesd3, mermaid, marked, and the @howarddierking/mermaid-event-model package via jsDelivr through a browser importmap, so it works with no install or build step beyond a static file serverWhat 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./event-modelAuthor or extend an Event Model DSL file from a natural-language description. Adds actors, aggregates, UIs, commands, domain events, external events, read models, and automations following the project's grammar and conventions. Use this when the user wants to model a new system, add a new flow to an existing model, or sketch a missing piece — not for adding slices (use `add-slices` for that) or validating completeness (use `validate-completeness`)./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