← ClaudeAtlas

mermaid-diagramlisted

Generate Mermaid diagrams from user requirements. Supports flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, and 18 more diagram types.
wookat/ai-research-skills · ★ 2 · AI & Automation · score 63
Install: claude install-skill wookat/ai-research-skills
# 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