skills/mermaid-live-preview/SKILL.md
Generate Mermaid diagram preview URLs for mermaid.live. Use when the user asks to preview, share, or create a link for a Mermaid diagram. Encodes Mermaid diagram code into a clickable mermaid.live/edit URL using pako (zlib) compression + URL-safe base64 encoding.
npx skillsauth add escapewu/skills mermaid-live-previewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate shareable preview URLs for Mermaid diagrams on mermaid.live.
The Mermaid Live Editor encodes diagram state into the URL hash using:
State object78 DA header)#pako: prefix in the URL fragmentThis skill provides scripts/encode.py to perform this encoding/decoding.
When the user has Mermaid diagram code (either inline, in a file, or generated during the conversation):
python3 scripts/encode.py "graph TD
A[Start] --> B{Decision}
B -->|Yes| C[OK]
B -->|No| D[Cancel]"
Or pipe from a .mmd file:
python3 scripts/encode.py < diagram.mmd
The script outputs two URLs:
https://mermaid.live/edit#pako:... — opens the editor with the diagram, user can modifyhttps://mermaid.live/view#pako:... — read-only preview, clean presentation for sharingPresent both to the user as clickable markdown links.
When the user provides a mermaid.live URL and wants to see the source code:
python3 scripts/encode.py --decode "https://mermaid.live/edit#pako:..."
encode.py with the code to get the URL[Edit on Mermaid Live](https://mermaid.live/edit#pako:...)[Preview on Mermaid Live](https://mermaid.live/view#pako:...)All Mermaid diagram types are supported, including:
graph TD, graph LR)sequenceDiagram)classDiagram)stateDiagram-v2)erDiagram)gantt)pie)gitGraph)mindmap)timeline)The default theme is "default". You can modify encode.py to use other Mermaid themes:
default - Standard themedark - Dark modeforest - Green tonesneutral - Grayscale.mmd file first, then pipe it to encode.pydevelopment
Use when working with the news fetcher REST API at <news-fetcher-host> for supported-site lookup, domain article discovery, URL fetching, batch fetch/crawl workflows, fetch history queries, and Bearer-authenticated integration examples.
development
create and refresh repository-specific development standards for an existing local codebase. use when the user wants to analyze a local repository, extract coding conventions from real files, generate docs/ai-dev-standards, create code review checklists, or update existing agents.md or claude.md files so future coding agents load the right standards before development. do not use for generic programming advice detached from a repository.
documentation
analyze postgresql or mysql database schemas from ddl files, schema-only dumps, migration sql, or read-only database metadata. use when the user wants table structure summaries, primary keys, foreign keys, indexes, inferred table relationships, er diagrams, dbml, mermaid erd, schema documentation, or database relationship analysis for postgres/mysql schemas.
tools
Replace with description of the skill and when Claude should use it.