diagram-studio
Skill5 starsChanged 3 months agoMITView on GitHub
Use when creating architecture, sequence, class, ER, or state diagrams as Mermaid for GitHub docs or editorial HTML for client decks; includes verify and drift against codebase
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- justEstif/pi-shelftheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- justEstif/pi-shelf★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- brainstormingSkill
- diagnosing-superpowersSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- govard-laravelSkill
- govard-magentoSkill
- govard-symfonySkill
- govard-toolboxSkill
- govard-wordpressSkill
- maestro-designSkill
- magento2-backend-devSkill
- magento2-code-reviewSkill
- magento2-dev-coreSkill
- magento2-frontend-devSkill
- magento2-hyva-devSkill
- magento2-linterSkill
- magento2-performance-auditSkill
- magento2-security-scanSkill
- php-dev-coreSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- review-in-worktreeSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use when the reader learns more from a visual than from a paragraph or table.
- Distinctive: line 14
Don't use for simple lists, single before/after comparisons, or a one-sentence relationship that a table can express — use a table instead.
- Very specific: line 55
Add docs/diagrams/.gitkeep if the folder is otherwise empty.
- Very specific: line 59
Every diagram has two audiences.
- Very specific: line 73
When audience is ambiguous, default to Team (show everything collapsed) and add a 1-line note: "Hiding source/tokens for client — say …
- Very specific: line 87
All 5 share tokens paper/ink/accent/muted/link (no shadow, rx:6, accent 1-2).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diagram Studio
Hybrid Mermaid + editorial HTML for architecture, sequence, class, ER, and state diagrams.
When to Use
Use when the reader learns more from a visual than from a paragraph or table. Ideal for system architecture, message flows over time, entity relationships, class structures, and state transitions with guards.
Don't use for simple lists, single before/after comparisons, or a one-sentence relationship that a table can express — use a table instead.
Selection
Choose the Mermaid type by the semantic pattern, not by habit. See references/cheatsheet.md for minimal examples.
| If showing… | Use | Reference |
| Components + connections | flowchart | cheatsheet.md#flowchart |
| Messages over time | sequenceDiagram | cheatsheet.md#sequence |
| States + guards | stateDiagram | cheatsheet.md#state |
| Entities + fields | erDiagram | cheatsheet.md#er |
| Classes + ops | classDiagram | cheatsheet.md#class |
Full 52-ordinal editorial taxonomy from cathrynlavery/diagram-design v2.6.32 is mapped to these 5 Mermaid types in references/supported-cases.md (mapped or explicitly out of scope) — start with the table above before inventing a new form.
GitHub-compatible Mermaid style: use flowchart TB or flowchart LR (never legacy graph), add classDef tokens from references/style-guide.md, and use linkStyle/style sparingly for the focal path.
flowchart TB
A["Client"] --> B["Cordis"]
classDef focal fill:#eb6c36,stroke:#2d3142,color:#fff
class A focalEditorial Discipline (from diagram-design)
Extracted from cathrynlavery/diagram-design — see references/diagram-design-learnings.md:
- Density 4/10 — generous whitespace, no wall of boxes. Every node must earn its place.
- >9 nodes → split into overview + detail diagrams rather than cramming.
- Accent 1-2 max — use
classDef focal fill:#eb6c36,stroke:#2d3142for the single hot path; all other nodes staypaper/muted. No shadows (shadow:false),rx:6max, mono only for ports/URLs. - Confirm before drawing — state
type, size preset (85%/100%), what will be cut due to budgetand wait for redirect if the user is reachable. Never assume the diagram scope.
Where to Write
docs/ARCHITECTURE.md §1.1— single source for the umbrella architecture (do not duplicate elsewhere).docs/specs/*-design.md— for RFC/spec diagrams; each spec may embed one Mermaid block that lives with the design.docs/diagrams/<slug>.html— for editorial export (optional, self-contained HTML+SVG for client decks). Link preview viain markdown when needed. Use spacing tokens fromreferences/style-guide.md#deck-html-layout-tokens(header 16px, line-height 1.6) so deck text isn't cramped — verify withgrep line-height.docs/diagrams/maestro-harness-deck.html— 3-page A4 deck (cover + 2 diagrams). Must use deck layout tokens above; headerflowchart TBand10 plugins + metamust have 8px gap, notflowchart TB10.
Add docs/diagrams/.gitkeep if the folder is otherwise empty. The harness-* and maestro-harness-deck files named in this skill and in references/ are historical examples from the original harness repo; they are not shipped with this plugin.
Audience Rules (what to show for Team vs Client)
Every diagram has two audiences. The skill MUST decide on audience before writing docs/diagrams/<slug>.html (default is team when not specified — ask 1 line if unclear). Use this exact checklist:
| Element | Team / Internal (audience: team|internal|engineering|review or prompt has "cho team / keep source / để team xem") | Client / External (audience: client|pitch|deck|external or prompt has "cho khách / clean deck / bản đẹp cho khách") |
|---|---|---|
| Rendered diagram (inline SVG, self-contained, no JS) | Yes — always | Yes — always |
| Mermaid source ```mermaid | Yes — inside <details><summary>Mermaid source</summary><pre class="mermaid">…</pre></details> collapsed by default (so the verifier can re-check, GitHub diff preserved) | No — remove <pre> and <details> entirely |
| Editorial tokens card (paper/ink/accent swatches, hex) | Yes — keep the "Editorial tokens" card (so team knows palette to maintain) | No — remove the whole card (client only needs the diagram, not the design system) |
| Technical footer (file path, verify {"ok":true}, drift missingInCode 0, generation note) | Yes — keep the "About this export" card with Source: docs/..., verify/drift line | No — remove or reduce to 1 line: Generated via diagram-studio — 2026-08-27 (no file paths, no verify/drift) |
| Styling | Full tokens paper/ink/accent/muted/link as in references/style-guide.md | Same tokens (visual stays identical) — only the meta cards differ |
Rules for other locations (not audience-driven):
docs/ARCHITECTURE.mdanddocs/specs/*-design.md— always show source as ```mermaid block (GitHub renders it, diffable, single source of truth, verification checks it) — audience rule does not apply here.docs/diagrams/*.pdfdeck — always client rules (hide source, hide tokens card, hide technical footer, use PNG only) — PDF is for distribution.
When audience is ambiguous, default to Team (show everything collapsed) and add a 1-line note: "Hiding source/tokens for client — say 'clean for client' to hide."
Supported Cases (summary — details in references/supported-cases.md)
This skill covers 5 diagram types × 2 audiences × 3 outputs. Parse and strict checks run through the bundled CLI (scripts/verify-mermaid.mjs); drift against the codebase is checked by hand. See references/supported-cases.md for the full tables.
| # | Mermaid type | When to use | Audience variants | Output |
| 1 | flowchart TB/LR | Components + connections | Team: harness-architecture.html 16K (svg+pre) → Client: ...-client.html 12K (svg only) | docs/ARCHITECTURE.md §1.1 + HTML + PDF p1 |
| 2 | sequenceDiagram | Messages over time | Team: harness-turn-flow-sequence.html 31K → Client: ...-client.html 30K | docs/specs/...-sequence.md + HTML + PDF p2 |
| 3 | classDiagram | Classes + ops | Team/Client per Audience Rules | cheatsheet.md#class |
| 4 | erDiagram | Entities + fields | Team/Client | cheatsheet.md#er |
| 5 | stateDiagram | States + guards | Team/Client | cheatsheet.md#state |
All 5 share tokens paper/ink/accent/muted/link (no shadow, rx:6, accent 1-2). Verification: parse passes for all 5 types, --strict warns on shadow:true. Details and live case studies in references/supported-cases.md.
Verify & Drift
Always verify before commit: a diagram that fails parse must never ship. Run the bundled CLI, which extracts every mermaid block and checks each one on its own. It runs the real mermaid.parse() when mermaid and jsdom can be imported from the script (for example npm i --no-save mermaid jsdom in the repo checkout) and returns {ok, errors, warnings, validator} with validator: "mermaid". Without them it falls back to a heuristic (incomplete arrows, unterminated strings, unclosed flowchart brackets), reports validator: "heuristic" and a warning, and a heuristic ok is not a syntax guarantee: use --require-parser to refuse that mode (exit 2). It exits 0 on success and 1 on failure. Add --strict to report anti-patterns (e.g. shadow, legacy graph) as warnings.
node maestro-skills/skills/diagram-studio/scripts/verify-mermaid.mjs docs/ARCHITECTURE.md --strict
node scripts/verify-mermaid.mjs <file|-> --strict # from this repo's root, or '-' for stdinDrift is done by hand, with no tool behind it. Before a PR, compare the diagram against the codebase and flag missingInCode / staleEdges / missingInDiagram (inspired by diagram-drift): every node must map to a real package, file or service, and every real component in scope must appear. Fix drift by patching the doc or the code reference.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

