PluginBench
Skill
Review
Audit score 70

pretty-mermaid

imxv/pretty-mermaid-skills

Generate and render Mermaid diagrams as themed SVG, PNG, or terminal-friendly ASCII/Unicode art.

What is pretty-mermaid?

Pretty Mermaid is a Node.js CLI skill for creating and rendering Mermaid diagrams locally without a browser. Use it when you need flowcharts, sequence diagrams, state machines, ERDs, or architecture visualizations for documentation, READMEs, terminals, or CI pipelines.

  • Render Mermaid diagrams to SVG, PNG, or ASCII/Unicode text formats
  • Apply one of 15 built-in themes or customize colors explicitly
  • Batch-convert multiple diagrams in parallel with consistent styling
  • Generate terminal-friendly ASCII or Unicode output with optional ANSI color modes
  • Support flowcharts, sequence diagrams, state machines, class diagrams, ERDs, and XY charts
  • Fine-tune layout with node spacing, layer spacing, padding, and component separation options

How to install pretty-mermaid

npx skills add https://github.com/imxv/pretty-mermaid-skills --skill pretty-mermaid
Prerequisites
  • Node.js installed
  • npm install run in the skill root directory (scripts attempt first-run install automatically)
Claude Code
Cursor
Windsurf
Cline

How to use pretty-mermaid

  1. 1.Create or obtain a Mermaid diagram source file (.mmd) or write Mermaid syntax
  2. 2.Choose your output format (SVG for docs, PNG for sharing, ASCII/Unicode for terminals)
  3. 3.Select a theme from the 15 built-in options or define custom colors
  4. 4.Run the render script with your input file, output path, format, and theme options
  5. 5.Inspect the output and adjust spacing, colors, or syntax as needed
  6. 6.For multiple diagrams, use batch.mjs to render a directory with consistent options

Use cases

Good for
  • Generate architecture diagrams for README files and technical documentation
  • Create flowcharts and decision trees for process documentation or proposals
  • Render sequence diagrams for API interaction or message flow documentation
  • Build ERDs and class diagrams for database or code structure visualization
  • Output terminal-compatible ASCII diagrams for CI logs or plain-text previews
Who it's for
  • Technical writers and documentation maintainers
  • Software architects designing system flows and interactions
  • Developers embedding diagrams in code repositories and pull requests
  • DevOps engineers visualizing CI/CD pipelines and infrastructure
  • Teams needing accessible terminal-friendly diagram output

pretty-mermaid FAQ

What diagram types does Pretty Mermaid support?

Flowcharts, sequence diagrams, state machines, class diagrams, entity-relationship diagrams (ERD), and XY charts. See references/DIAGRAM_TYPES.md for syntax details.

Can I use custom colors instead of built-in themes?

Yes. Use explicit color flags like --bg, --fg, --line, --accent, --surface, and --border to override or refine any theme.

How do I render diagrams for terminal output?

Use --format ascii with --color-mode none for plain text, or --format ascii with --color-mode ansi256 for colored terminal output. Unicode box-drawing is the default; add --use-ascii for restricted terminals.

Do I need a browser or internet connection to render diagrams?

No. Pretty Mermaid runs entirely locally via Node.js CLI with no external dependencies or DOM requirements.

How do I batch-convert multiple diagrams at once?

Use scripts/batch.mjs with --input-dir, --output-dir, --format, --theme, and --workers options to render a directory in parallel.

Full instructions (SKILL.md)

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


name: pretty-mermaid description: | Generate and render Mermaid diagrams for architecture docs, READMEs, PRs, terminals, chats, and CI as themed SVG, PNG, or ASCII/Unicode art. Use this skill whenever the user provides Mermaid code or .mmd files; asks for a flowchart, sequence/state/class diagram, ERD, XY chart, or architecture/workflow/data-model visualization; or wants to beautify, theme, batch-convert, or make a diagram terminal-friendly. Runs locally without a browser or DOM, with 15 built-in themes and custom colors.

Pretty Mermaid

Create or render Mermaid diagrams with the bundled Node.js CLI. Use SVG for scalable documentation, PNG for sharing or raster-only consumers, and ASCII or Unicode for terminals and plain text.

Working directory

Treat the directory containing this file as <skill-root>. Run bundled scripts from that directory, or invoke them with absolute paths. Keep user source and rendered output in the user's requested location; do not copy the renderer into their project.

Workflow

  1. Determine whether the user supplied Mermaid source or needs a diagram authored from prose.
  2. Choose the diagram type and output format from the tables below.
  3. Read only the relevant reference file when syntax, theme selection, or API behavior needs more detail.
  4. Save new source as a .mmd file, preserving user terminology and relationships.
  5. Render with a named theme or explicit colors.
  6. Inspect the result. Fix syntax, clipping, crowded layout, or unclear labels and render again.
  7. Return the source and output paths, plus the selected format and theme.

Do not overwrite an existing source or output file unless the user asked for replacement.

Choose a diagram type

NeedDiagram typeStarter
Process, decision tree, architectureFlowchartflowchart LR
API calls, messages, interactionsSequencesequenceDiagram
Lifecycle or finite-state machineStatestateDiagram-v2
Classes, modules, relationshipsClassclassDiagram
Database entities and cardinalityERerDiagram
Bars, lines, trends, comparisonsXY chartxychart-beta

Read references/DIAGRAM_TYPES.md when authoring non-trivial Mermaid syntax.

Choose an output

OutputBest forNotes
SVGREADMEs, docs, slides, websitesScalable, themed, supports transparency
PNGChats, previews, raster-only toolsSet --format png; no external converter required
UnicodeModern terminals and readable text previewsDefault ASCII renderer output
Plain ASCIILogs and restricted terminalsAdd --use-ascii
ANSI-colored textInteractive terminalsSet --color-mode

Core commands

Run these from <skill-root>.

List themes

node scripts/themes.mjs

Render SVG

node scripts/render.mjs \
  --input diagram.mmd \
  --output diagram.svg \
  --theme tokyo-night

Render terminal text

node scripts/render.mjs \
  --input diagram.mmd \
  --output diagram.txt \
  --format ascii \
  --color-mode none

Add --use-ascii when Unicode box-drawing characters are not acceptable.

Render PNG

node scripts/render.mjs \
  --input diagram.mmd \
  --output diagram.png \
  --format png \
  --width 1200 \
  --theme tokyo-night

Batch render a directory

node scripts/batch.mjs \
  --input-dir ./diagrams \
  --output-dir ./rendered \
  --format svg \
  --theme github-dark \
  --workers 4

Use batch rendering for three or more diagrams or when consistent options must be applied to a directory.

Theme selection

  • General dark documentation: tokyo-night
  • GitHub dark or light surfaces: github-dark, github-light
  • Print and presentations: zinc-light
  • High-contrast color: dracula
  • Cool, restrained palette: nord, nord-light

Read references/THEMES.md or open docs/THEME_GALLERY.md when visual theme choice matters. A named theme can be refined with explicit color flags.

Useful options

Shared styling

OptionPurpose
--theme <name>Apply one of the 15 built-in themes
--bg, --fgSet required base colors
--line, --accent, --mutedRefine connectors, highlights, and secondary text
--surface, --borderRefine node fill and stroke
--font <name>Set the SVG font family

SVG

OptionPurpose
--transparentRemove the SVG background
--padding <n>Set canvas padding
--node-spacing <n>Set horizontal node spacing
--layer-spacing <n>Set vertical layer spacing
--component-spacing <n>Separate disconnected components
--interactiveEnable XY chart hover tooltips

PNG

OptionPurpose
--width <n>Set output width from 100 to 10000 pixels while preserving aspect ratio
--transparentPreserve a transparent background

Terminal output

OptionPurpose
--use-asciiReplace Unicode box drawing with plain ASCII
--padding-x, --padding-yTune diagram spacing
--box-border-paddingTune padding inside node boxes
--color-mode <mode>none, auto, ansi16, ansi256, truecolor, or html

Run node scripts/render.mjs --help or node scripts/batch.mjs --help for the authoritative CLI list.

Authoring guidance

  • Prefer short, concrete labels; preserve domain-specific terms from the user.
  • Use explicit edge labels when a branch or message is ambiguous.
  • Keep large diagrams readable by splitting unrelated concerns instead of shrinking text.
  • Use LR for wide flows and TB for narrow documents.
  • Avoid communicating meaning through color alone.
  • Use a light theme for print and confirm contrast against the final background.
  • For unfamiliar syntax, start from assets/example_diagrams/ and consult the diagram reference.

Validation

After rendering:

  1. Confirm the command exits successfully and the output file is non-empty.
  2. Confirm SVG output begins with <svg; confirm PNG output opens as a valid image; confirm text output contains visible diagram content.
  3. Inspect visual output when layout matters, especially long labels, CJK text, disconnected components, and XY charts.
  4. Confirm arrows, cardinalities, states, and labels match the source request.
  5. Report any renderer limitation instead of silently dropping unsupported syntax.

Run both npm test and npm run validate when changing this skill, its scripts, templates, or references.

Troubleshooting

  • Missing dependency: run npm install in <skill-root>; the CLI also attempts a first-run install.
  • Unknown theme: run node scripts/themes.mjs and use an exact listed name.
  • Parse error: consult references/DIAGRAM_TYPES.md, reduce to the failing statement, then restore the diagram incrementally.
  • Crowded SVG: increase --node-spacing, --layer-spacing, or --component-spacing.
  • PNG color error: use concrete hex values for custom colors; unresolved external CSS variables cannot be rasterized.
  • Terminal color escape codes in redirected output: use --color-mode none.

Reference routing

ResourceRead or use when
references/DIAGRAM_TYPES.mdAuthoring or debugging Mermaid syntax
references/THEMES.mdComparing themes or defining custom colors
references/api_reference.mdExtending scripts or calling beautiful-mermaid directly
docs/THEME_GALLERY.mdChoosing a theme visually
assets/example_diagrams/Starting from a supported diagram template
scripts/render.mjsRendering one diagram
scripts/batch.mjsRendering a directory in parallel
scripts/themes.mjsListing installed themes

Related skills

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

VOvocabulary 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
AGagent-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
AIai-image-generation logo

ai-image-generation

inference-sh/skills

Generate AI images with GPT-Image-2.5, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2.5 Flare, GPT-Image-2.5 Sunburst, 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

14 installs
AIai-video-generation logo

ai-video-generation

inference-sh/skills

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

14 installs
GPgpt-image logo

gpt-image

inference-sh/skills

Generate and edit images with OpenAI GPT-Image-2.5 and GPT-Image-2 via inference.sh CLI. Models: GPT-Image-2.5 Flare, GPT-Image-2.5 Sunburst, GPT-Image-2. Capabilities: text-to-image, image editing, inpainting, mask-based editing, multi-image reference, batch generation, transparent backgrounds. Use for: product mockups, marketing visuals, image editing, concept art, inpainting, photo manipulation. Triggers: gpt image, gpt-image-2.5, gpt image 2.5, flare, sunburst, gpt-image-2, openai image, chatgpt image, dall-e, dalle, openai image generation, gpt image edit, gpt inpainting, openai dall-e, gpt 4o image, transparent background, transparent png, remove background

9 installs
TWtwitter-automation logo

twitter-automation

inference-sh/skills

Automate Twitter/X with posting, engagement, and user management via inference.sh CLI. Apps: x/post-create (text and media), x/post-like, x/post-retweet, x/dm-send, x/user-follow. Capabilities: post tweets, schedule content, like posts, retweet, send DMs, follow users, get profiles. Use for: social media automation, content scheduling, engagement bots, audience growth, X API. Triggers: twitter api, x api, tweet automation, post to twitter, twitter bot, social media automation, x automation, tweet scheduler, twitter integration, post tweet, twitter post, x post, send tweet

14 installs