Mermaid Diagram Builder
Generate diagrams using Mermaid.js text-based syntax for comprehensive visualization needs.
Workflow
- Select diagram type - Choose from 23+ types (see below)
- Review syntax - Consult @references/diagram-types.md for that type
- Build diagram - Follow syntax patterns from @references/syntax.md
- Add configuration - Theme/styling if needed (see @references/configuration.md)
- Follow best practices - Accessibility, testing (see @references/best-practices.md)
- Generate file - Create .mmd or .md file
Diagram Types
Mermaid supports 23+ diagram types organized into categories:
- Flow & Process: Flowcharts, Sequence, State, User Journey, Gantt, Kanban, Timeline
- Software & Architecture: Class, ER, C4, Architecture (beta), Block, Packet, Git Graphs
- Data & Analysis: Pie, XY, Sankey, Quadrant, Radar (beta), Treemaps (beta)
- Conceptual: Mindmaps, Requirements, ZenUML
See @references/diagram-types.md for complete syntax, features, and use cases for each type.
Configuration & Theming
- 5 built-in themes:
default, neutral, dark, forest, base
- Custom theming via
themeVariables (only with base theme)
- Per-diagram frontmatter configuration (recommended)
- Two rendering looks:
classic, handDrawn
- Multiple layout algorithms:
dagre, elk, tidy tree
See @references/configuration.md for complete options and examples.
Syntax Fundamentals
All diagrams share common patterns:
- Declarative syntax starting with diagram type
- Direction control:
TB, LR, RL, BT
- Comments:
%%
- Styling: frontmatter config or inline styles
- Special character handling
See @references/syntax.md for detailed syntax patterns.
Best Practices
Key principles:
- Always add
accTitle and accDescr for accessibility
- Use frontmatter for configuration (not deprecated directives)
- Break complex diagrams into smaller, focused ones (<15 nodes)
- Test at https://mermaid.live before finalizing
- Quote reserved words like "end"
See @references/best-practices.md for comprehensive guidance, common pitfalls, and optimization tips.
Output Format
Save as .mmd (Mermaid) or .md (Markdown) files:
- View directly on GitHub and GitLab
- Edit at https://mermaid.live
- Render in VS Code, Confluence, Notion, GitBook, Docusaurus
- Integrate into CI/CD pipelines
Resources
References
- @references/diagram-types.md - Complete syntax for all 23+ diagram types
- @references/configuration.md - Theming, configuration, and customization
- @references/syntax.md - Fundamental syntax patterns across all types
- @references/best-practices.md - Best practices, pitfalls, and optimization
type: skill
lifecycle: stable
inheritance: inheritable
name: sequence-diagram
description: Create UML sequence diagrams using sequencediagram.org syntax. Use when users request sequence diagrams, interaction diagrams, API flow visualizations, system communication flows, or ask to visuali...
tier: standard
applyTo: '/diagram,/mermaid,**/sequence'
currency: 2026-05-03
lastReviewed: 2026-05-03
Sequence Diagram Builder
Generate UML sequence diagrams using sequencediagram.org text syntax.
Scope
This skill creates sequence diagrams only — visualizations of message exchanges between participants over time. If the user's request is not about visualizing interactions, communication flows, or message sequences between components, decline the request. Explain that the request is outside the scope of this skill and does not involve a sequence diagram. Do NOT attempt to force non-diagram requests (e.g., writing code, answering general questions, creating non-sequence chart types) into a sequence diagram format.
Quick Start
Create a sequence diagram by:
- Gather requirements about the interaction flow to visualize
- Define participants (actors, systems, databases, etc.)
- Map out the message flow between participants
- Add conditional logic, loops, and notes as needed
- Generate a .txt file with the diagram syntax
Output Format
Always save diagrams as .txt files. The user can open these files at https://sequencediagram.org to view and export to various formats (PNG, PDF, SVG).
Syntax Reference
For complete syntax details including participants, messages, control structures, notes, styling, and more, see @references/syntax.md.
Common Patterns
For complex diagrams or specific scenarios, see @references/examples.md for pre-built patterns:
- API request/response flows
- Authentication sequences
- Database transaction patterns
- Microservices communication
- Error handling flows
Workflow
- Understand the interaction: Ask clarifying questions about what needs to be visualized
- Identify participants: Determine all actors, systems, and components involved
- Map message flow: Document the sequence of interactions
- Add structure: Include conditionals, loops, and parallel flows as needed
- Add documentation: Use notes to clarify complex steps
- Generate file: Create a .txt file with the complete diagram syntax
- Validate: Review the output for completeness and clarity
Tips
- Use descriptive participant names that match the user's terminology
- Break complex flows into separate diagrams rather than one overwhelming diagram
- Add notes for business logic or important details not captured in messages
- Use
space or space N to add vertical spacing for readability
- Consider using
participantgroup for related participants
- Use
title to give the diagram a clear name
- Test the output at sequencediagram.org to ensure it renders correctly
1---2name: mermaid-diagram-23description: Create diagrams using Mermaid.js markdown-inspired syntax. Supports 23+ diagram types including flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, state diagrams, pie charts,...4---56# Mermaid Diagram Builder78Generate diagrams using Mermaid.js text-based syntax for comprehensive visualization needs.910## Workflow11121. **Select diagram type** - Choose from 23+ types (see below)132. **Review syntax** - Consult **@references/diagram-types.md** for that type143. **Build diagram** - Follow syntax patterns from **@references/syntax.md**154. **Add configuration** - Theme/styling if needed (see **@references/configuration.md**)165. **Follow best practices** - Accessibility, testing (see **@references/best-practices.md**)176. **Generate file** - Create .mmd or .md file1819## Diagram Types2021Mermaid supports **23+ diagram types** organized into categories:2223- **Flow & Process**: Flowcharts, Sequence, State, User Journey, Gantt, Kanban, Timeline24- **Software & Architecture**: Class, ER, C4, Architecture (beta), Block, Packet, Git Graphs25- **Data & Analysis**: Pie, XY, Sankey, Quadrant, Radar (beta), Treemaps (beta)26- **Conceptual**: Mindmaps, Requirements, ZenUML2728**See @references/diagram-types.md** for complete syntax, features, and use cases for each type.2930## Configuration & Theming3132- 5 built-in themes: `default`, `neutral`, `dark`, `forest`, `base`33- Custom theming via `themeVariables` (only with `base` theme)34- Per-diagram frontmatter configuration (recommended)35- Two rendering looks: `classic`, `handDrawn`36- Multiple layout algorithms: `dagre`, `elk`, tidy tree3738**See @references/configuration.md** for complete options and examples.3940## Syntax Fundamentals4142All diagrams share common patterns:43- Declarative syntax starting with diagram type44- Direction control: `TB`, `LR`, `RL`, `BT`45- Comments: `%%`46- Styling: frontmatter config or inline styles47- Special character handling4849**See @references/syntax.md** for detailed syntax patterns.5051## Best Practices5253**Key principles**:54- **Always** add `accTitle` and `accDescr` for accessibility55- Use frontmatter for configuration (not deprecated directives)56- Break complex diagrams into smaller, focused ones (<15 nodes)57- Test at https://mermaid.live before finalizing58- Quote reserved words like "end"5960**See @references/best-practices.md** for comprehensive guidance, common pitfalls, and optimization tips.6162## Output Format6364Save as `.mmd` (Mermaid) or `.md` (Markdown) files:65- View directly on GitHub and GitLab66- Edit at https://mermaid.live67- Render in VS Code, Confluence, Notion, GitBook, Docusaurus68- Integrate into CI/CD pipelines6970## Resources7172- **Live Editor**: https://mermaid.live (test and export)73- **Official Docs**: https://mermaid.js.org74- **Repository**: https://github.com/mermaid-js/mermaid75- **Icons**: https://icones.js.org (for mindmaps/architecture)7677## References7879- **@references/diagram-types.md** - Complete syntax for all 23+ diagram types80- **@references/configuration.md** - Theming, configuration, and customization81- **@references/syntax.md** - Fundamental syntax patterns across all types82- **@references/best-practices.md** - Best practices, pitfalls, and optimization838485---86type: skill87lifecycle: stable88inheritance: inheritable89name: sequence-diagram90description: Create UML sequence diagrams using sequencediagram.org syntax. Use when users request sequence diagrams, interaction diagrams, API flow visualizations, system communication flows, or ask to visuali...91tier: standard92applyTo: '**/*diagram*,**/*mermaid*,**/*sequence*'93currency: 2026-05-0394lastReviewed: 2026-05-0395---9697# Sequence Diagram Builder9899Generate UML sequence diagrams using sequencediagram.org text syntax.100101## Scope102103This skill creates **sequence diagrams only** — visualizations of message exchanges between participants over time. If the user's request is not about visualizing interactions, communication flows, or message sequences between components, **decline the request**. Explain that the request is outside the scope of this skill and does not involve a sequence diagram. Do NOT attempt to force non-diagram requests (e.g., writing code, answering general questions, creating non-sequence chart types) into a sequence diagram format.104105## Quick Start106107Create a sequence diagram by:1081091. Gather requirements about the interaction flow to visualize1102. Define participants (actors, systems, databases, etc.)1113. Map out the message flow between participants1124. Add conditional logic, loops, and notes as needed1135. Generate a .txt file with the diagram syntax114115## Output Format116117Always save diagrams as `.txt` files. The user can open these files at https://sequencediagram.org to view and export to various formats (PNG, PDF, SVG).118119## Syntax Reference120121For complete syntax details including participants, messages, control structures, notes, styling, and more, see **@references/syntax.md**.122123## Common Patterns124125For complex diagrams or specific scenarios, see **@references/examples.md** for pre-built patterns:126127- API request/response flows128- Authentication sequences129- Database transaction patterns130- Microservices communication131- Error handling flows132133## Workflow1341351. **Understand the interaction**: Ask clarifying questions about what needs to be visualized1362. **Identify participants**: Determine all actors, systems, and components involved1373. **Map message flow**: Document the sequence of interactions1384. **Add structure**: Include conditionals, loops, and parallel flows as needed1395. **Add documentation**: Use notes to clarify complex steps1406. **Generate file**: Create a .txt file with the complete diagram syntax1417. **Validate**: Review the output for completeness and clarity142143## Tips144145- Use descriptive participant names that match the user's terminology146- Break complex flows into separate diagrams rather than one overwhelming diagram147- Add notes for business logic or important details not captured in messages148- Use `space` or `space N` to add vertical spacing for readability149- Consider using `participantgroup` for related participants150- Use `title` to give the diagram a clear name151- Test the output at sequencediagram.org to ensure it renders correctly152