A tool-agnostic Claude Code skill for creating, editing, and iteratively refining diagrams
in any project. Excalidraw is the primary tool — authored as .excalidraw JSON and
rendered to PNG fully locally (no browser, network, or Docker). Mermaid is a legacy
fallback for existing .mmd files or explicit Mermaid / inline-in-Markdown requests.
SKILL.md— entry point + backend routing (Excalidraw default; Mermaid legacy).scripts/render.sh— dispatcher; routes a source file to a backend by extension.backends/excalidraw/— primary backend: pure-Node renderer + element-schema reference.backends/mermaid/— legacy backend:mmdc+ headless Chrome (ported from mermaid-diagrams).
Author docs/diagrams/<name>.excalidraw → bash scripts/render.sh docs/diagrams/<name>.excalidraw
→ Read the PNG → refine the JSON → re-render. The read-the-PNG-and-refine loop is the point:
you adjust an existing diagram instead of regenerating it. Share via serve-image /
serve-gallery over Tailscale.
- Writes only inside the current project's
docs/diagrams/. Never/tmpor$HOME. - No public-host uploads; rendering is local.
- Source files (
.excalidraw/.mmd) are the source of truth.
- Excalidraw:
@vraksha/excalidraw-cli(node-canvas), vendored intonode_moduleson first render. ARENDER_BACKENDhook is reserved for a future headless-Chromium / SVG backend. - Mermaid:
@mermaid-js/mermaid-cli(mmdc) via a global install ornpx.
Create backends/<name>/render.sh <input> [output] (writes an image, nothing outside the
project), add one extension → backend line to scripts/render.sh, and a routing note to
SKILL.md.
Added to agentic-dev-config as a submodule; install.sh symlinks it into ~/.claude/skills/.