mermaid-diagram

Featured

Generate Mermaid diagrams from user requirements. Supports flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, and 18 more diagram types.

AI & Automation 16,018 stars 1375 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 - **MAX_ITERATIONS = 3** — Maximum refinement rounds for syntax errors ## Workflow: MUST EXECUTE ALL STEPS ### Step 0: Pre-flight Check ```bash # 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 Diagram Type Reference 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. | Type | Use Cases | | ---- | --------- | | Flowchart | Processes, decisions, steps | | Sequence Diagram | Interactions, messaging, API calls | | Class Diagram | Class structure, inheritance, associations | | State Diagram | State machines, state transitions | | ER Diagram | Database design, entity relationship...

Details

Author
wanshuiyin
Repository
wanshuiyin/Auto-claude-code-research-in-sleep
Created
6 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category