mermaid
Original:🇺🇸 English
Translated
Create flowcharts, sequence diagrams, state machines, class diagrams, Gantt charts, and mindmaps using simple text-based syntax. Best for process flows, API interactions, and technical documentation. NOT for data-driven charts (use vega), quick KPI visuals (use infographic), or layered system architecture (use architecture).
154installs
Sourcemarkdown-viewer/skills
Added on
NPX Install
npx skill4agent add markdown-viewer/skills mermaidTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Mermaid Diagram Visualizer
Quick Start: Identify diagram type (flowchart/sequence/state/class/ER/gantt/mindmap) → Define nodes with shapes → Connect with arrows → Wrap in fence. Default: top-to-bottom (), use over , Unicode supported.
```mermaidTDflowchartgraphCritical Syntax Rules
Rule 1: List Syntax Conflicts
❌ [1. Item] → "Unsupported markdown: list"
✅ [1.Item] → Remove space after period
✅ [① Item] → Use circled numbers ①②③④⑤⑥⑦⑧⑨⑩
✅ [(1) Item] → Use parenthesesRule 2: Subgraph Naming
❌ subgraph AI Agent Core → Space without quotes
✅ subgraph agent["AI Agent Core"] → ID with display name
✅ subgraph agent → Simple ID onlyRule 3: Node References in Subgraphs
❌ Title --> AI Agent Core → Reference display name
✅ Title --> agent → Reference subgraph IDRule 4: Special Characters in Node Text
✅ ["Text with spaces"] → Quotes for spaces
✅ Use 『』 instead of "" → Avoid quotation marks
✅ Use 「」 instead of () → Avoid parenthesesRule 5: Use flowchart over graph
❌ graph TD → Outdated
✅ flowchart TD → Supports subgraph directions, more featuresCommon Pitfalls
| Issue | Solution |
|---|---|
| Diagram won't render | Check unmatched brackets, quotes |
| List syntax error | |
| Subgraph reference fails | Use ID not display name |
| Too crowded | Split into multiple diagrams |
| Crossing connections | Use different layout direction or invisible edges |
Output Format
markdown
```mermaid
[diagram code]
```Related Files
For diagram-specific syntax and advanced features, refer to references below:
- syntax.md — Detailed syntax for all 14+ diagram types: flowchart shapes, sequence actors, class relationships, state transitions, ER cardinality, Gantt tasks, and more