mermaid-diagramsCreate software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.
Install via ClawdBot CLI:
clawdbot install wpank/mermaid-diagramsCreate professional software diagrams using Mermaid's text-based syntax. Mermaid renders diagrams from simple text definitions, making diagrams version-controllable, easy to update, and maintainable alongside code.
npx clawhub@latest install mermaid-diagrams
All Mermaid diagrams follow this pattern:
diagramType
definition content
Key principles:
classDiagram, sequenceDiagram, flowchart)%% for comments| Type | Use For | Reference |
|------|---------|-----------|
| Class Diagrams | Domain modeling, OOP design, entity relationships | references/class-diagrams.md |
| Sequence Diagrams | API flows, auth flows, component interactions | references/sequence-diagrams.md |
| Flowcharts | Processes, algorithms, decision trees, user journeys | references/flowcharts.md |
| ERD | Database schemas, table relationships, data modeling | references/erd-diagrams.md |
| C4 Diagrams | System context, containers, components, architecture | references/c4-diagrams.md |
| State Diagrams | State machines, lifecycle states | — |
| Git Graphs | Branching strategies | — |
| Gantt Charts | Project timelines, scheduling | — |
For styling, themes, and layout options: See references/advanced-features.md
classDiagram
Title -- Genre
Title *-- Season
Title *-- Review
User --> Review : creates
class Title {
+string name
+int releaseYear
+play()
}
class Genre {
+string name
+getTopTitles()
}
sequenceDiagram
participant User
participant API
participant Database
User->>API: POST /login
API->>Database: Query credentials
Database-->>API: Return user data
alt Valid credentials
API-->>User: 200 OK + JWT token
else Invalid credentials
API-->>User: 401 Unauthorized
end
flowchart TD
Start([User visits site]) --> Auth{Authenticated?}
Auth -->|No| Login[Show login page]
Auth -->|Yes| Dashboard[Show dashboard]
Login --> Creds[Enter credentials]
Creds --> Validate{Valid?}
Validate -->|Yes| Dashboard
Validate -->|No| Error[Show error]
Error --> Login
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
PRODUCT ||--o{ LINE_ITEM : includes
USER {
int id PK
string email UK
string name
datetime created_at
}
ORDER {
int id PK
int user_id FK
decimal total
datetime created_at
}
%% comments to explain complex relationships.mmd files alongside code for easy updatesConfigure diagrams using frontmatter:
---
config:
theme: base
themeVariables:
primaryColor: "#ff6b6b"
---
flowchart LR
A --> B
Available themes: default, forest, dark, neutral, base
Layout options:
layout: dagre (default) — classic balanced layoutlayout: elk — advanced layout for complex diagramsLook options:
look: classic — traditional Mermaid stylelook: handDrawn — sketch-like appearanceNative support in:
Export options:
npm install -g @mermaid-js/mermaid-cli then mmdc -i input.mmd -o output.pngAlways diagram when:
Use diagrams to:
{} in comments; escape special charactersGenerated Feb 27, 2026
A software development team uses Mermaid diagrams to create and maintain C4 architecture diagrams and sequence diagrams for a microservices-based e-commerce platform. This helps align developers and stakeholders on system design, document API flows, and onboard new team members with visual, version-controlled documentation stored alongside code.
A data engineering team employs Mermaid ERD diagrams to model and visualize database schemas for a healthcare analytics application. This enables collaborative design of table relationships, ensures data integrity, and provides clear documentation for database migrations and audits.
A UX design team utilizes Mermaid flowcharts to map out user journeys and decision trees for a mobile banking app. This visualizes authentication flows, feature interactions, and error handling, facilitating iterative design reviews and improving user experience planning.
A project management office uses Mermaid Gantt charts to outline project timelines and dependencies for a construction management software rollout. This aids in scheduling, resource allocation, and stakeholder communication by providing clear, updatable visual timelines integrated into project documentation.
An online education platform integrates Mermaid diagrams into course materials to teach programming concepts, such as class diagrams for object-oriented design and state diagrams for algorithm visualization. This enhances learning with interactive, text-based diagrams that students can edit and export for assignments.
Offer the Mermaid Diagrams skill as a premium add-on within a larger AI-powered documentation or development platform. Charge subscription fees based on usage tiers, such as the number of diagrams generated or advanced features like custom themes and export options, targeting enterprises needing scalable diagramming tools.
Provide consulting services to help organizations adopt Mermaid for technical documentation, including custom diagram creation, integration into CI/CD pipelines, and team training workshops. Revenue comes from project-based fees and ongoing support contracts, focusing on industries like software development and finance.
Develop a standalone web or desktop application that leverages the Mermaid Diagrams skill for creating and exporting diagrams. Offer a free basic version with limited features and monetize through premium upgrades, such as advanced layouts, team collaboration tools, and high-resolution exports, targeting individual developers and small teams.
💬 Integration Tip
Integrate the skill into markdown editors or IDEs like VS Code to allow real-time diagram previews, and use the Mermaid CLI for automated exports to PNG or SVG during documentation builds.
Display and control HTML content on connected Mac, iOS, or Android nodes via a web-based canvas with live reload and remote actions.
生成和编辑各种类型的图表(drawio、mermaid、excalidraw)。支持流程图、时序图、类图、ER图、思维导图、架构图、网络拓扑图等常见图表类型。能够根据自然语言描述创建新图表,也能读取并修改已有的 drawio/mermaid/excalidraw 文件。使用独立的 MCP server (mcp-diagram-generator) 生成图表文件,减少 token 消耗并保证输出一致性。支持自动配置管理,默认输出路径为项目目录下的 diagrams/{format}/,支持自定义路径和自动创建目录。
Create, export, and manage Canva designs via the Connect API. Generate social posts, carousels, and graphics programmatically.
Generate diagrams from descriptions with Mermaid, PlantUML, or ASCII for architecture, flows, sequences, and data models.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Generate beautiful, hand-drawn Mermaid diagrams with robust syntax (quoted labels, ELK layout). Use this skill when the user asks for "diagram", "flowchart", "sequence diagram", or "visualize this process".