mermaid-diagrams
Skill2 starsChanged 3 days agoMITView on GitHub
Use when the deliverable is Mermaid source: the user names Mermaid, or the host renders Mermaid blocks itself (GitHub, Linear, Obsidian) and the diagram should stay editable text there. Covers flowcharts, sequence diagrams, architecture diagrams, diagram refactors, and readability fixes: type selection, reader-first layout, parser-safe syntax, palettes and dark-mode-safe styling, renderer compatibility, density control, and render validation. NOT for figures delivered as images in documents or posts, or draw.io native XML authoring (technical-figure or drawio-diagram from the gigio-figures repository, when installed).
69 other projects use a version of this.
Adopted by
Most recently taken up by
- radiovisual/claude-skillstheir own version, first seen Nov 16, 2026
- Ivan-propio/claude-skillstheir own version, first seen Nov 16, 2026
- pantheon-org/tekhnetheir own version, first seen Nov 15, 2026
- mikejhill/agent-skillstheir own version, first seen Nov 15, 2026
- MADTeacher/skillstheir own version, first seen Nov 15, 2026
- compozy/compozytheir own version, first seen Nov 13, 2026
Used with
Projects with it also use analytics-metrics, aws-account-management and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hoodiniSkillanalytics-metrics
Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on analytics, dashboard, charts, metrics, KPI, data visualization, Recharts.
Also in 3 projects that use this
hoodiniSkillaws-account-management
Manage AWS accounts, organizations, IAM, and billing. Use when setting up AWS Organizations, managing IAM policies, controlling costs, or implementing multi-account strategies. Triggers on AWS Organizations, AWS IAM, AWS billing, Cost Explorer, SCPs, multi-account, AWS SSO, Identity Center.
Also in 3 projects that use this
LangChainSkilllangchain
Build agents with a prebuilt architecture and integrations for any model or tool. Use when creating tool-calling agents, switching model providers, or adding structured output.
Also in 3 projects that use this
imehrSkillrailway
Railway.com deployment and management - deployment, logs, migrations, troubleshooting, monorepo strategies, security, and CLI reference. Use when deploying to Railway, configuring services, managing environment variables, or debugging deployment issues.
Also in 3 projects that use this
- +8 more from hoodini
Other versions69 projects use a version of this.
Word for word · 1
- gigio1023/gigio-skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 68
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- langchain-ai/openwiki★ 18ksame name
- compozy/compozy★ 2.9ksame name
- pedronauck/skills★ 655same name
- openclaw/openclaw-enterprise★ 454same name
- hoodini/ai-agents-skills★ 295same name
- shep-ai/shep★ 277same name
- veelenga/claude-mermaid★ 221same name
- magnus919/agent-skills★ 177same name
58 more not listed
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 repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 1password-cliSkill
- codex-delegateSkill
- credo-journalSkill
- credo-paper-planSkill
- credo-releaseSkill
- credo-tasteSkill
- cursor-cli-delegationSkill
- english-prompt-reviewSkill
- pdf-page-countSkill
- pr-review-commentSkill
- read-agent-sessionsSkill
- reddit-searchSkill
- release-notesSkill
- small-model-handoffSkill
- spot-gpu-evaluationSkill
- toss-portfolio-stateSkill
- vuln-reportSkill
- zcode-cliSkill
- bug-diagnosisSkill
- coding-standardsSkill
- commit-and-pushSkill
- copydeskSkill
- design-docSkill
- design-explorationSkill
- draft-prSkill
- evaluation-analysisSkill
- evaluation-auditSkill
- evaluation-designSkill
- evaluation-operationsSkill
- find-unknownsSkill
- frontend-designSkill
- git-worktree-setupSkill
- idea-critiqueSkill
- insight-dashboardSkill
- install-skill-packSkill
- internal-source-researchSkill
- interviewSkill
- literature-researchSkill
- load-testingSkill
- ml-experimentSkill
- model-routingSkill
- orchestrate-subagentsSkill
- praxis-directionSkill
- prompting-guideSkill
- review-panelSkill
- session-handoffSkill
- skill-builderSkill
- terminologySkill
- work-planSkill
- write-issueSkill
- write-notionSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 63 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 74
linkStyleindexes shift: when edges are added or reordered — re-check indexed styles after any edge edit.
“Common” is measured: kept by at least 6 in 10 of the 63 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mermaid Diagrams
Produce a Mermaid diagram that a human reads correctly on the first pass and that actually renders on the destination host. Readability outranks completeness: a diagram that needs study has failed even if every fact is in it.
Baseline: Mermaid v11.17 syntax, written down to the version-safe subset when the destination host is older or unknown. Mermaid v12, which GitHub renders, keeps that syntax but changes the default layout, theme, and look (references/syntax-pitfalls.md). Keep reusable examples in English with neutral sample domains; for user artifacts, follow the requested or source language and never introduce names, incident details, or unreleased context the user did not provide.
Reference Files
| File | Read when |
references/syntax-pitfalls.md | Before writing any non-trivial diagram, or when a diagram fails to parse — line-break trap, parser breakers, escaping, frontmatter config |
references/diagram-catalog.md | Choosing a type, choosing detail level, or wanting a starting pattern — includes v11 and v12 types and compact-vs-detailed forms |
references/color-and-style.md | When color/emphasis would add meaning — ready palettes, themeVariables, dark-mode survival, hierarchy without color |
references/renderer-compat.md | When the destination host matters or before shipping — host matrix, version gates, validation workflow |
Non-Negotiable Syntax Rules
The five failures that dominate real-world broken diagrams:
- Line breaks are
<br/>, never\n. Literal\nrenders as visible\ntext in sequence messages, notes, and state labels (render-verified), and on older hosts everywhere else. - Quote any label with punctuation:
A["validate (strict)"]. Unquoted()[]{}|;#&breaks the parser. - Never use lowercase
endas a node/label word in flowcharts and sequence diagrams; writeEndor quote it. - Flowchart arrows are
-->, not->. - Balance every block:
subgraph/end,alt/end,activate +/-.
Workflow
- One message. State what the reader must be able to verify in one sentence. Split topics that need two sentences into two diagrams.
- Type by reader task (
diagram-catalog.md): process →flowchart, call order →sequenceDiagram, boundaries → subgraphs orarchitecture-beta, lifecycle →stateDiagram-v2, data model →erDiagram. - Direction from the reading path, not habit.
LRfor comparisons, swimlanes, and handoffs;TD/TBfor short sequential paths and decision trees. Long labels, many branches, or a narrow host argue againstLR; a scroll-tunnel argues againstTD. Restructure or split before touchingnodeSpacing/rankSpacing, and treat 12+ nodes, 16+ edges, or many cross-subgraph edges as a signal to simplify. - Draft at the right detail level (
diagram-catalog.md): compact form for overviews (chained edges,&fan-out, shared terminal nodes, labeled edges instead of trivial diamonds); detailed form for design docs (subgraphs for real boundaries, markdown-string labels,autonumber,alt/parblocks). Labels stay short — sentences belong in prose. - Style only with purpose (
color-and-style.md): unstyled is the most portable and often best. When color encodes meaning, use the bundled palettes (fill + stroke + text always set together so dark mode cannot break contrast), pair color with labels or line style, keep to ≤4 colors, and set edge visibility (linkStyle default stroke:#64748b) when fills would wash edges out. When edges carry text, setedgeLabelBackgroundandtextColortogether so the label remains readable over lines and on both host themes. AddaccTitle/accDescrwhen the destination benefits from accessibility metadata. Validate (
renderer-compat.md): for repository markdown, run the bundled density and render scripts (absolute paths, from any cwd):SKILL_DIR="<absolute path to this skill>" "$SKILL_DIR/scripts/assess_mermaid_density.sh" "<absolute markdown path>" "$SKILL_DIR/scripts/validate_mermaid_markdown.sh" "<absolute markdown path>"Render failure blocks; fix and rerun. Density warnings start a visual look, not automatic deletion. Then inspect the rendered output (or host preview) for clipping, literal
\n, unreadable crossings, and reading order.The render script needs Node 22.13+ for mermaid-cli 12 (
renderer-compat.md) and downloads mermaid-cli and a headless Chromium throughnpx -yon its first run; without Node, network access, or that download, report the syntax review and the visual check as separate claims and state that the render did not run.The validator renders with Mermaid 12, as GitHub does; set
MERMAID_CLI_VERSION=11.17.0for a v11 host such as GitLab or VS Code. Validate against the requested destination, or the documented safe subset when it is unknown. After parsing and visual checks pass, finish; expand to other renderers only when another destination is required or a specific compatibility failure remains.
Authority
Return what was asked: a code block for "give me a diagram", a file edit for "add/fix the diagram in this doc". Do not restructure surrounding documents, re-theme existing diagrams, or convert diagram types beyond the request; if a different type would serve the reader clearly better, deliver the requested artifact and note the alternative in one sentence.
Output Contract
Artifact first. Add design notes only for non-obvious choices the user should review (direction choice, what was omitted in a compact form, host caveats). Report validation results only for checks actually run, naming the renderer used; never imply visual inspection happened when only parsing was checked.
Gotchas
- Direction defaults hide layout bugs. Dense
LRarchitecture renders impressive and unreadable; sequentialTDbecomes a scroll tunnel. Pick from the reader path, then check the render. - A compact diagram that silently dropped a required fact is wrong, not elegant — say what was compressed out, or split instead.
- Host version is part of correctness. Markdown strings,
@{ shape: }, ELK, and beta diagram types fail or degrade on hosts with older engines (older self-managed GitLab releases, Confluence plugins). Unknown host → version-safe subset. linkStyleindexes shift when edges are added or reordered — re-check indexed styles after any edge edit.- Edge labels need their own contrast pair. Styling nodes and lines does not protect text on an edge; set both
edgeLabelBackgroundandtextColorinthemeVariables, then inspect the light and dark render. - Density thresholds are heuristics. They trigger a look at the render; required nodes and relationships stay.
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.

