Skip to content

Generates Mermaid diagrams from plain-language requirements, writing both raw .mmd and markdown-embedded files.

CCM score
61 of 100
skills.sh installs
608
GitHub stars
20.1K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers 23 diagram types, including flowcharts, sequence, class, ER, Gantt, C4, and architecture diagrams
  • Writes figures/<name>.mmd, figures/<name>.md, and a rendered .png via mmdc with kebab-case naming
  • Enforces a syntax check through Mermaid CLI with up to 3 fix iterations, then a strict visual review scored out of 10
  • Designed for documentation and design work that needs diagrams generated and checked without manual rendering

Install

$ npx -y skills add wanshuiyin/auto-claude-code-research-in-sleep --skill mermaid-diagram -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Mermaid Diagram Generator

Generate high-quality Mermaid diagram code based on user requirements, with file output and verification.

Constants

  • OUTPUT_DIR = figures/ — Output directory for all generated files

Workflow: MUST EXECUTE ALL STEPS

Step 0: Pre-flight Check

# Create output directory
mkdir -p figures

Step 1: Understand Requirements & Select Diagram Type

Parse the input: $ARGUMENTS

  1. Analyze user description to determine the most suitable diagram type
  2. Read the corresponding syntax reference documentation (see Step 2 below)
  3. If the diagram involves mathematical notation (formulas, equations, Greek letters, subscripts, superscripts, fractions, matrices, etc.), apply the math syntax rules from the Math Formulas in Diagrams section below
  4. Identify all components, connections, and data flow
  5. Plan the diagram structure

Step 2: Read Documentation

Select the appropriate diagram type based on the use case. Use your built-in knowledge of Mermaid syntax, or fetch up-to-date docs via the context7 MCP server if needed.

Details

Repository
github.com/wanshuiyin/auto-claude-code-research-in-sleep
Categories
Technical Documentation, Design & UI/UX
First seen
Jun 3, 2026

Questions

What does the mermaid-diagram skill generate?

The mermaid-diagram skill generates Mermaid diagram code from plain requirements, covering flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts and 18 more diagram types. It saves a raw .mmd source file and a markdown file with an embedded Mermaid block into a figures folder.

How do I install the mermaid-diagram skill?

Run npx -y skills add wanshuiyin/auto-claude-code-research-in-sleep --skill mermaid-diagram -y in your project to install it. After that, mermaid-diagram lets your agent turn a description of a system, process or timeline into verified Mermaid diagrams.

Does the mermaid-diagram skill need the Mermaid CLI installed?

mermaid-diagram verifies its output by running the Mermaid CLI (mmdc) when it is available, and falls back to npx with @mermaid-js/mermaid-cli if not. It then renders a PNG to check the syntax and reviews that image against the request.

Which skills lead the Technical Documentation category that mermaid-diagram belongs to?

In the Technical Documentation category, mermaid-diagram sits alongside domain-modeling, archify, writing-guidelines, design-doc-mermaid and documentation-and-adrs. What sets mermaid-diagram apart is its focus on generating and rendering Mermaid source across a wide range of diagram types.

More from wanshuiyin/auto-claude-code-research-in-sleep

All 41

Similar to Mermaid Diagram

More Technical Documentation