mermaid

Validates Mermaid diagrams by parsing and rendering them with the official mermaid-cli.

3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/MaxWolf-01/agents --skill mermaid-maxwolf-01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid
Source: https://github.com/MaxWolf-01/agents/tree/main/mx/skills/mermaid
Command: npx skills add https://github.com/MaxWolf-01/agents --skill mermaid-maxwolf-01

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @mermaid-js/mermaid-cli, beautiful-mermaid.

What problem does it solve? Broken Mermaid syntax often goes unnoticed until a diagram fails to render in Markdown documentation, READMEs, or wikis. This Skill catches parse errors before publication by validating diagrams with the official Mermaid CLI. ## Core Features & Use Cases - Syntax Validation: Parses and renders .mmd files with @mermaid-js/mermaid-cli, surfacing the parser's exact error messages. - ASCII Preview: Renders a text-based preview of the diagram via beautiful-mermaid so you can sanity-check layout without opening a browser. - Optional SVG Output: Renders the diagram to an SVG file when an output path is provided. - Use Case: Before embedding a flowchart in a project README, draft it as diagram.mmd, run the validation script, fix any reported errors, then copy the verified Mermaid block into your Markdown file. ## Quick Start Ask the agent to validate your Mermaid diagram file, for example: "Validate my diagram.mmd file with the mermaid skill and fix any syntax errors."

Frequently Asked Questions about mermaid

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

FAQPage Schema
How do I validate a Mermaid diagram before adding it to Markdown?

Write the diagram in a standalone .mmd file and run the validate.sh script, which parses and renders it with the official mermaid-cli. Once it validates without errors, copy the Mermaid block into your Markdown file.

What tool checks Mermaid syntax from the command line?

The @mermaid-js/mermaid-cli package (mmdc) parses and renders Mermaid files from the command line, exiting nonzero with the parser's error message when syntax is invalid. This Skill's validate.sh script wraps it via npx.

Does Mermaid validation require Node.js installed?

Yes, the validation script requires Node.js and npx to run @mermaid-js/mermaid-cli. The first run also downloads a headless Chromium through Puppeteer, unless PUPPETEER_EXECUTABLE_PATH points to an installed browser.

Why does the Mermaid ASCII preview show a warning?

The ASCII preview uses beautiful-mermaid, which does not support every Mermaid diagram type. An unsupported type prints a warning rather than failing validation, since the official CLI render already confirmed the syntax is valid.

Can I render a Mermaid diagram to SVG from the command line?

Yes, pass an output path as the second argument to validate.sh and mermaid-cli renders the diagram to that SVG file. Without an output argument, the SVG goes to a temporary file that is deleted after validation.