Dotfiles-nix mermaid
Must read guide on creating/editing mermaid charts with validation tools
install
source · Clone the upstream repo
git clone https://github.com/not-matthias/dotfiles-nix
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/not-matthias/dotfiles-nix "$T" && mkdir -p ~/.claude/skills && cp -r "$T/modules/home/programs/cli-agents/shared/skills/mermaid" ~/.claude/skills/not-matthias-dotfiles-nix-mermaid && rm -rf "$T"
manifest:
modules/home/programs/cli-agents/shared/skills/mermaid/SKILL.mdsource content
<!-- Source: https://github.com/mitsuhiko/agent-stuff/blob/main/skills/mermaid/SKILL.md -->
Mermaid Skill
Use this skill to quickly validate Mermaid diagrams by parsing + rendering them with the official Mermaid CLI.
Prerequisites
- Node.js + npm (for
).npx - First run downloads a headless Chromium via Puppeteer. If Chromium is missing, set
.PUPPETEER_EXECUTABLE_PATH
Tool
Validate a diagram
./tools/validate.sh diagram.mmd [output.svg]
- Parses and renders the Mermaid source.
- Non-zero exit = invalid Mermaid syntax.
- Prints an ASCII preview using
(best-effort; not all diagram types are supported).beautiful-mermaid - If
is omitted, the SVG is rendered to a temp file and discarded.output.svg
Workflow (short)
- If the diagram will live in Markdown: draft it in a standalone
first (the tool only validates plain Mermaid files).diagram.mmd - Write/update
.diagram.mmd - Run
../tools/validate.sh diagram.mmd - Fix any errors shown by the CLI.
- Once it validates, copy the Mermaid block into your Markdown file.