beautiful-mermaid▌
intellectronica/agent-skills · updated May 29, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Render Mermaid diagrams as SVG and PNG images with theme customization.
- ›Supports five diagram types: flowchart, sequence, state, class, and entity-relationship diagrams
- ›Produces both vector SVG (scalable) and high-resolution PNG (4K viewport) outputs in a single workflow
- ›Includes 13 built-in themes (default, Dracula, Tokyo Night, Nord, GitHub, Catppuccin, Solarized, One Dark, Zinc Dark)
- ›Requires agent-browser skill for PNG capture; uses Bun, Node, or Deno for SVG rendering
- ›Prov
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| B
Avoid space-dash syntax which can cause incomplete renders:
A -- label --> B # May cause issues
Node 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 default
Or from a file:
bun run scripts/render.ts --input diagram.mmd --output diagram --theme tokyo-night
Alternative runtimes:
npx tsx scripts/render.ts --code "..." --output diagram
deno run --allow-read --allow-write --allow-net scripts/render.ts --code "..." --output diagram
This 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.html
This 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 close
For 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.html
If 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.)
How to use beautiful-mermaid on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add beautiful-mermaid
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches beautiful-mermaid from GitHub repository intellectronica/agent-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate beautiful-mermaid. Access the skill through slash commands (e.g., /beautiful-mermaid) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★64 reviews- ★★★★★Yuki Kapoor· Dec 20, 2024
Solid pick for teams standardizing on skills: beautiful-mermaid is focused, and the summary matches what you get after install.
- ★★★★★Ama Abebe· Dec 20, 2024
beautiful-mermaid has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Aisha Gupta· Dec 16, 2024
Keeps context tight: beautiful-mermaid is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Meera Bhatia· Dec 16, 2024
Useful defaults in beautiful-mermaid — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Chaitanya Patil· Dec 12, 2024
beautiful-mermaid has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Yuki Abebe· Dec 12, 2024
Registry listing for beautiful-mermaid matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Yuki Brown· Nov 11, 2024
Keeps context tight: beautiful-mermaid is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Zaid Gupta· Nov 7, 2024
beautiful-mermaid has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Jin Torres· Nov 7, 2024
beautiful-mermaid is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Piyush G· Nov 3, 2024
Keeps context tight: beautiful-mermaid is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 64