PluginBench
Skill
Review
Audit score 70

pretty-mermaid

imxv/pretty-mermaid-skills

Render beautiful Mermaid diagrams as SVG or ASCII art with 15+ themes and ultra-fast batch processing.

What is pretty-mermaid?

Pretty Mermaid renders Mermaid diagrams in SVG or ASCII format with professional styling. Use it when you need to visualize flowcharts, sequence diagrams, state machines, class diagrams, or ER models with customizable themes and batch processing capabilities.

  • Render Mermaid diagrams to SVG (web/docs) or ASCII (terminal/plain text)
  • Support 15+ themes including tokyo-night, dracula, github-dark, nord, and catppuccin
  • Batch process multiple diagrams in parallel with configurable worker threads
  • Customize colors, fonts, backgrounds, and transparency for individual diagrams
  • Create diagrams from templates or user requirements with 5 diagram types (flowchart, sequence, state, class, ER)
  • Compare themes by rendering the same diagram with different styles

How to install pretty-mermaid

npx skills add https://github.com/imxv/pretty-mermaid-skills --skill pretty-mermaid
Prerequisites
  • Node.js installed
  • Mermaid diagram files (.mmd) or Mermaid code to render
Claude Code
Cursor
Windsurf
Cline

How to use pretty-mermaid

  1. 1.Save your Mermaid code to a .mmd file (or use provided templates from assets/example_diagrams/)
  2. 2.Choose output format: svg for web/docs or ascii for terminal/plain text
  3. 3.Select a theme using `node scripts/themes.mjs` to list all 15 available themes
  4. 4.Run render script: `node scripts/render.mjs --input diagram.mmd --output diagram.svg --theme tokyo-night`
  5. 5.For batch processing, use `node scripts/batch.mjs --input-dir ./diagrams --output-dir ./output --format svg --theme tokyo-night --workers 4`
  6. 6.Review output and iterate by editing the .mmd file and re-rendering as needed

Use cases

Good for
  • Generate architecture diagrams for technical documentation with professional styling
  • Create API sequence diagrams to visualize request/response flows and interactions
  • Render state machine diagrams for application lifecycle and FSM visualization
  • Batch convert a directory of Mermaid files to SVG for documentation sites
  • Generate ASCII diagrams for terminal output, README files, and plain text logs
Who it's for
  • Technical writers and documentation maintainers
  • Software architects designing system workflows and interactions
  • Backend developers visualizing API flows and state machines
  • DevOps engineers documenting infrastructure and deployment processes
  • Developers creating README files with ASCII diagrams

pretty-mermaid FAQ

What diagram types are supported?

Five diagram types: flowchart (processes/workflows), sequence (API calls/interactions), state (application states/lifecycle), class (object models/architecture), and ER (database schemas/data models).

Can I use custom colors instead of themes?

Yes, use --bg, --fg, and --accent flags to override theme colors, or use --transparent for a transparent background.

How do I render diagrams for terminal output?

Use --format ascii with optional --use-ascii flag for pure ASCII (no Unicode), and adjust spacing with --padding-x and --padding-y.

Can I batch render multiple diagrams at once?

Yes, use `node scripts/batch.mjs` with --input-dir and --output-dir flags. You can set --workers to control parallel processing (default 4).

What's the recommended theme for dark mode documentation?

tokyo-night is recommended for modern, developer-friendly styling. github-dark, dracula, and nord are also good dark mode options.

Full instructions (SKILL.md)

Source of truth, from imxv/pretty-mermaid-skills.


name: pretty-mermaid description: | 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.

Use this skill when:

  1. User asks to "render a mermaid diagram" or provides .mmd files
  2. User requests "create a flowchart/sequence diagram/state diagram"
  3. User wants to "apply a theme" or "beautify a diagram"
  4. User needs to "batch process multiple diagrams"
  5. User mentions "ASCII diagram" or "terminal-friendly diagram"
  6. User wants to visualize architecture, workflows, or data models

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

# User provides table definitions
# → Create er.mmd
# → Render for database docs

node scripts/render.mjs \
  --input schema.mmd \
  --output database-schema.svg \
  --theme dracula

4. Terminal-Friendly Workflow

# For README or terminal display
node scripts/render.mjs \
  --input workflow.mmd \
  --format ascii \
  --use-ascii > workflow.txt

5. Presentation Slides

# High-contrast for projectors
node scripts/render.mjs \
  --input slides-diagram.mmd \
  --output presentation.svg \
  --theme zinc-light

Troubleshooting

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 install

Invalid Mermaid Syntax

Error: Parse error on line 3

Solution:

  1. Validate syntax against DIAGRAM_TYPES.md
  2. Test on https://mermaid.live/
  3. Check for common errors:
    • Missing spaces in A --> B
    • Incorrect node shape syntax
    • Unclosed brackets

File Not Found

Error: Input file not found: diagram.mmd

Solution: Verify file path is correct, use absolute path if needed


Resources

scripts/

Executable Node.js scripts for rendering operations:

  • render.mjs - Main rendering script
  • batch.mjs - Batch processing script
  • themes.mjs - Theme listing utility

references/

Documentation to inform diagram creation:

  • THEMES.md - Detailed theme reference with examples
  • DIAGRAM_TYPES.md - Comprehensive syntax guide for all diagram types
  • api_reference.md - beautiful-mermaid API documentation

assets/

Template files for quick diagram creation:

  • example_diagrams/flowchart.mmd - Flowchart template
  • example_diagrams/sequence.mmd - Sequence diagram template
  • example_diagrams/state.mmd - State diagram template
  • example_diagrams/class.mmd - Class diagram template
  • example_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-night or github-dark for technical docs
  • Add transparency for dark/light mode compatibility: --transparent
  • Test theme in target environment before batch rendering

Workflow

  1. Start with templates from assets/example_diagrams/
  2. Iterate with user feedback
  3. Apply theme last
  4. 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

Related skills

More from imxv/pretty-mermaid-skills and the wider catalog.

vocabulary logo

vocabulary

index-how/vocabulary

The precise design and UI vocabulary used on index.how/to/articulate — covering typography, color, iconography, layout, interaction, motion, accessibility, information architecture, copywriting, tools, analysis, and components. Use when reaching for the exact word for a design concept ("what's the term for the space between two specific letters?"), when a UI idea is described loosely and needs its proper name, when choosing between confusable near-synonyms (badge vs tag, tooltip vs popover, opacity vs visibility, kerning vs tracking), or when writing or reviewing copy, specs, or commits and you want exact terminology instead of vague language.

653 installsAudited
agent-browser logo

agent-browser

inference-sh/skills

Browser automation for AI agents via inference.sh. Navigate web pages, interact with elements using @e refs, take screenshots, record video. Capabilities: web scraping, form filling, clicking, typing, drag-drop, file upload, JavaScript execution. Use for: web automation, data extraction, testing, agent browsing, research. Triggers: browser, web automation, scrape, navigate, click, fill form, screenshot, browse web, playwright, headless browser, web agent, surf internet, record video

828 installs
agent-tools logo

agent-tools

inference-sh/skills

Run 250+ AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

1.0k installs
agent-ui logo

agent-ui

inference-sh/skills

Batteries-included agent component for React/Next.js from ui.inference.sh. One component with runtime, tools, streaming, approvals, and widgets built in. Capabilities: drop-in agent, human-in-the-loop, client-side tools, form filling. Use for: building AI chat interfaces, agentic UIs, SaaS copilots, assistants. Triggers: agent component, agent ui, chat agent, shadcn agent, react agent, agentic ui, ai assistant ui, copilot ui, inference ui, human in the loop

602 installsAudited
ai-avatar-video logo

ai-avatar-video

inference-sh/skills

Create AI avatar and talking head videos via inference.sh CLI. Recommended: P-Video-Avatar (fastest, cheapest, built-in TTS). Also: OmniHuman, Fabric, PixVerse. Audio: Inworld TTS-2 (100+ languages, emotion steering for characters), ElevenLabs, Kokoro. Capabilities: audio-driven avatars, text-to-avatar, lipsync videos, talking head generation, virtual presenters, UGC content. Use for: AI presenters, explainer videos, virtual influencers, dubbing, marketing videos, UGC ads, gaming avatars, NPC dialogue. Triggers: ai avatar, talking head, lipsync, avatar video, virtual presenter, ai spokesperson, audio driven video, heygen alternative, synthesia alternative, talking avatar, lip sync, video avatar, ai presenter, digital human, ugc, ugc video, ugc ad, avatar ugc

682 installs
ai-image-generation logo

ai-image-generation

inference-sh/skills

Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image

995 installsAudited