← 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.
KazuyaMurayama/claude-code-prompt · ★ 0 · AI & Automation · score 63
Install: claude install-skill KazuyaMurayama/claude-code-prompt
# 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. ## Prerequisites **Option A: Local (mmdc)** ```bash npm install -g @mermaid-js/mermaid-cli mmdc --version ``` **Option B: Kroki API (no install)** ```bash curl --version # Just need curl ``` ## Workflow 0. **Update check (notify, don't pull)** — first use per conversation. Throttle to once per 24 h via `<this-skill-dir>/.last_update`; never mutate the skill directory without explicit user consent. - If `.last_update` exists and is <24 h old, skip this step entirely. - Otherwise, fetch the latest tag from upstream: ```bash git -C <this-skill-dir> ls-remote --tags origin 'v*' 2>/dev/null \ | awk '{print $2}' | sed 's|refs/tags/||' | sort -V | tail -1 ``` - Compare with this skill's `metadata.version` from the frontmatter. If the upstream tag is strictly newer (semver), tell the user one line and ask: > "A newer version of this skill is available: vX.Y.Z → vA.B.C. Want me to `git pull`?" If they say yes, run `git -C <this-skill-dir> pull --ff-only`. Refresh `.last_update` either way so the prompt doesn't repeat for 24 hours. - If upstream is the same or older, refresh `.last_update` silently and continue. - On any failure (offline, not a git checkout — e.g. ClawHub-installed