mermaid-skill
Skill9 starsChanged 3 months agoApache-2.0View on GitHub
Generate Mermaid diagrams as code (.mmd) and export to PNG/SVG/PDF with mmdc. Use when the user wants a diagram — flowchart, sequence, class, ER, state, gantt, git graph, architecture, timeline, mindmap — proactively when explaining a system with 3+ components, a runtime flow, a schema, or a lifecycle, and when another skill (e.g. show-me) needs a diagram authored or exported to an image.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- base58ed/claude_code_filestheir own version, first seen Oct 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- base58ed/claude_code_files★ 1same 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 repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- check-for-updatesSkill
- api-designSkill
- bddSkill
- blueprintSkill
- brainstormingSkill
- browser-usageSkill
- clarify-codeSkill
- cleanupSkill
- codebase-designSkill
- code-contractsSkill
- code-reviewSkill
- commitSkill
- confluence-exportSkill
- database-proSkill
- datadogSkill
- diagnosing-bugsSkill
- diagram-designSkill
- e2e-testSkill
- explain-code-flowSkill
- explain-simplySkill
- frontend-slidesSkill
- glabSkill
- grill-meSkill
- handoffSkill
- herdrSkill
- i-have-adhdSkill
- impeccableSkill
- implementSkill
- improve-codebase-architectureSkill
- jiraSkill
- loomSkill
- markitdownSkill
- modularity-designSkill
- modularity-reviewSkill
- plannotatorSkill
- ponytailSkill
- prototypeSkill
- qmdSkill
- refactorSkill
- releaseSkill
- researchSkill
- security-reviewSkill
- show-meSkill
- skill-doctorSkill
- stop-the-slopSkill
- tddSkill
- teachSkill
- terraform-engineerSkill
- ticket-overviewSkill
- to-specSkill
- to-ticketsSkill
- update-docstringsSkill
- wayfinderSkill
- write-documentationSkill
- write-readmeSkill
- write-simplySkill
- writing-for-agentsSkill
- wtfSkill
The file
Files
Mermaid Diagrams
Author .mmd text files and compile them to images with mmdc. Mermaid lays everything out automatically — no coordinates — and the text source lives in git and embeds in Markdown.
Route elsewhere when the request needs: pixel-precise placement, branded icons, or heavy styling → drawio; a hand-drawn aesthetic → excalidraw/tldraw; a freeform whiteboard → tldraw; strict conventional UML notation → plantuml.
Setup
mmdc renders through Puppeteer and needs a headless Chrome:
npm install -g @mermaid-js/mermaid-cli
npx puppeteer browsers install chrome-headless-shell # mmdc has no bundled browserCould not find Chrome is a toolchain failure, never a diagram error. mmdc --version passes without Chrome, and a perfectly valid .mmd still fails to compile. Install the browser above or set PUPPETEER_EXECUTABLE_PATH to a system Chrome; leave the .mmd alone.
Workflow
Author — pick the type from the shape of the content:
The content is… Type steps, branches, dependencies flowchartwho calls whom, in what order sequenceDiagramtables and relations / types and inheritance erDiagram/classDiagramstatuses one thing moves through stateDiagram-v2deployed services and their wiring architecture-betaschedule / branch history / proportions / idea tree gantt/gitGraph/pie/mindmapevents over time / effort-impact grid / plotted data timeline/quadrantChart/xychart-betaOne diagram answers one question — past ~20 nodes, split by concern into separate
.mmds instead of cramming. Syntax references, consult when unsure: FLOWCHART · SEQUENCE · CLASS-ER · ARCHITECTURE (architecture-beta— newer syntax, read before first use) · OTHER-TYPES (state, gantt, gitGraph, pie, mindmap, journey, timeline, quadrant, xychart, C4). Done when every node, participant, and label names a real thing from the content being diagrammed — no placeholders.Compile — the compile is the syntax check; a parse error is a bug in the
.mmd, fix and re-compile until it renders:mmdc -i diagram.mmd -o diagram.png --size 2048Themes:
-t default|dark|neutral|forest(baseworks only inside a%%{init: {'theme':'base'}}%%directive). SVG/PDF: same command with.svg/.pdfoutput.Self-check (vision) — a clean compile only proves the syntax; read the exported PNG and judge it as its audience will. Mermaid positions everything itself, so look for content defects, not overlaps:
Check What to look for Fix Label truncation Node / edge text clipped Shorten the label, or wrap with <br/>Cramped density Nodes crammed together; tangled lines Flip direction ( TD↔LR), split intosubgraphs, or reduce nodesWrong aspect Far too wide or too tall to read Change flowchart TD↔LR(or setdirectionin class/state)Edge spaghetti Many crossings, hard to follow Reorder declarations so connected nodes sit adjacent; group with subgraphWrong diagram type Type doesn't suit the content Re-pick from the step-1 table Low contrast Text blends into the node fill classDef(FLOWCHART § Styling) or-tthemeRe-compile after every fix. Max 2 self-check rounds, then show the user regardless. No vision available → skip straight to the review loop.
- Review loop — show the image, apply the minimal
.mmdedit per request, re-compile. Overwrite the same.mmd/.pngeach round — nov1,v2, … After 5 rounds, suggest the user fine-tune at mermaid.live. - Report — give the user the
.mmdand image paths.
Gotchas
| Symptom | Fix |
| Parse error on a label with special chars | Quote it: A["Label: value"] |
| Parse error on a subgraph name with spaces | Quote it: subgraph "My Layer" |
Maximum text size in diagram exceeded | Split the diagram; last resort -c config.json {"maxTextSize": 200000} |
| Chrome crashes in CI / as root | -p puppeteer.json with {"args": ["--no-sandbox"]} |
Architecture icons missing / logos: name not found | Register the pack at compile time — ARCHITECTURE § Icons |
| Blank or tiny PNG | Add --size 2048 |
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.

