What problem does it solve?
This skill helps you quickly convert diagram requirements into correct, ready-to-render Mermaid syntax, reducing the time spent manually writing and debugging diagrams.
Core Features & Use Cases
- Diagram-type selection from requirements: Automatically chooses among common Mermaid diagram types (flowcharts, sequence, class, ER, Gantt, and more) based on what you describe.
- Generates both preview and raw sources: Saves Mermaid code as both
figures/<diagram-name>.mmd (raw Mermaid) and figures/<diagram-name>.md (Markdown with an embedded mermaid block).
- Mandatory syntax verification loop: Renders with the Mermaid CLI (
mmdc) and iteratively fixes errors up to three refinement rounds.
- Math-aware labels: Applies KaTeX
$$...$$ rules when your diagram content includes formulas, Greek letters, subscripts/superscripts, matrices, and related notation.
Quick Start
Generate a validated Mermaid diagram for the following system behavior and save it under figures: a flowchart that shows how a patient’s lab results move from acquisition to storage and reporting, including decision points and error handling.