cratis-event-model-diagram

cratis-event-model-diagram is a skill for Claude Code, Codex from Cratis/AI. It costs 48 tokens per session (986 once invoked), scanned A, original, MIT.

A guide for keeping Mermaid event-model diagrams beside Cratis code. An event model shows commands, events, read models, and automated steps in the order a business process follows.

In plain words
What is it for?
Use it when adding, renaming, moving, or deleting event-driven features, or when updating module and cross-module flow diagrams.
Why use it?
It keeps a visual description of an already-decided system design aligned with code changes. It does not decide the event names or boundaries for you.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding, renaming, moving, or deleting event-driven features, or when updating module and cross-module flow diagrams.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cratis/ai/cratis-event-model-diagram
Install

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.

Any agent
npx skills add Cratis/AI --skill cratis-event-model-diagram
Clone the repo
git clone --depth 1 https://github.com/Cratis/AI

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for cratis-event-model-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/cratis/ai/cratis-event-model-diagram/github.svg)](https://agentmods.dev/skills/cratis/ai/cratis-event-model-diagram)
Your own site
<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.

agentmods 80×15 button for cratis-event-model-diagram

Your own site · 80×15
<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>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured today against content hash 3d0430e272e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.cratis/ai/skills/cratis-event-model-diagram/SKILL.md · 76 lines

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

  1. 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, Automation and Translate slices. 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.
  2. Order frames by domain causality — what must happen before what. Put state views after the events they project from. Use rf when breaking an inferred connection for an independent flow or explicit branch, not between consecutively produced events.
  3. Write the diagram and the command-rules table.
  4. 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 the cratis-screenplay-handoff-slice skill (in cratis/screenplay) for hand-written changes, not in the diagram.

Read the full file on GitHub · 76 lines

Files

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.

Changes

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.

  1. today Changed · -122 lines · +6 tokens per session 3d0430e272e2
  2. 1mo ago Changed · -62 tokens per session b56c9c618898
  3. 1mo ago Changed · +5 lines b365218b4d4f
  4. 1mo ago Changed · +24 lines 32dd12e93a5a
  5. 1mo ago Changed · +19 lines · +16 tokens per session 4beec3141da7
  6. 2mo ago Changed · +7 lines 4a96559fb47e
  7. 2mo ago Changed 998bfc6b8325
  8. 2mo ago First seen · 143 lines · 88 tokens per session scan A 5a7df1114bd6

Subscribe to this mod's changes

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.

Related

cratis-event-model-diagram compared with skills from other repositories

cratis-event-model-diagram next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cratis-event-model-diagramCratis/AISkill4todayMITA48Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code