pretty-mermaid
Skill1 starsChanged 7 months agoMITView on GitHub
Render beautiful Mermaid diagrams as SVG or ASCII art using the beautiful-mermaid library. Supports 15+ themes, 5 diagram types (flowchart, sequence, state, class, ER), and ultra-fast rendering.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ZeroTokenClaw/agents-skillsword for word, first seen Sep 21, 2026
- imxv/Pretty-mermaid-skillstheir own version, first seen Aug 22, 2026
Other versions2 projects use a version of this.
Word for word · 1
- ZeroTokenClaw/agents-skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 1
- imxv/Pretty-mermaid-skills★ 1.5ksame 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 repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectSkill
- arenaSkill
- autopilotSkill
- blast-radiusSkill
- brainstormSkill
- clarifySkill
- code-reviewSkill
- debug-errorSkill
- diagram-designSkill
- explain-codeSkill
- java-coderSkill
- owasp-securitySkill
- pdfSkill
- refactor-codeSkill
- reflectSkill
- skill-hunterSkill
- teachSkill
- technical-writingSkill
- test-coverageSkill
- typesafe-aiSkill
- typescript-coderSkill
- unslopSkill
- write-testsSkill
- wrongSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Run the render script with desired theme
- Very specific: line 83
When user provides a .mmd file or Mermaid code block:
- Distinctive: line 454
Test on https://mermaid.live/
- Distinctive: line 455
Check for common errors:
- Distinctive: line 464
Solution: Verify file path is correct, use absolute path if needed
- Distinctive: line 496
Keep diagrams under 50 nodes for fast rendering
- Distinctive: line 497
Use ASCII for quick previews
- Very specific: line 500
Use tokyo-night or github-dark for technical docs
- Very specific: line 501
Add transparency for dark/light mode compatibility: --transparent
- Distinctive: line 502
Test theme in target environment before batch rendering
- Very specific: line 505
Start with templates from assets/example_diagrams/
- Distinctive: line 511
Use high-contrast themes for presentations
- Distinctive: line 512
Add text labels to all connections
- Distinctive: line 513
Avoid color-only information encoding
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pretty Mermaid
Render stunning, professionally-styled Mermaid diagrams with one command. Supports SVG for web/docs and ASCII for terminals.
Quick Start
Render a Single Diagram
From a file:
node scripts/render.mjs \
--input diagram.mmd \
--output diagram.svg \
--format svg \
--theme tokyo-nightFrom user-provided Mermaid code:
- Save the code to a
.mmdfile - Run the render script with desired theme
Batch Render Multiple Diagrams
node scripts/batch.mjs \
--input-dir ./diagrams \
--output-dir ./output \
--format svg \
--theme dracula \
--workers 4ASCII Output (Terminal-Friendly)
node scripts/render.mjs \
--input diagram.mmd \
--format ascii \
--use-asciiWorkflow Decision Tree
Step 1: What does the user want?
- Render existing Mermaid code → Go to Rendering
- Create new diagram → Go to Creating
- Apply/change theme → Go to Theming
- Batch process → Go to Batch Rendering
Step 2: Choose output format
- SVG (web, docs, presentations) →
--format svg - ASCII (terminal, logs, plain text) →
--format ascii
Step 3: Select theme
- Dark mode docs →
tokyo-night(recommended) - Light mode docs →
github-light - Vibrant colors →
dracula - See all themes → Run
node scripts/themes.mjs
Rendering Diagrams
From File
When user provides a .mmd file or Mermaid code block:
- Save to file (if code block):
cat > diagram.mmd << 'EOF' flowchart LR A[Start] --> B[End] EOF - Render with theme:
node scripts/render.mjs \ --input diagram.mmd \ --output diagram.svg \ --theme tokyo-night - Verify output:
- SVG: Open in browser or embed in docs
- ASCII: Display in terminal
Output Formats
SVG (Scalable Vector Graphics)
- Best for: Web pages, documentation, presentations
- Features: Full color support, transparency, scalable
- Usage:
--format svg --output diagram.svg
ASCII (Terminal Art)
- Best for: Terminal output, plain text logs, README files
- Features: Pure text, works anywhere, no dependencies
- Usage:
--format ascii(prints to stdout) - Options:
--use-ascii- Use pure ASCII (no Unicode)--padding-x 5- Horizontal spacing--padding-y 5- Vertical spacing
Advanced Options
Custom Colors (overrides theme):
node scripts/render.mjs \
--input diagram.mmd \
--bg "#1a1b26" \
--fg "#a9b1d6" \
--accent "#7aa2f7" \
--output custom.svgTransparent Background:
node scripts/render.mjs \
--input diagram.mmd \
--transparent \
--output transparent.svgCustom Font:
node scripts/render.mjs \
--input diagram.mmd \
--font "JetBrains Mono" \
--output custom-font.svgCreating Diagrams
Using Templates
Step 1: List available templates
ls assets/example_diagrams/
# flowchart.mmd sequence.mmd state.mmd class.mmd er.mmdStep 2: Copy and modify
cp assets/example_diagrams/flowchart.mmd my-workflow.mmd
# Edit my-workflow.mmd with user requirementsStep 3: Render
node scripts/render.mjs \
--input my-workflow.mmd \
--output my-workflow.svg \
--theme github-darkDiagram Type Reference
For detailed syntax and best practices, see DIAGRAM_TYPES.md.
Quick reference:
Flowchart - Processes, workflows, decision trees
flowchart LR
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]Sequence - API calls, interactions, message flows
sequenceDiagram
User->>Server: Request
Server-->>User: ResponseState - Application states, lifecycle, FSM
stateDiagram-v2
[*] --> Idle
Idle --> Loading
Loading --> [*]Class - Object models, architecture, relationships
classDiagram
User --> Post: creates
Post --> Comment: hasER - Database schema, data models
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ ORDER_ITEM : containsFrom User Requirements
Step 1: Identify diagram type
- Process/workflow → Flowchart
- API/interaction → Sequence
- States/lifecycle → State
- Object model → Class
- Database → ER
Step 2: Create diagram file
cat > user-diagram.mmd << 'EOF'
# [Insert generated Mermaid code]
EOFStep 3: Render and iterate
node scripts/render.mjs \
--input user-diagram.mmd \
--output preview.svg \
--theme tokyo-night
# Review with user, edit diagram.mmd if needed, re-renderTheming
List Available Themes
node scripts/themes.mjsOutput:
Available Beautiful-Mermaid Themes:
1. zinc-light
2. zinc-dark
3. tokyo-night
4. tokyo-night-storm
5. tokyo-night-light
6. catppuccin-mocha
7. catppuccin-latte
8. nord
9. nord-light
10. dracula
11. github-dark
12. github-light
13. solarized-dark
14. solarized-light
15. one-dark
Total: 15 themesTheme Selection Guide
For dark mode documentation:
tokyo-night⭐ - Modern, developer-friendlygithub-dark- Familiar GitHub styledracula- Vibrant, high contrastnord- Cool, minimalist
For light mode documentation:
github-light- Clean, professionalzinc-light- High contrast, printablecatppuccin-latte- Warm, friendly
Detailed theme information: See THEMES.md
Apply Theme to Diagram
node scripts/render.mjs \
--input diagram.mmd \
--output themed.svg \
--theme tokyo-nightCompare Themes
Render the same diagram with multiple themes:
for theme in tokyo-night dracula github-dark; do
node scripts/render.mjs \
--input diagram.mmd \
--output "diagram-${theme}.svg" \
--theme "$theme"
doneBatch Rendering
Batch Render Directory
Step 1: Organize diagrams
diagrams/
├── architecture.mmd
├── workflow.mmd
└── database.mmdStep 2: Batch render
node scripts/batch.mjs \
--input-dir ./diagrams \
--output-dir ./rendered \
--format svg \
--theme tokyo-night \
--workers 4Output:
Found 3 diagram(s) to render...
✓ architecture.mmd
✓ workflow.mmd
✓ database.mmd
3/3 diagrams rendered successfullyBatch with Multiple Formats
Render both SVG and ASCII:
# SVG for docs
node scripts/batch.mjs \
--input-dir ./diagrams \
--output-dir ./svg \
--format svg \
--theme github-dark
# ASCII for README
node scripts/batch.mjs \
--input-dir ./diagrams \
--output-dir ./ascii \
--format ascii \
--use-asciiPerformance Options
--workers N- Parallel rendering (default: 4)- Recommended:
--workers 8for 10+ diagrams
Common Use Cases
1. Architecture Diagram for Documentation
# User provides architecture description
# → Create flowchart.mmd
# → Render with professional theme
node scripts/render.mjs \
--input architecture.mmd \
--output docs/architecture.svg \
--theme github-dark \
--transparent2. API Sequence Diagram
# User describes API flow
# → Create sequence.mmd
# → Render with clear theme
node scripts/render.mjs \
--input api-flow.mmd \
--output api-sequence.svg \
--theme tokyo-night3. Database Schema Visualization
# User provides table definitions
# → Create er.mmd
# → Render for database docs
node scripts/render.mjs \
--input schema.mmd \
--output database-schema.svg \
--theme dracula4. Terminal-Friendly Workflow
# For README or terminal display
node scripts/render.mjs \
--input workflow.mmd \
--format ascii \
--use-ascii > workflow.txt5. Presentation Slides
# High-contrast for projectors
node scripts/render.mjs \
--input slides-diagram.mmd \
--output presentation.svg \
--theme zinc-lightTroubleshooting
beautiful-mermaid Not Installed
Error: Cannot find module 'beautiful-mermaid'Note: This should auto-install on first run. If it fails:
cd /path/to/pretty-mermaid-skill && npm installInvalid Mermaid Syntax
Error: Parse error on line 3Solution:
- Validate syntax against DIAGRAM_TYPES.md
- Test on https://mermaid.live/
- Check for common errors:
- Missing spaces in
A --> B - Incorrect node shape syntax
- Unclosed brackets
- Missing spaces in
File Not Found
Error: Input file not found: diagram.mmdSolution: Verify file path is correct, use absolute path if needed
Resources
scripts/
Executable Node.js scripts for rendering operations:
render.mjs- Main rendering scriptbatch.mjs- Batch processing scriptthemes.mjs- Theme listing utility
references/
Documentation to inform diagram creation:
THEMES.md- Detailed theme reference with examplesDIAGRAM_TYPES.md- Comprehensive syntax guide for all diagram typesapi_reference.md- beautiful-mermaid API documentation
assets/
Template files for quick diagram creation:
example_diagrams/flowchart.mmd- Flowchart templateexample_diagrams/sequence.mmd- Sequence diagram templateexample_diagrams/state.mmd- State diagram templateexample_diagrams/class.mmd- Class diagram templateexample_diagrams/er.mmd- ER diagram template
Tips & Best Practices
Performance
- Batch render for 3+ diagrams (parallel processing)
- Keep diagrams under 50 nodes for fast rendering
- Use ASCII for quick previews
Quality
- Use
tokyo-nightorgithub-darkfor technical docs - Add transparency for dark/light mode compatibility:
--transparent - Test theme in target environment before batch rendering
Workflow
- Start with templates from
assets/example_diagrams/ - Iterate with user feedback
- Apply theme last
- Render both SVG (docs) and ASCII (README) if needed
Accessibility
- Use high-contrast themes for presentations
- Add text labels to all connections
- Avoid color-only information encoding
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.

