mermaid
31
总安装量
31
周安装量
#6503
全站排名
安装命令
npx skills add https://github.com/markdown-viewer/skills --skill mermaid
Agent 安装分布
gemini-cli
27
github-copilot
27
opencode
27
codex
26
amp
25
kimi-cli
25
Skill 文档
Mermaid Diagram Visualizer
Quick Start: Identify diagram type (flowchart/sequence/state/class/ER/gantt/mindmap) â Define nodes with shapes â Connect with arrows â Wrap in ```mermaid fence. Default: top-to-bottom (TD), use flowchart over graph, Unicode supported.
Critical 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 parentheses
Rule 2: Subgraph Naming
â subgraph AI Agent Core â Space without quotes
â
subgraph agent["AI Agent Core"] â ID with display name
â
subgraph agent â Simple ID only
Rule 3: Node References in Subgraphs
â Title --> AI Agent Core â Reference display name
â
Title --> agent â Reference subgraph ID
Rule 4: Special Characters in Node Text
â
["Text with spaces"] â Quotes for spaces
â
Use ãã instead of "" â Avoid quotation marks
â
Use ãã instead of () â Avoid parentheses
Rule 5: Use flowchart over graph
â graph TD â Outdated
â
flowchart TD â Supports subgraph directions, more features
Common Pitfalls
| Issue | Solution |
|---|---|
| Diagram won’t render | Check unmatched brackets, quotes |
| List syntax error | [1.Item] not [1. Item] |
| 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
```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