From claude-code-tools
Creates, edits, and validates Mermaid diagrams including flowcharts, sequence diagrams, class diagrams, state diagrams, ERDs, Gantt charts, and more. Use when working with Mermaid syntax, creating diagrams from descriptions, visualizing architecture, documenting workflows, or when user mentions mermaid, flowchart, sequence diagram, UML, or visualization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-tools:creating-mermaid-diagramsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Expert guidance for creating, editing, and validating Mermaid diagrams.
references/class-diagram-syntax.mdreferences/common-patterns.mdreferences/entity-relationship-syntax.mdreferences/flowchart-syntax.mdreferences/gantt-chart-syntax.mdreferences/gitgraph-syntax.mdreferences/mindmap-syntax.mdreferences/pie-chart-syntax.mdreferences/sequence-diagram-syntax.mdreferences/state-diagram-syntax.mdreferences/styling-and-themes.mdreferences/timeline-syntax.mdscripts/validate-mermaid.shtemplates/architecture-diagram.mdtemplates/class-diagram.mdtemplates/er-diagram.mdtemplates/flowchart.mdtemplates/sequence-diagram.mdworkflows/create-diagram.mdworkflows/edit-diagram.mdExpert guidance for creating, editing, and validating Mermaid diagrams.
| Type | Use Case | Reference |
|---|---|---|
| Flowchart | Process flows, decision trees, algorithms | flowchart-syntax.md |
| Sequence | API calls, service interactions, protocols | sequence-diagram-syntax.md |
| Class | OOP design, type hierarchies, interfaces | class-diagram-syntax.md |
| State | State machines, lifecycle, FSMs | state-diagram-syntax.md |
| ER | Database schema, data models | entity-relationship-syntax.md |
| Gantt | Project timelines, schedules | gantt-chart-syntax.md |
| Pie | Proportions, distributions | pie-chart-syntax.md |
| Mindmap | Brainstorming, hierarchies | mindmap-syntax.md |
| Timeline | Historical events, milestones | timeline-syntax.md |
| Git Graph | Branch visualization | gitgraph-syntax.md |
flowchart TD
A[Start] --> B{Decision?}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
sequenceDiagram
participant U as User
participant S as Server
participant D as Database
U->>S: Request
S->>D: Query
D-->>S: Results
S-->>U: Response
classDiagram
class Animal {
+String name
+makeSound()
}
class Dog {
+fetch()
}
Animal <|-- Dog
Visualizing processes or decisions?
Showing interactions between systems?
Modeling data or objects?
Tracking state changes?
Planning timelines?
Showing proportions?
Organizing ideas?
Validate with mermaid-cli:
# Using the skill's validation script
./scripts/validate-mermaid.sh diagram.md
# Or use npx directly
npx -y @mermaid-js/mermaid-cli -i diagram.mmd -o output.svg
Manual verification: Paste at mermaid.live
See references/common-patterns.md for:
See references/styling-and-themes.md for:
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Missing quotes on special chars | Syntax errors | Wrap text with [](){} in quotes |
| Too many nodes | Unreadable | Split into subgraphs or multiple diagrams |
| No labels on edges | Unclear meaning | Add descriptive labels |
| Wrong diagram type | Confusing | Match diagram type to information |
| Inconsistent arrow syntax | Hard to read | Use consistent --> or -.-> |
Ready-to-use starter templates:
For validation, one of:
npx (Node.js) - runs @mermaid-js/mermaid-cli on demandA well-crafted diagram:
npx claudepluginhub nilpath/nilpath-marketplace --plugin claude-code-toolsGenerates Mermaid diagrams for class models, sequences, flowcharts, ERDs, C4 architecture, git graphs, gantt charts to visualize software architecture, flows, databases, and processes.
Creates Mermaid diagrams for flowcharts, sequence diagrams, ERDs, architecture diagrams, and more. Provides styling, rendering instructions, and accessibility considerations.
Creates and refines Mermaid diagrams (flowcharts, sequence, class, ER, state, Gantt) with live preview and save tools. Supports iterative workflows with theme and format options.