beautiful-mermaid

Render Mermaid diagrams into SVG and PNG images.

3|1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/edrouhardmicrosoft/agent-canvas-skills --skill beautiful-mermaid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: beautiful-mermaid
Source: https://github.com/edrouhardmicrosoft/agent-canvas-skills/tree/main/.agents/skills/beautiful-mermaid
Command: npx skills add https://github.com/edrouhardmicrosoft/agent-canvas-skills --skill beautiful-mermaid

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires beautiful-mermaid, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill makes it simple to turn Mermaid diagram descriptions into ready-to-use visuals (SVG and PNG) without manual rendering or tooling setup.

Core Features & Use Cases

  • Diagram rendering: Converts Flowchart, Sequence, State, Class, and ER diagrams to high-quality SVG and PNG outputs.
  • Theming & output options: Supports multiple themes for publication-ready visuals and adjustable output sizes for documentation or presentations.
  • Use Case: Imagine documenting a software system; you provide the Mermaid code and receive ready-to-use diagrams for documentation, slides, or bug reports.

Quick Start

bun run scripts/render.ts --code "graph TD; A-->B" --output example Or: bun run scripts/render.ts --input diagram.mmd --output diagram

Frequently Asked Questions about beautiful-mermaid

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render a Mermaid diagram to SVG or PNG?

To render a Mermaid diagram to SVG or PNG, you can execute the provided render script via bun with your Mermaid code or input file. The skill leverages the Beautiful Mermaid library to automatically generate ready-to-use image files without manual tooling setup.

Can I apply custom theming to Mermaid diagrams for documentation?

Yes, you can apply custom theming to Mermaid diagrams for publication-ready documentation. The skill supports multiple visual themes and adjustable output sizes, ensuring your Flowchart, Sequence, State, Class, and ER diagrams have consistent visuals across your documentation or presentations.

Does this skill support rendering all standard Mermaid diagram types?

Yes, this skill supports rendering common Mermaid diagram types including Flowchart, Sequence, State, Class, and ER diagrams. It processes these standard structural formats using an HTML wrapper to produce high-quality visual outputs.

How do I convert a .mmd file to an image using bun?

To convert a .mmd file to an image using bun, run the render script and pass the file path to the input argument. The skill processes the Mermaid syntax and outputs the corresponding SVG or PNG graphic, ready for immediate use in slides or reports.

What is the best way to automate Mermaid diagram rendering for bug reports?

The best way to automate Mermaid diagram rendering for bug reports is to pass diagram code directly to the render script via command line arguments. This approach instantly generates visual outputs, bypassing manual rendering steps and streamlining documentation workflows.

Do I need a browser agent to capture PNG output from Mermaid?

You need an optional agent-browser-based capture to produce PNG output from Mermaid diagrams. While SVG generation is handled directly through the HTML wrapper, capturing rasterized PNG images requires this browser-based component for accurate visual rendering.