← Back to list
Use

mermaid-diagramming
by seanspiesman
Agents and Workflows
⭐ 0🍴 0📅 Jan 24, 2026
SKILL.md
name: Mermaid Diagramming description: Best practices and rules for generating error-free Mermaid diagrams.
Mermaid Diagramming Skill
This skill provides mandatory guidelines for creating Mermaid diagrams. ALL agents must follow these rules to ensure diagrams render correctly.
1. Syntax Enforcement
Use flowchart
- ALWAYS use
flowchart TD(Top-Down) orflowchart LR(Left-Right). - NEVER use
graph(deprecated). - NEVER use
sequenceDiagram,classDiagram,stateDiagram, orerDiagramunless explicitly requested by the user and supported by the rendering environment. The safe default is alwaysflowchart.
Node Definitions
- IDs: Use simple alphanumeric IDs for nodes (e.g.,
A,Node1,ProcessA). - Labels: ALWAYS wrap label text in double quotes
"".- Correct:
A["User clicks 'Process'"] - Incorrect:
A[User clicks 'Process'](This will fail on quotes or parentheses)
- Correct:
- Special Characters: If a label contains
(,),[,],{,},", or', it MUST be double-quoted.
2. Structural Rules
Decisions
- Use
{}for decision nodes (rhombusshape). - Correct:
D{"Is Valid?"} - Incorrect:
D["Is Valid?"](This is a rectangle, technically valid but wrong semantic)
Connections
- Use
-->for standard arrows. - Use
-.->for dotted links. - Use
==>for thick structural links. - Labels on links: Place them after the arrow.
A -->|Success| BA -- Failure --> C
Subgraphs
- Use
subgraphto group related nodes. - ensure
endcloses the subgraph. - Give the subgraph an ID and a Label.
subgraph S1 ["Component A"] A["Start"] end
3. Common Errors to Avoid
- Unescaped Quotes:
A["Say "Hello""]-> Error. Use single quotes inside or escape:A["Say 'Hello'"]. - Mixing Syntax: Trying to use
altoropt(Sequence Diagram features) inside aflowchart. - Empty Nodes:
A[]-> Error. - Trailing Semicolons: While allowed, they are unnecessary.
4. Examples
✅ Good Example
flowchart TD
Start["Start Process"] --> Check{"Is Data Valid?"}
Check -->|Yes| Process["Process Data"]
Check -->|No| Log["Log Error"]
subgraph Backend ["Backend System"]
Process --> Save["Save to DB"]
end
Save --> End["End"]
Log --> End
❌ Bad Example
graph TD %% Use flowchart, not graph
Start[Start Process] %% Missing quotes
Check{Is Data Valid?} %% Missing quotes
Check --> Yes --> Process %% Chained arrows can be fragile
alt Yes %% 'alt' is not for flowcharts
Process["Do It"]
end
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon