by imxv
AI Agent Skill to generate and render beautiful Mermaid diagrams as SVG or terminal ASCII — 15 themes, 6 diagram types, batch CLI, no browser.
# Add to your Claude Code skills
git clone https://github.com/imxv/Pretty-mermaid-skillsGuides for using ai agents skills like Pretty-mermaid-skills.
Last scanned: 8/21/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-08-21T04:36:44.643Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}Pretty-mermaid-skills is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by imxv. AI Agent Skill to generate and render beautiful Mermaid diagrams as SVG or terminal ASCII — 15 themes, 6 diagram types, batch CLI, no browser. It has 1,131 GitHub stars.
Yes. Pretty-mermaid-skills passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/imxv/Pretty-mermaid-skills" and add it to your Claude Code skills directory (see the Installation section above). Pretty-mermaid-skills ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
Pretty-mermaid-skills is primarily written in JavaScript. It is open-source under imxv on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Pretty-mermaid-skills against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Create or render Mermaid diagrams with the bundled Node.js CLI. Use SVG for documentation and presentations; use ASCII or Unicode for terminals and plain text.
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.
.mmd file, preserving user terminology and relationships.Do not overwrite an existing source or output file unless the user asked for replacement.
| Need | Diagram type | Starter |
|---|---|---|
| Process, decision tree, architecture | Flowchart | flowchart LR |
| API calls, messages, interactions | Sequence | sequenceDiagram |
| Lifecycle or finite-state machine | State | stateDiagram-v2 |
| Classes, modules, relationships | Class | classDiagram |
| Database entities and cardinality | ER | erDiagram |
| Bars, lines, trends, comparisons | XY chart | xychart-beta |
Read references/DIAGRAM_TYPES.md when authoring non-trivial Mermaid syntax.
| Output | Best for | Notes |
|---|---|---|
| SVG | READMEs, docs, slides, websites | Scalable, themed, supports transparency |
| Unicode | Modern terminals and readable text previews | Default ASCII renderer output |
| Plain ASCII | Logs and restricted terminals | Add --use-ascii |
| ANSI-colored text | Interactive terminals | Set --color-mode |
Run these from <skill-root>.
node scripts/themes.mjs
node scripts/render.mjs \
--input diagram.mmd \
--output diagram.svg \
--theme tokyo-night
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.
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.
tokyo-nightgithub-dark, github-lightzinc-lightdraculanord, nord-lightRead references/THEMES.md or open docs/THEME_GALLERY.md when visual theme choice matters. A named theme can be refined with explicit color flags.
| Option | Purpose |
|---|---|
--theme <name> |
Apply one of the 15 built-in themes |
--bg, --fg |
Set required base colors |
--line, --accent, --muted |
Refine connectors, highlights, and secondary text |
--surface, --border |
Refine node fill and stroke |
--font <name> |
Set the SVG font family |
| Option | Purpose |
|---|---|
--transparent |
Remove 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 |
--interactive |
Enable XY chart hover tooltips |
| Option | Purpose |
|---|---|
--use-ascii |
Replace Unicode box drawing with plain ASCII |
--padding-x, --padding-y |
Tune diagram spacing |
--box-border-padding |
Tune 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.
LR for wide flows and TB for narrow documents.assets/example_diagrams/ and consult the diagram reference.After rendering:
<svg; confirm text output contains visible diagram content.Run both npm test and npm run validate when changing this skill, its scripts, templates, or references.
npm install in <skill-root>; the CLI also attempts a first-run install.node scripts/themes.mjs and use an exact listed name.references/DIAGRAM_TYPES.md, reduce to the failing statement, then restore the diagram incrementally.--node-spacing, --layer-spacing, or --component-spacing.--color-mode none.| Resource | Read or use when |
|---|---|
references/DIAGRAM_TYPES.md |
Authoring or debugging Mermaid syntax |
references/THEMES.md |
Comparing themes or defining custom colors |
references/api_reference.md |
Extending scripts or calling beautiful-mermaid directly |
docs/THEME_GALLERY.md |
Choosing a theme visually |
assets/example_diagrams/ |
Starting from a supported diagram template |
scripts/render.mjs |
Rendering one diagram |
scripts/batch.mjs |
Rendering a directory in parallel |
scripts/themes.mjs |
Listing installed themes |
Beautiful Mermaid diagrams for AI agents
Turn Mermaid source into polished SVGs and terminal-ready ASCII—locally, without a browser.

npx skills add imxv/pretty-mermaid-skills@pretty-mermaid -g -y
View the skill, install count, and security audits on skills.sh →
| Light Themes | Dark Themes | Other |
|---|---|---|
| zinc-light | zinc-dark | nord |
| tokyo-night-light | tokyo-night | nord-light |
| catppuccin-latte | tokyo-night-storm | dracula |
| github-light | catppuccin-mocha | one-dark |
| solarized-light | github-dark | |
| solarized-dark |
Compare the same flowchart across every built-in theme in the complete 15-theme gallery.
Seamlessly integrates with the following AI coding environments:
npx skills add imxv/pretty-mermaid-skills@pretty-mermaid -g -y
npx skills list -g
Confirm that pretty-mermaid appears in the global skill list. Node.js 16 or newer is required.
node scripts/themes.mjs
node scripts/render.mjs \
--input diagram.mmd \
--output output.svg \
--theme tokyo-night
node scripts/batch.mjs \
--input-dir ./diagrams \
--output-dir ./output \
--theme dracula
Check the 6 template files in assets/example_diagrams/:
flowchart.mmd - Flowchartsequence.mmd - Sequence Diagramstate.mmd - State Diagramclass.mmd - Class Diagramer.mmd - ER Diagramxychart.mmd - XY Chart (bar and line)The renderer also supports CJK state names, multiline labels, linkStyle, configurable ELK layout spacing, interactive XY chart tooltips, and ANSI-colored terminal output.
Read the contribution guide, report problems with the issue templates, and review the security policy before sharing sensitive findings. Release history is tracked in the changelog.
MIT License
Based on beautiful-mermaid