From imxv-pretty-mermaid-skills
Renders Mermaid diagrams as SVG or ASCII art with 15+ themes. Supports flowchart, sequence, state, class, and ER diagrams for documentation and terminal output.
How this skill is triggered — by the user, by Claude, or both
Slash command
/imxv-pretty-mermaid-skills:pretty-mermaidThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Render stunning, professionally-styled Mermaid diagrams with one command. Supports SVG for web/docs and ASCII for terminals.
Render stunning, professionally-styled Mermaid diagrams with one command. Supports SVG for web/docs and ASCII for terminals.
From a file:
node scripts/render.mjs \
--input diagram.mmd \
--output diagram.svg \
--format svg \
--theme tokyo-night
From user-provided Mermaid code:
.mmd filenode scripts/batch.mjs \
--input-dir ./diagrams \
--output-dir ./output \
--format svg \
--theme dracula \
--workers 4
node scripts/render.mjs \
--input diagram.mmd \
--format ascii \
--use-ascii
Step 1: What does the user want?
Step 2: Choose output format
--format svg--format asciiStep 3: Select theme
tokyo-night (recommended)github-lightdraculanode scripts/themes.mjsWhen 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 (Scalable Vector Graphics)
--format svg --output diagram.svgASCII (Terminal Art)
--format ascii (prints to stdout)--use-ascii - Use pure ASCII (no Unicode)--padding-x 5 - Horizontal spacing--padding-y 5 - Vertical spacingCustom Colors (overrides theme):
node scripts/render.mjs \
--input diagram.mmd \
--bg "#1a1b26" \
--fg "#a9b1d6" \
--accent "#7aa2f7" \
--output custom.svg
Transparent Background:
node scripts/render.mjs \
--input diagram.mmd \
--transparent \
--output transparent.svg
Custom Font:
node scripts/render.mjs \
--input diagram.mmd \
--font "JetBrains Mono" \
--output custom-font.svg
Step 1: List available templates
ls assets/example_diagrams/
# flowchart.mmd sequence.mmd state.mmd class.mmd er.mmd
Step 2: Copy and modify
cp assets/example_diagrams/flowchart.mmd my-workflow.mmd
# Edit my-workflow.mmd with user requirements
Step 3: Render
node scripts/render.mjs \
--input my-workflow.mmd \
--output my-workflow.svg \
--theme github-dark
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: Response
State - Application states, lifecycle, FSM
stateDiagram-v2
[*] --> Idle
Idle --> Loading
Loading --> [*]
Class - Object models, architecture, relationships
classDiagram
User --> Post: creates
Post --> Comment: has
ER - Database schema, data models
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ ORDER_ITEM : contains
Step 1: Identify diagram type
Step 2: Create diagram file
cat > user-diagram.mmd << 'EOF'
# [Insert generated Mermaid code]
EOF
Step 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-render
node scripts/themes.mjs
Output:
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 themes
For dark mode documentation:
tokyo-night ⭐ - Modern, developer-friendlygithub-dark - Familiar GitHub styledracula - Vibrant, high contrastnord - Cool, minimalistFor light mode documentation:
github-light - Clean, professionalzinc-light - High contrast, printablecatppuccin-latte - Warm, friendlyDetailed theme information: See THEMES.md
node scripts/render.mjs \
--input diagram.mmd \
--output themed.svg \
--theme tokyo-night
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"
done
Step 1: Organize diagrams
diagrams/
├── architecture.mmd
├── workflow.mmd
└── database.mmd
Step 2: Batch render
node scripts/batch.mjs \
--input-dir ./diagrams \
--output-dir ./rendered \
--format svg \
--theme tokyo-night \
--workers 4
Output:
Found 3 diagram(s) to render...
✓ architecture.mmd
✓ workflow.mmd
✓ database.mmd
3/3 diagrams rendered successfully
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-ascii
--workers N - Parallel rendering (default: 4)--workers 8 for 10+ diagrams# 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 \
--transparent
# 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-night
# User provides table definitions
# → Create er.mmd
# → Render for database docs
node scripts/render.mjs \
--input schema.mmd \
--output database-schema.svg \
--theme dracula
# For README or terminal display
node scripts/render.mjs \
--input workflow.mmd \
--format ascii \
--use-ascii > workflow.txt
# High-contrast for projectors
node scripts/render.mjs \
--input slides-diagram.mmd \
--output presentation.svg \
--theme zinc-light
Error: Cannot find module 'beautiful-mermaid'
Note: This should auto-install on first run. If it fails:
cd /path/to/pretty-mermaid-skill && npm install
Error: Parse error on line 3
Solution:
A --> BError: Input file not found: diagram.mmd
Solution: Verify file path is correct, use absolute path if needed
Executable Node.js scripts for rendering operations:
render.mjs - Main rendering scriptbatch.mjs - Batch processing scriptthemes.mjs - Theme listing utilityDocumentation 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 documentationTemplate 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 templatetokyo-night or github-dark for technical docs--transparentassets/example_diagrams/npx claudepluginhub imxv/pretty-mermaid-skillsRenders Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Supports flowchart, sequence, state, class, and ER diagrams with multiple themes.
Creates and refines Mermaid diagrams (flowcharts, sequence, class, ER, state, Gantt) with live preview and save tools. Supports iterative workflows with theme and format options.
Routes Mermaid diagram requests to type-specific guides (sequence, activity, ER, architecture); validates .md files, renders .mmd to SVG, architects from codebases.