pretty-mermaid

imxv/pretty-mermaid-skills · updated May 29, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/imxv/pretty-mermaid-skills --skill pretty-mermaid
0 commentsdiscussion
summary

Render Mermaid diagrams as SVG or ASCII with 15+ themes and 5 diagram types.

  • Supports five diagram types: flowchart, sequence, state, class, and ER diagrams for workflows, APIs, databases, and object models
  • Offers 15 built-in themes (tokyo-night, dracula, github-dark, nord, catppuccin, and more) with light and dark variants
  • Generates SVG output for web and documentation, or ASCII art for terminals and plain-text files
  • Batch rendering with parallel processing ( --workers flag) for
skill.md

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-night

From user-provided Mermaid code:

  1. Save the code to a .mmd file
  2. 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 4

ASCII Output (Terminal-Friendly)

node scripts/render.mjs \
  --input diagram.mmd \
  --format ascii \
  --use-ascii

Workflow Decision Tree

Step 1: What does the user want?

Step 2: Choose output format

  • SVG (web, docs, presentations) → --format svg
  • ASCII (terminal, logs, plain text) → --format ascii

Step 3: Select theme

  • Dark mode docstokyo-night (recommended)
  • Light mode docsgithub-light
  • Vibrant colorsdracula
  • See all themes → Run node scripts/themes.mjs

Rendering Diagrams

From File

When user provides a .mmd file or Mermaid code block:

  1. Save to file (if code block):

    cat > diagram.mmd << 'EOF'
    flowchart LR
        A[Start] --> B[End]
    EOF
    
  2. Render with theme:

    node scripts/render.mjs \
      --input diagram.mmd \
      --output diagram.svg \
      --theme tokyo-night
    
  3. 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.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

Creating Diagrams

Using Templates

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

Diagram 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: 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

From 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]
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

Theming

List Available Themes

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

Theme Selection Guide

For dark mode documentation:

  • tokyo-night ⭐ - Modern, developer-friendly
  • github-dark - Familiar GitHub style
  • dracula - Vibrant, high contrast
  • nord - Cool, minimalist

For light mode documentation:

  • github-light - Clean, professional
  • zinc-light - High contrast, printable
  • catppuccin-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-night

Compare 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"
done

Batch Rendering

Batch Render Directory

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

Batch 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-ascii

Performance Options

  • --workers N - Parallel rendering (default: 4)
  • Recommended: --workers 8 for 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 \
  --transparent

2. 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-night

3. Database Schema Visualization

how to use pretty-mermaid

How to use pretty-mermaid on Cursor

AI-first code editor with Composer

1

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 pretty-mermaid
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/imxv/pretty-mermaid-skills --skill pretty-mermaid

The skills CLI fetches pretty-mermaid from GitHub repository imxv/pretty-mermaid-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/pretty-mermaid

Reload or restart Cursor to activate pretty-mermaid. Access the skill through slash commands (e.g., /pretty-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

GET_STARTED →

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. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 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

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.849 reviews
  • Sophia Kim· Dec 28, 2024

    Keeps context tight: pretty-mermaid is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Diya Khanna· Dec 28, 2024

    Solid pick for teams standardizing on skills: pretty-mermaid is focused, and the summary matches what you get after install.

  • Arya Rahman· Dec 24, 2024

    Registry listing for pretty-mermaid matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Aisha Huang· Nov 19, 2024

    pretty-mermaid has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Carlos Bhatia· Nov 15, 2024

    pretty-mermaid reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Sophia Wang· Nov 15, 2024

    I recommend pretty-mermaid for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Dhruvi Jain· Nov 11, 2024

    Keeps context tight: pretty-mermaid is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Carlos White· Nov 11, 2024

    Keeps context tight: pretty-mermaid is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Aisha Torres· Oct 10, 2024

    pretty-mermaid fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Carlos Ghosh· Oct 6, 2024

    We added pretty-mermaid from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 49

1 / 5