This skill should be used when creating, editing, or debugging Mermaid diagrams. It provides comprehensive syntax references for all 20+ Mermaid diagram types including flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, and more. Use this skill when users ask for diagrams, visualizations, flowcharts, or any Mermaid-related assistance.
This skill enables creation and editing of Mermaid diagrams - text-based diagram definitions that render as visual diagrams. Mermaid supports 20+ diagram types for visualizing processes, data structures, timelines, architectures, and more.
| Type | Keyword | Use Case |
|---|---|---|
| Flowchart | flowchart | Process flows, decision trees |
| Sequence |
sequenceDiagram |
| API interactions, message flows |
| Class | classDiagram | OOP structures, relationships |
| State | stateDiagram-v2 | State machines, lifecycles |
| ER | erDiagram | Database schemas |
| Gantt | gantt | Project timelines, schedules |
| Pie | pie | Proportional data |
| Mindmap | mindmap | Hierarchical concepts |
| Timeline | timeline | Chronological events |
| Quadrant | quadrantChart | Priority matrices |
| Git | gitGraph | Branch/merge visualization |
| XY Chart | xychart-beta | Bar and line charts |
| Sankey | sankey-beta | Flow quantities |
| Architecture | architecture-beta | System components |
| User Journey | journey | User experience mapping |
| Kanban | kanban | Task boards |
| Block | block-beta | Precise layout diagrams |
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[Other Action]
C --> E[End]
D --> E
sequenceDiagram
Client->>+Server: Request
Server->>+Database: Query
Database-->>-Server: Results
Server-->>-Client: Response
classDiagram
class Animal {
+String name
+makeSound()
}
Animal <|-- Dog
Animal <|-- Cat
references/Common issues to check:
--> vs -> vs --)#quot;, #lt;, #gt;)| User Intent | Recommended Diagram |
|---|---|
| "Show process steps" | Flowchart |
| "Show API calls" | Sequence diagram |
| "Show database tables" | ER diagram |
| "Show class hierarchy" | Class diagram |
| "Show project timeline" | Gantt chart |
| "Show state transitions" | State diagram |
| "Show proportions" | Pie chart |
| "Brainstorm/organize ideas" | Mindmap |
| "Show system architecture" | Architecture diagram |
| "Show user experience" | User journey |
| "Show task status" | Kanban |
| "Show data flow" | Sankey diagram |
| "Prioritize items" | Quadrant chart |
| "Show trends over time" | XY chart |
| "Show git history" | Git graph |
Detailed syntax documentation is available in references/:
flowcharts.md - Nodes, edges, subgraphs, stylingsequence.md - Participants, messages, loops, notesclass.md - Classes, relationships, cardinalitystate.md - States, transitions, composite statesentity-relationship.md - Entities, attributes, relationshipsgantt.md - Tasks, milestones, dependenciespie.md - Slices, labels, showDataxychart.md - Bar charts, line charts, axesquadrant.md - Axes, quadrants, data pointssankey.md - Flow diagrams, nodes, linksmindmap.md - Hierarchical concepts, iconstimeline.md - Chronological events, sectionsgitgraph.md - Commits, branches, mergesarchitecture.md - Services, groups, edgesjourney.md - User experiences, satisfaction scoreskanban.md - Columns, tasks, metadatablock.md - Precise layout control, columnsstyling.md - Themes, colors, fonts, configurationTo find specific syntax, use these patterns:
# Find all node shape syntax
grep -r "shape\|rectangle\|circle\|diamond" references/
# Find arrow/edge syntax
grep -r "-->\\|--\\|-.->\\|==>" references/
# Find styling examples
grep -r "classDef\\|style\\|theme" references/
# Find configuration options
grep -r "init:\\|config:" references/
userAuth is better than A for node IDsTD (top-down) for hierarchies, LR (left-right) for processesflowchart LR
A["Text with (parentheses)"]
B["Text with #quot;quotes#quot;"]
sequenceDiagram
Alice->>Bob: Hello
Note right of Bob: Bob thinks
Bob-->>Alice: Hi!
flowchart LR
A:::highlight --> B
classDef highlight fill:#ff0,stroke:#f00,stroke-width:4px
flowchart TD
A{Is valid?}
A -->|Yes| B[Process]
A -->|No| C[Error]
-beta suffix)TD, LR, etc.)%%{init: is at very start of diagram