Pretty Mermaid logo

Pretty Mermaid

CommunityPopular
imxv
pretty-mermaid

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.

Overview

Publisherimxv
RepositoryPretty-mermaid-skills
Skill namepretty-mermaid
Stars
1.2K
Forks
64
Bundled files
43
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 43 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by imxv on GitHub. Read the source before you install it.

Installation

Install the Pretty Mermaid AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/imxv/Pretty-mermaid-skills.git \
  .claude/skills/pretty-mermaid
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pretty Mermaid in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pretty Mermaid on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pretty Mermaid is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

bash
node scripts/themes.mjs

Render SVG

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

Render terminal text

bash
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

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

Batch render a directory

bash
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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pretty Mermaid AI skill do?

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.

Why use Pretty Mermaid on TypingMind?

Because you install it once and use it with any model. Pretty Mermaid is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pretty Mermaid in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/imxv/Pretty-mermaid-skills/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pretty Mermaid?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pretty Mermaid?

As many as you like. As long as a model supports skills, you can use Pretty Mermaid with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pretty Mermaid AI skill free?

Yes. It is published on GitHub by imxv under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇