mermaid-diagram

Generate Mermaid diagram code from requirements and verify via mmdc rendering.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/Shallow-W/llm-wiki --skill mermaid-diagram-shallow-w
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid-diagram
Source: https://github.com/Shallow-W/llm-wiki/tree/main/.claude/skills/mermaid-diagram
Command: npx skills add https://github.com/Shallow-W/llm-wiki --skill mermaid-diagram-shallow-w

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you quickly convert vague or detailed requirements into correct, reusable Mermaid diagram code without tedious manual syntax work.

Core Features & Use Cases

  • Generates Mermaid diagram code from requirements: Produces Mermaid source tailored to the requested diagram type and component relationships.
  • Writes preview-ready outputs: Saves both raw .mmd and preview .md files into the figures/ directory.
  • Verifies syntax via rendering: Uses Mermaid CLI (mmdc, or npx fallback) to render a PNG and catch syntax errors before you use the diagram.
  • Supports many diagram types: Covers flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, and more.

Quick Start

Ask it to generate a system architecture diagram from your description and ensure it outputs validated files into the figures/ folder.

Frequently Asked Questions about mermaid-diagram

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

FAQPage Schema
How do I generate Mermaid diagrams from text requirements?

To generate Mermaid diagrams from text, provide your requirements to get tailored Mermaid source code for flowcharts, sequence diagrams, or ER diagrams. The output includes validated `.mmd` and `.md` files saved directly into your `figures/` directory.

Can I use Mermaid CLI to verify diagram syntax before adding it to documentation?

Yes, verifying Mermaid diagram syntax uses the Mermaid CLI (`mmdc`, or an `npx` fallback) to render a PNG. If syntax errors occur, the generation process automatically refines the code through up to three iterations.

What is the best way to convert system architecture descriptions into Mermaid flowcharts?

The best way to convert architecture descriptions into Mermaid flowcharts is to submit the detailed component relationships to an automated generator. It produces diagram code matching your requested type and verifies correctness by rendering it.

Does generating Gantt charts and ER diagrams require manual syntax verification?

No, generating Gantt charts and ER diagrams does not require manual syntax verification. The process automatically checks correctness by rendering the Mermaid source with `mmdc` and iterates up to three times to resolve any syntax errors.

Why are my Mermaid diagrams not rendering correctly in markdown files?

Mermaid diagrams fail to render in markdown files due to syntax errors in the source code. Using a generation process that renders a PNG with `mmdc` before saving the preview `.md` file ensures the syntax is verified and correct.