← ClaudeAtlas

mermaid-viewerlisted

Use this skill when the user has a Mermaid source file (.mmd) and wants to view it in a browser -- asking to convert mermaid to html, render this diagram, make an HTML viewer, or make the schema explorable. Don't use it for generating new diagrams from scratch or exporting to PNG/PDF.
atretyak1985/swarmery · ★ 4 · AI & Automation · score 76
Install: claude install-skill atretyak1985/swarmery
# Purpose Materialise any Mermaid diagram source (`.mmd`) into a themed, interactive HTML viewer — one self-contained file with pan/zoom, ER entity search, and a source-download button. Mermaid 11.4.1 and svg-pan-zoom 3.6.2 load from jsDelivr at runtime; styling is a dark-terminal design system consistent with the `html-reporting` shell. ER-specific features no-op for other diagram types. # Rules - Colors in `mermaid.initialize()` config must be hex or rgba, never OKLCH — Mermaid's color parser (khroma) does not support it; violation gives a blank viewport. - Mermaid source stays in `<script id="mmd-source" type="text/plain">`, never `<pre class="mermaid">`, or the download button returns SVG. - `build.sh` substitutes sentinels with POSIX `awk`, never `sed` — Mermaid source breaks `sed`. - Playwright verification navigates via `http://localhost:<port>`, never `file://`; always `verify.sh stop <port>` afterwards. - Never bump the pinned deps (mermaid 11.4.1, svg-pan-zoom 3.6.2) without re-running `test.sh` + `verify.sh` + Playwright on a real fixture. - Fix bugs in `templates/viewer.html.tpl`, regenerate, refresh the golden (`test.sh --update`) — never patch generated HTML in isolation. # Resources - Read `resources/build-procedure.md` when running the pipeline — inputs/outputs, the four-step procedure, script reference, self-check, escalation, examples, file layout. - Read `resources/gotchas-and-pinned-deps.md` when debugging rendering or touching the template — the five