mermaid-cli

Convert Mermaid syntax diagrams into PNG, SVG, or PDF files.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/usadamasa/claude-config --skill mermaid-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid-cli
Source: https://github.com/usadamasa/claude-config/tree/main/dotclaude/skills/mermaid-cli
Command: npx skills add https://github.com/usadamasa/claude-config --skill mermaid-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the conversion of Mermaid syntax diagrams into various image formats, streamlining the process of visualizing code and system designs.

Core Features & Use Cases

  • Diagram to Image Conversion: Transforms text-based Mermaid diagrams into PNG, SVG, or PDF files.
  • Customizable Output: Allows for adjustments in resolution, background color, and theme.
  • Use Case: Quickly generate a PNG image of a flowchart defined in Mermaid syntax for inclusion in a presentation or documentation.

Quick Start

Convert the Mermaid diagram in 'diagram.mmd' to a PNG image named 'output.png' with a white background and high resolution.

Frequently Asked Questions about mermaid-cli

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

FAQPage Schema
How do I convert Mermaid diagrams to PNG or SVG images?

To convert Mermaid diagrams to PNG or SVG, this Skill uses the Mermaid CLI tool to transform text-based syntax into image files. It automates the rendering process, allowing you to generate PNG, SVG, or PDF outputs directly from your diagram definitions.

What is the best way to customize background color and resolution for Mermaid image conversion?

The best way to customize background color and resolution during Mermaid image conversion is through CLI options supported by this Skill. It allows specific adjustments to output resolution, background color, and themes before generating the final image file.

Do I need to install the mmdc executable to convert Mermaid syntax into a PDF?

Yes, you need the mmdc executable available to convert Mermaid syntax into a PDF. This Skill relies on the Mermaid CLI tool to process the diagrams and generate the output files, requiring the executable to be present in your environment.

Can I use a configuration file for font settings when exporting Mermaid diagrams?

Yes, you can use an optional configuration file for font settings when exporting Mermaid diagrams. This Skill supports passing a configuration file to the Mermaid CLI to customize rendering details like fonts alongside resolution and themes.

How do I automate generating high resolution PNG images from Mermaid flowcharts?

You automate generating high resolution PNG images from Mermaid flowcharts by running the Mermaid CLI conversion with specific resolution parameters. This Skill streamlines the task, taking Mermaid syntax and applying your custom resolution settings to produce the final image.