claude/plugins/docs/skills/mermaid/SKILL.md
Use when the user asks to create a diagram, visualize a process, draw a flowchart, show a sequence diagram, model a state machine, create an ER diagram, visualize architecture, or any request involving Mermaid syntax or diagram generation.
npx skillsauth add raphi011/skills mermaidInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ALWAYS use
<br/>for line breaks in node labels — NEVER\n.\nrenders as the literal characters\nin every diagram type. This applies to flowchart nodes, sequence diagram notes, and all other shapes.
Generate Mermaid diagram code from user requirements. Always read the reference doc for the chosen diagram type before generating — don't rely on memory.
Read the corresponding reference before generating. Each file contains the full syntax spec with examples.
| Type | Reference | When to use | | ---- | --------- | ----------- | | Flowchart | flowchart.md | Processes, decisions, workflows, algorithms | | Sequence | sequenceDiagram.md | API calls, service interactions, message flows | | Class | classDiagram.md | OOP structure, inheritance, interfaces | | State | stateDiagram.md | State machines, lifecycle transitions | | ER | entityRelationshipDiagram.md | Database schema, entity relationships | | C4 | c4.md | System architecture (context, container, component) | | Architecture | architecture.md | System components with icons and groups | | Gantt | gantt.md | Project timelines, task scheduling | | Mindmap | mindmap.md | Hierarchical brainstorming, knowledge graphs | | Timeline | timeline.md | Historical events, milestones | | Git Graph | gitgraph.md | Branch strategies, merge flows | | User Journey | userJourney.md | UX flows with satisfaction scores | | Kanban | kanban.md | Task boards, workflow stages | | Block | block.md | System component diagrams, modules | | Sankey | sankey.md | Flow quantities, conversions | | XY Chart | xyChart.md | Line/bar charts with data | | Pie | pie.md | Proportions, distributions | | Quadrant | quadrantChart.md | 2x2 analysis matrices | | Radar | radar.md | Multi-dimensional comparison | | Treemap | treemap.md | Hierarchical data visualization | | Packet | packet.md | Network protocols, binary structures | | Requirement | requirementDiagram.md | Requirements traceability | | ZenUML | zenuml.md | Sequence diagrams (code-style syntax) |
%%{init: ...}%% config<br>, NOT \n\n renders as literal text in most shapes. Always use <br> and wrap the label in quotes:
A["Line one<br>Line two"] %% ✅ works
B("Line one\nLine two") %% ❌ literal \n
The word end in lowercase breaks flowcharts and sequence diagrams. Use End, END, or wrap in quotes/brackets.
Wrap edge labels containing special characters in quotes:
A -->|"yes (confirmed)"| B %% ✅ quoted
A -->|yes (confirmed)| B %% ❌ breaks on parens
A---oB creates a circle edge, A---xB a cross edge. Add a space or capitalize: A--- oB or A---OB.
direction + cross-subgraph arrows = overlapMixing direction TB/LR inside subgraphs with cross-subgraph arrows causes subgraph boxes to overlap. Use a plain graph TD or graph LR without inner direction directives when arrows cross subgraph boundaries:
%% ❌ causes overlap
flowchart LR
subgraph A
direction TB
X --> Y
end
subgraph B
direction TB
P --> Q
end
Y --> P %% cross-subgraph arrow breaks layout
%% ✅ use graph TD without inner direction
graph TD
subgraph A
X --> Y
end
subgraph B
P --> Q
end
Y --> P
```mermaid code blocksuserService, authCheck, not A, B, C)%%{init: {'theme': 'neutral'}}%% when the default theme is too colorfulUser requirements: $ARGUMENTS
development
Create polished, professional reveal.js presentations. Use when the user asks to create slides, a presentation, a deck, or a slideshow. Supports themes, multi-column layouts, code highlighting, animations, speaker notes, and custom styling. Generates HTML + CSS with no build step required.
tools
Use when writing Tailwind CSS v4 code, configuring Tailwind v4 with @theme or @variant directives, migrating from Tailwind v3 to v4, setting up CSS-native config (no tailwind.config.js), defining semantic color tokens, implementing dark mode with class-based @variant, creating design system tokens, or styling components with utility classes. Covers @import "tailwindcss", @theme blocks, @variant, @layer, CSS custom properties for colors, and common layout/component patterns.
development
Use whenever working with SurrealDB — writing queries, defining schemas, configuring indexes, debugging errors, handling record IDs, using the Go SDK, or discussing SurrealDB architecture. Activate on any mention of SurrealDB, SurrealQL, HNSW indexes, or surreal-related Go SDK code.
development
Use when visually verifying terminal UI rendering, testing TUI interactions, debugging Bubbletea display issues, or when asked to "test the TUI", "screenshot the terminal", "check what the TUI looks like", or "visually verify". Requires Kitty terminal with allow_remote_control and macOS for screencapture.