← ClaudeAtlas

creating-mermaid-diagramslisted

Generate Mermaid diagrams (.mmd) and export to PNG/SVG/PDF using mmdc CLI or Kroki API. USE THIS SKILL when user mentions diagram, flowchart, sequence diagram, class diagram, ER diagram, state machine, architecture, visualize, git graph, 画图, 架构图, 流程图, 时序图. PROACTIVELY USE when explaining ANY system with 3+ components, API flows, authentication sequences, class hierarchies, database schemas, or state machines. Supports 11+ diagram types with fully automatic layout.
Agents365-ai/mermaid-skill · ★ 69 · AI & Automation · score 86
Install: claude install-skill Agents365-ai/mermaid-skill
# Mermaid Diagrams Generate `.mmd` text files and export to PNG/SVG/PDF using `mmdc` (local) or Kroki API (no install). **Key advantage:** Text-based syntax with **fully automatic layout** — no x/y coordinates needed. ## When to use / when NOT to use **Use this skill for:** diagrams-as-code with automatic layout (flowchart, sequence, class, state, ER, gantt, mindmap) — text source that lives in git and embeds in Markdown. **Do NOT use it — route elsewhere — for:** - Pixel-precise placement, custom layout, branded icons, or heavy styling → **drawio**. - A hand-drawn / sketchy aesthetic → **excalidraw** or **tldraw**. - A freeform whiteboard or freehand strokes → **tldraw**. - Strict, conventional UML notation → **plantuml**. ## Prerequisites **Option A: Local (mmdc)** — also needs a headless Chrome (mmdc renders via Puppeteer) ```bash npm install -g @mermaid-js/mermaid-cli npx puppeteer browsers install chrome-headless-shell # required — mmdc has no bundled browser mmdc --version ``` > `mmdc --version` succeeds even with **no** Chrome installed, but every export then fails with `Could not find Chrome`. Install the browser above (or set `PUPPETEER_EXECUTABLE_PATH` to a system Chrome). If you can't, use Kroki (Option B) — it needs no browser. **Option B: Kroki API (no install)** ```bash curl --version # Just need curl ``` ## Workflow 1. **Check deps** — `mmdc --version` **and** confirm a headless Chrome is installed (a bare `--version` pass does NOT mean export work