mermaid-diagrams
Installation
SKILL.md
Mermaid Diagrams Skill
Compatibility Rules (Read First)
- Prefer
graph LR/graph TBfor flowcharts; some renderers fail onflowchartkeyword. - Quote labels containing spaces/special characters:
A["Text (x|y) |"]. - Do not use literal
\ninside labels — Mermaid does not interpret such line breaks. Use<br/>for line breaks. - Advanced types like
quadrantChart,sankey-beta,requirementDiagram,gitGraphmay not be available. Use provided flowchart fallbacks. - Code fences must start at column 0 with language
mermaid.
ASCII/Unicode Sidecar (Human-Readable Raw Markdown)
To optimize for quick human scanning in raw Markdown and robust parsing by agents, always ship an ASCII/Unicode sidecar immediately below each Mermaid block.
Policy:
- MUST include a monospace, text-only diagram right under the Mermaid block using fenced code with language
text. - MUST keep Mermaid and sidecar in sync (same nodes/edges, same labels where feasible). If they diverge, treat Mermaid as the source of truth and update the sidecar.
- SHOULD limit width to ~80 columns for readability in diffs and terminals.
- SHOULD use simple line art characters (ASCII first; Unicode box-drawing optional when environment supports it).
- MAY add a one-line caption above the pair:
Diagram: <name> (<type>).