Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Cratis/AI --skill cratis-event-model-diagramgit clone --depth 1 https://github.com/Cratis/AIWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cratis/ai/cratis-event-model-diagram)<a href="https://agentmods.dev/skills/cratis/ai/cratis-event-model-diagram"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-event-model-diagram/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cratis/ai/cratis-event-model-diagram"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-event-model-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.00986 |
| Opus 5.5 | $0.00019 | $0.00394 |
| Sonnet 5.5 | $0.00010 | $0.00197 |
| Haiku 4.5 | $0.00005 | $0.00099 |
Grade A, and why
cratis-event-model-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Event model diagrams
Render an already-decided event model as a Mermaid eventmodeling diagram that
lives beside the code and is updated in the same change. If the event vocabulary
or the stream boundaries are not yet decided, model first; this skill draws a
chosen model, it does not choose one.
Source authority
Diagrams use Mermaid's native eventmodeling diagram type (Mermaid v11.15
and later). If the renderer does not recognize the diagram type, use a Mermaid renderer that supports it before changing the diagram. The grammar is owned by Mermaid, and
https://mermaid.js.org/syntax/eventmodeling.html is the authority whenever this
file and Mermaid disagree.
What an event model is
It arranges a module's commands, events, read models, and automations on a left-to-right business-flow timeline, answering "what happens in this module, and in what order?".
One file per module or feature, alongside the code, with the diagram in a fenced
mermaid block. A system-overview file at the source root shows only
cross-module flows.
Use the frame patterns for compact syntax, read-only or repeated consumers, automation, translations, and fan-in.
The command rules table
Mermaid's eventmodeling grammar has no shape for validation or guards. After the
diagram, add a ## Command rules section: a table with Command, Rules,
and Emits / result, summarizing validator, value-invariant, provider,
concurrency, and authorization rules plus no-op and diff behavior, in human
language. Include commands that emit no event.
Process
- Discover the behaviors by scanning the module for the artifacts that
define them: command decisions, queries and their read models, local reactions or schedules,
and mappings between outside and local facts or private facts and public contracts. Choose the accepted model when it covers the scope: draw its
StateChange,StateView,AutomationandTranslateslices. Otherwise use the code for a code-first repository. If the repository opted in to Screenplay and the model is missing or unaccepted, settle that gap with the model owner before drawing. Report code that disagrees with the model as drift, separately; do not add unmodeled behavior to the diagram. Use the exact type names. - Order frames by domain causality — what must happen before what. Put state
views after the events they project from. Use
rfwhen breaking an inferred connection for an independent flow or explicit branch, not between consecutively produced events. - Write the diagram and the command-rules table.
- Verify it renders without a syntax-error banner, then reconcile it against
the authority chosen in step 1 (the model's slices, or the code's markers):
every behavior appears, classified by the type the authority gives it. A clean
render proves valid Mermaid, not completeness — close the gaps against the
authority, never from memory. List model/code drift in the report instead of
resolving it in the diagram. When the code is the authority, also find what changed since
the diagram was last updated: the last commit touching the diagram file is the baseline; list
the behavior commits in the module's folders since then
(
git log --reverse <baseline>..HEAD -- <module folders>), oldest first, and check each against the diagram. When an accepted model is the authority, report code that disagrees with it through thecratis-screenplay-handoff-sliceskill (incratis/screenplay) for hand-written changes, not in the diagram.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · -122 lines · +6 tokens per session 3d0430e272e2
- 1mo ago Changed · -62 tokens per session b56c9c618898
- 1mo ago Changed · +5 lines b365218b4d4f
- 1mo ago Changed · +24 lines 32dd12e93a5a
- 1mo ago Changed · +19 lines · +16 tokens per session 4beec3141da7
- 2mo ago Changed · +7 lines 4a96559fb47e
- 2mo ago Changed 998bfc6b8325
- 2mo ago First seen · 143 lines · 88 tokens per session scan A 5a7df1114bd6
cratis-event-model-diagram is a skill published in the GitHub repository Cratis/AI (4 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 986 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.
cratis-event-model-diagram compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cratis-event-model-diagramCratis/AI | Skill | 4 | today | MIT | A | 48 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 330k | 2d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 14k | yesterday | CC0-1.0 | A | 113 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |