beautiful-mermaid
Skill0 starsChanged 10 months agoCC0-1.0View on GitHub
Render Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.
8 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- calesthio/OpenMontageword for word, first seen Nov 9, 2026
- OpenMontageInc/OpenMontageword for word, first seen Nov 8, 2026
- Gopyr/gopyr-skills-hubedited, first seen Oct 11, 2026
- jscraik/Agent-Skillstheir own version, first seen Sep 27, 2026
- LinHao-city/StoryMindword for word, first seen Jun 30, 2026
- tdimino/claude-code-minoantheir own version, first seen Apr 16, 2026
Other versions8 projects use a version of this.
Word for word · 3
- calesthio/OpenMontage★ 81k100% same
- OpenMontageInc/OpenMontage★ 81k100% same
- LinHao-city/StoryMind★ 10100% same
Edited · 1
- Gopyr/gopyr-skills-hub★ 047% same
Wrote their own version · 4
- tdimino/claude-code-minoan★ 41same name
- jscraik/Agent-Skills★ 9same name
- ethorneloe/claude-skills★ 0same name
- YunosukeYoshino/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- anki-connectSkill
- context7Skill
- copilot-sdkSkill
- gog-cliSkill
- gpt-image-1-5Skill
- here-be-gitSkill
- lorem-ipsumSkill
- markdown-converterSkill
- mgrep-code-searchSkill
- nano-banana-2Skill
- nano-banana-proSkill
- notion-apiSkill
- promptifySkill
- raindrop-apiSkill
- ray-so-code-snippetSkill
- tavilySkill
- todoist-apiSkill
- ultrathinkSkill
- upstash-redis-kvSkill
- youtube-transcriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 8 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Default, Dracula, Solarized, Zinc Dark, Tokyo Night, Tokyo Night Storm, Tokyo Night Light, Catppuccin Latte, Nord, Nord Light, GitHub Dark, …
- Very specific: line 26
If no theme is specified, use default.
- Distinctive: line 32
Use pipe syntax for edge labels:
- Distinctive: line 39
Avoid space-dash syntax which can cause incomplete renders:
- Very specific: line 58
If the user provides a description rather than code, generate valid Mermaid syntax.
- Distinctive: line 62
Run the rendering script to produce an SVG file:
- Distinctive: line 84
Run the HTML wrapper script to prepare for screenshot:
- Very specific: line 94
Use the agent-browser CLI to capture a high-quality screenshot.
- Very specific: line 117
After rendering, remove all intermediary files.
- Very specific: line 128
If a temporary .mmd file was created, remove it as well.
- Very specific: line 159
Check the render script output for the bg and fg values, or inspect the SVG's opening tag for --bg and --fg CSS custom properties.
- Very specific: line 163
Check edge label syntax — use -->|label| pipe notation, not -- label -->
- Distinctive: line 164
Verify all node IDs are unique
- Distinctive: line 165
Check for unclosed brackets in node labels
- Distinctive: line 170
Check for special characters that need escaping (wrap in quotes)
- Very specific: line 171
Ensure flowchart direction is specified (graph TD, graph LR, etc.)
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Beautiful Mermaid Diagram Rendering
Render Mermaid diagrams as SVG and PNG images using the Beautiful Mermaid library.
Dependencies
This skill requires the agent-browser skill for PNG rendering. Load it before proceeding with PNG capture.
Supported Diagram Types
- Flowchart - Process flows, decision trees, CI/CD pipelines
- Sequence - API calls, OAuth flows, database transactions
- State - State machines, connection lifecycles
- Class - UML class diagrams, design patterns
- Entity-Relationship - Database schemas, data models
Available Themes
Default, Dracula, Solarized, Zinc Dark, Tokyo Night, Tokyo Night Storm, Tokyo Night Light, Catppuccin Latte, Nord, Nord Light, GitHub Dark, GitHub Light, One Dark.
If no theme is specified, use default.
Common Syntax Patterns
Flowchart Edge Labels
Use pipe syntax for edge labels:
A -->|label| B
A ---|label| BAvoid space-dash syntax which can cause incomplete renders:
A -- label --> B # May cause issuesNode Labels with Special Characters
Wrap labels containing special characters in quotes:
A["Label with (parens)"]
B["Label with / slash"]Workflow
Step 1: Generate or Validate Mermaid Code
If the user provides a description rather than code, generate valid Mermaid syntax. Consult references/mermaid-syntax.md for full syntax details.
Step 2: Render SVG
Run the rendering script to produce an SVG file:
bun run scripts/render.ts --code "graph TD; A-->B" --output diagram --theme defaultOr from a file:
bun run scripts/render.ts --input diagram.mmd --output diagram --theme tokyo-nightAlternative runtimes:
npx tsx scripts/render.ts --code "..." --output diagram
deno run --allow-read --allow-write --allow-net scripts/render.ts --code "..." --output diagramThis produces <output>.svg in the current working directory.
Step 3: Create HTML Wrapper
Run the HTML wrapper script to prepare for screenshot:
bun run scripts/create-html.ts --svg diagram.svg --output diagram.htmlThis creates a minimal HTML file that displays the SVG with proper padding and background.
Step 4: Capture High-Resolution PNG with agent-browser
Use the agent-browser CLI to capture a high-quality screenshot. Refer to the agent-browser skill for full CLI documentation.
# Set 4K viewport for high-resolution capture
agent-browser set viewport 3840 2160
# Open the HTML wrapper
agent-browser open "file://$(pwd)/diagram.html"
# Wait for render to complete
agent-browser wait 1000
# Capture full-page screenshot
agent-browser screenshot --full diagram.png
# Close browser
agent-browser closeFor even higher resolution on complex diagrams, increase the viewport further or use the --padding option when creating the HTML wrapper to give the diagram more space.
Step 5: Clean Up Intermediary Files
After rendering, remove all intermediary files. Only the final .svg and .png should remain.
Files to clean up:
- The HTML wrapper file (e.g.,
diagram.html) - Any temporary
.mmdfiles created to hold diagram code - Any other files created during the rendering process
rm diagram.htmlIf a temporary .mmd file was created, remove it as well.
Output
Both outputs are always produced:
- SVG: Vector format, infinitely scalable, small file size
- PNG: High-resolution raster, captured at 4K (3840×2160) viewport with minimum 1200px diagram width
Files are saved to the current working directory unless the user explicitly specifies a different path.
Theme Selection Guide
| Theme | Background | Best For |
| default | Light grey | General use |
| dracula | Dark purple | Dark mode preference |
| tokyo-night | Dark blue | Modern dark aesthetic |
| tokyo-night-storm | Darker blue | Higher contrast |
| nord | Dark arctic | Muted, calm visuals |
| nord-light | Light arctic | Light mode with soft tones |
| github-dark | GitHub dark | Matches GitHub UI |
| github-light | GitHub light | Matches GitHub UI |
| catppuccin-latte | Warm light | Soft pastel aesthetic |
| solarized | Tan/cream | Solarized colour scheme |
| one-dark | Atom dark | Atom editor aesthetic |
| zinc-dark | Neutral dark | Minimal, no colour bias |
Troubleshooting
Theme not applied
Check the render script output for the bg and fg values, or inspect the SVG's opening tag for --bg and --fg CSS custom properties.
Diagram appears cut off or incomplete
- Check edge label syntax — use
-->|label|pipe notation, not-- label --> - Verify all node IDs are unique
- Check for unclosed brackets in node labels
Render produces empty or malformed SVG
- Validate Mermaid syntax at https://mermaid.live before rendering
- Check for special characters that need escaping (wrap in quotes)
- Ensure flowchart direction is specified (
graph TD,graph LR, etc.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

