Create Mermaid diagrams. ONLY use when user explicitly says "Mermaid". NOT for general diagrams, schemas, ASCII art, or wireframes.
Inherits all available tools
Additional assets for this skill
This skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/templates/class-template.mdassets/templates/er-template.mdassets/templates/flowchart-template.mdassets/templates/sequence-template.mdreferences/gotchas.mdreferences/patterns.mdreferences/styling.mdreferences/syntax-c4.mdreferences/syntax-class.mdreferences/syntax-er.mdreferences/syntax-flowchart.mdreferences/syntax-git.mdreferences/syntax-sequence.mdreferences/syntax-state.mdThis skill helps create clean, well-organized Mermaid diagrams for software engineering and architecture visualization.
<when_to_use> Use this skill specifically for creating, editing, fixing, or improving Mermaid diagrams:
For simply reading or interpreting existing diagrams, proceed directly without this skill. </when_to_use>
<diagram_types>
This skill supports all major Mermaid diagram types for software engineering:
When creating or editing diagrams, consult references in this order:
For all diagrams first:
references/gotchas.md - Common errors, special characters, reserved keywordsreferences/styling.md - Themes, colors, formattingThen consult the specific syntax reference:
references/syntax-flowchart.mdreferences/syntax-sequence.mdreferences/syntax-class.mdreferences/syntax-er.mdreferences/syntax-state.mdreferences/syntax-c4.mdreferences/syntax-git.mdFor architectural patterns:
references/patterns.md - Common software architecture patternsAlways load gotchas.md when:
Load styling.md when:
Load specific syntax reference when:
Load patterns.md when:
Pre-built, well-commented templates are available in assets/templates/:
flowchart-template.md - Organized flowchart with sectionssequence-template.md - Sequence diagram with best practicesclass-template.md - Domain model class diagramer-template.md - Database schema ER diagramUse templates when:
<best_practices>
Use the same principles as code:
%% to explain sectionsExample:
flowchart TB
%% =================================================================
%% USER AUTHENTICATION FLOW
%% =================================================================
%% -----------------------------------------------------------------
%% Entry Point
%% -----------------------------------------------------------------
Start[User enters credentials]
%% -----------------------------------------------------------------
%% Validation
%% -----------------------------------------------------------------
Validate[Validate input format]
CheckDB{Credentials valid?}
%% ... rest of diagram
For large diagrams:
Structure pattern:
%% Section 1: Definition
[define elements]
%% Section 2: Connections
[define relationships]
%% Section 3: Styling
[define styles]
When diagrams get large:
Before finalizing any diagram, check:
Begin with basic structure:
flowchart LR
A --> B
B --> C
<syntax_reference>
%% Use quotes for special characters
A["Function with (parentheses)"]
B["Text with [brackets]"]
%% Or use HTML entities
C[getData#40;#41;] %% getData()
Flowcharts:
--> solid arrow-.-> dotted arrow==> thick arrowClass diagrams:
<|-- inheritance*-- compositiono-- aggregation--> association..> dependencyER diagrams:
||--|| one-to-one||--o{ one-to-many}o--o{ many-to-many
</syntax_reference><use_cases>
Use sequence diagrams to show request/response flows:
sequenceDiagram
Client->>API: POST /users
API->>Database: INSERT user
Database-->>API: User created
API-->>Client: 201 Created
Use ER diagrams with full attribute details:
erDiagram
USER {
uuid id PK
string email UK
}
ORDER {
uuid id PK
uuid user_id FK
}
USER ||--o{ ORDER : places
Use C4 diagrams for different abstraction levels:
C4Context
Person(user, "User")
System(sys, "System")
Rel(user, sys, "Uses")
Use flowcharts with clear decision points:
flowchart TB
Start --> Check{Valid?}
Check -->|Yes| Process
Check -->|No| Error
</use_cases>
<troubleshooting>"Parse error" → Check syntax matches diagram type
"Syntax error in text" → Escape special characters or use quotes
Blank output → Check browser console, usually invalid syntax
Wrong appearance → Verify correct diagram type declaration </troubleshooting>
<editing_tips>
When editing existing diagrams:
When creating new diagrams:
Mermaid diagrams work great in:
They can be version controlled, reviewed, and updated like code! </integration>
<summary>The goal is to create diagrams that are: