/selamy-skills:mermaid-diagramsfrom selamy-skills
Use when you need to create, version-control, or document software as text-based diagrams — class, sequence, flowchart, ER, state, or C4. Pick the diagram type deliberately and generate Mermaid so diagrams live in the repo and stay maintainable alongside code.
Ships in selamy-skills. 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.
Mermaid renders diagrams from plain text, so they version, diff, and review like code instead of rotting as exported PNGs. The skill is mostly in choosing the right diagram type for the question being answered — the syntax is the easy part.
| The question you're answering | Diagram type |
|---|---|
| What are the objects/domain and how do they relate? | classDiagram |
| What talks to what, in what order, over time? | sequenceDiagram |
| What's the process / decision flow? | flowchart |
| What's the database shape? | erDiagram |
| What states can this thing be in? | stateDiagram-v2 |
| How does the system fit together at a high level? | C4 (C4Context/C4Container) — see the c4-architecture skill |
If you can't name the question, you don't need a diagram yet.
Every diagram starts with the type, then its body:
sequenceDiagram
participant U as User
participant API
U->>API: POST /login
API-->>U: 200 + token
flowchart TD
A[Request] --> B{Authed?}
B -->|yes| C[Serve]
B -->|no| D[401]
(), :, ;, #) need quoting:
A["Node (v2)"]. This is the #1 cause of "it won't render."TD (top-down) for processes/trees,
LR (left-right) for pipelines and wide flows.Write the diagram into a fenced ```mermaid block in a markdown file
checked in next to the code it describes (README, ADR, docs/). GitHub and most
renderers display it inline, and it updates in the same PR as the change it
documents — that's the whole point of text diagrams over image exports.
Adapted from the MIT-licensed softaworks/agent-toolkit mermaid-diagrams skill.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub selamy-labs/agent-skills --plugin selamy-skills111 skills in this plugin
/adaptive-estimationUse when tracking a slowly-varying latent quantity from noisy measurements with quantifiable uncertainty — a drifting metric, capacity, latency trend, or confidence. Prefer a Kalman-style adaptive estimator over fixed moving averages or static thresholds./adaptive-loop-budgetingUse when an autonomous loop needs explicit limits on attempts, time, cost, tool calls, verification depth, or risk, and a clear stop, continue, yield, or escalate decision./adopt-and-deleteUse when adopting a shared module, library, chart, or service, or doing any consolidation, migration, or refactor that supersedes existing code. The change that adds the replacement must REMOVE what it replaced, in the same atomic change./adversarial-reviewUse before claiming a high-stakes artifact done, verified, or merged. Have an independent grader adversarially review it — prompted to refute and find reasons not to ship, not to bless — and iterate to an explicit ship-or-revise verdict./agent-drives-uiUse when an agent operates a UI on the user's behalf through conversation, navigating, filling forms, updating live views, with real-time bi-directional state sync. Activates on conversational app control, agent drives the front end, agentic UX, or choosing an agent-to-app protocol./agentic-coding-loopUse when implementing code from a spec through a bounded build-test-fix loop with explicit acceptance criteria, automated checks, live verification when needed, and clear stop conditions.