Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guide for creating beautiful Mermaid diagrams with proper styling for GitHub markdown (dark/light mode compatible, no icons).
.claude/skills/aiskillstore-mermaid/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 125% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 371% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 429% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 221% | 0% |
This skill provides guidance on creating beautiful, professional Mermaid diagrams that render correctly on GitHub and work well in both light and dark mode.
none — Allows subgraphs to adapt to any background([text]) for stadium shapes, ((text)) for circlesfa:fa-* icons, they render as textsubgraph Name["Label Text"] syntaxWriting valid Mermaid is not the goal; producing a diagram a person can actually follow is. Mermaid's auto-layout (dagre) decides where nodes sit and how edges route, so a diagram that looks fine in source often renders as spaghetti. Always render it, look at it as a reader, and iterate before you ship.
bash npx -y @mermaid-js/mermaid-cli -i diagram.mmd -o diagram.png -b "#0d1117"
Put just the Mermaid code in diagram.mmd (the diagram only, no surrounding fence markers). mermaid.live works for a quick paste-and-preview too.
flowchart LR with direction TB inside each subgraph) so it reads start-to-end in one direction.The key insight for dark/light mode compatibility:
classDef myStyle fill:#DARK_COLOUR,stroke:#LIGHT_COLOUR,stroke-width:2px,color:#fff#fff (white text on dark background)This approach ensures nodes are readable regardless of the page background.
This is the canonical template for GitHub-rendered Mermaid diagrams:
mermaidflowchart TD %% --- COLOUR PALETTE & STYLING --- %% Dark fills + light strokes = readable in both light and dark mode classDef user fill:#374151,stroke:#d1d5db,stroke-width:2px,color:#fff classDef primary fill:#5b21b6,stroke:#ddd6fe,stroke-width:2px,color:#fff classDef secondary fill:#1e40af,stroke:#bfdbfe,stroke-width:2px,color:#fff classDef accent fill:#c2410c,stroke:#fed7aa,stroke-width:2px,color:#fff classDef success fill:#047857,stroke:#a7f3d0,stroke-width:2px,color:#fff %% --- NODES --- User((User)):::user User --> Action(["Performs action"]):::user Action --> Primary subgraph Primary["Primary Component"] direction TB Step1(["Step 1"]):::primary Step2(["Step 2"]):::primary Step1 --> Step2 end subgraph Secondary["Secondary Component"] direction TB Process(["Process"]):::secondary end Primary --> Secondary Secondary --> Output(["Output"]):::success %% --- SUBGRAPH STYLES --- %% fill:none allows subgraphs to adapt to any background style Primary fill:none,stroke:#8b5cf6,stroke-width:2px,stroke-dasharray:5 5,color:#8b5cf6 style Secondary fill:none,stroke:#3b82f6,stroke-width:2px,color:#3b82f6
Choose any colours you like — just follow the dark fill + light stroke pattern:
| Fill (Dark) | Stroke (Light) | Result | |-------------|----------------|--------| | #374151 | #d1d5db | Grey | | #5b21b6 | #ddd6fe | Purple | | #1e40af | #bfdbfe | Blue | | #c2410c | #fed7aa | Orange | | #047857 | #a7f3d0 | Green | | #b91c1c | #fecaca | Red | | #0f766e | #99f6e4 | Teal |
These are just examples. Use whatever colours suit your diagram — the principle is what matters.
mermaidsubgraph MyGroup [Label With Spaces]
mermaidsubgraph MyGroup["Label With Spaces"]
mermaidA[Square Node]
mermaidA(["Stadium shape"]) %% Rounded ends - use for most nodes B((Circle)) %% Circle - use for users/actors C{{"Decision"}} %% Hexagon for decisions D[(Database)] %% Cylinder for databases/storage
mermaidstyle MySubgraph fill:#f0f9ff,stroke:#3182ce
mermaidstyle MySubgraph fill:none,stroke:#8b5cf6,stroke-width:2px,stroke-dasharray:5 5,color:#8b5cf6
Key points:
fill:none makes the background transparentstroke-dasharray:5 5 creates a dashed border (optional, looks clean)color:#... sets the subgraph label colour to match the border\n renders as literal textmermaidA(["First line\nSecond line"])
<br/> for multi-line labelsmermaidA(["First line<br/>Second line"]) B[("Tips File<br/>(YAML/JSON)")] C(["Tips Engine<br/>pick + cycle"])
mermaidA --> B %% Solid arrow A -.-> B %% Dashed arrow A -.->|Label| B %% Dashed arrow with label A ==> B %% Thick arrow
mermaidflowchart TD classDef user fill:#374151,stroke:#d1d5db,stroke-width:2px,color:#fff classDef process fill:#5b21b6,stroke:#ddd6fe,stroke-width:2px,color:#fff classDef decision fill:#c2410c,stroke:#fed7aa,stroke-width:2px,color:#fff classDef success fill:#047857,stroke:#a7f3d0,stroke-width:2px,color:#fff User((User)):::user User --> Request(["Makes request"]):::user Request --> Process subgraph Process["Processing"] direction TB Validate(["Validate input"]):::process Execute(["Execute logic"]):::process Validate --> Execute end Execute --> Check{{"Success?"}}:::decision Check -->|Yes| Done(["Complete"]):::success Check -->|No| Request style Process fill:none,stroke:#8b5cf6,stroke-width:2px,stroke-dasharray:5 5,color:#8b5cf6
mermaidA[fa:fa-user User] %% Renders as literal text
mermaidclassDef bad fill:#ffffff,stroke:#000000,color:#000000 %% Invisible in dark mode
mermaidstyle Sub fill:#e0f2fe %% Looks different in light vs dark mode
mermaidsubgraph Sub [My Label] %% Parse error!
mermaidflowchart TD %% 1. Define styles: dark fill + light stroke + white text classDef myStyle fill:#DARK,stroke:#LIGHT,stroke-width:2px,color:#fff %% 2. Use rounded shapes Node(["Text"]):::myStyle %% 3. Quote subgraph labels subgraph Sub["My Label"] Inner(["Inner"]) end %% 4. Style subgraphs with fill:none style Sub fill:none,stroke:#COLOR,stroke-width:2px,color:#COLOR
Invoke this skill when creating:
fa:fa-* icons, they render as text<br/> — Use <br/> for multi-line node labels, not \n (which renders literally)subgraph X["Label"] not subgraph X [Label]| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 24,480 | 31,108 | +27% | 1 | 1 | 0% | 3,800 | 8,552 | +125% | 0 | 0 | — |
case-02 | pass→pass | 10,271 | 9,456 | -8% | 1 | 1 | 0% | 1,745 | 4,392 | +152% | 0 | 0 | — |
case-03 | pass→pass | 15,683 | 6,663 | -58% | 1 | 1 | 0% | 1,502 | 3,764 | +151% | 0 | 0 | — |
case-04 | pass→pass | 25,473 | 25,076 | -2% | 1 | 1 | 0% | 4,284 | 8,482 | +98% | 0 | 0 | — |
case-05 | fail→pass | 9,871 | 7,362 | -25% | 1 | 1 | 0% | 844 | 3,979 | +371% | 0 | 0 | — |
case-06 | fail→pass | 5,321 | 13,622 | +156% | 1 | 1 | 0% | 808 | 4,276 | +429% | 0 | 0 | — |
case-07 | fail→pass | 20,563 | 40,630 | +98% | 1 | 1 | 0% | 3,046 | 5,055 | +66% | 0 | 0 | — |
case-08 | fail→pass | 14,553 | 21,160 | +45% | 1 | 1 | 0% | 1,871 | 6,010 | +221% | 0 | 0 | — |
case-09 | fail→pass | 26,561 | 17,149 | -35% | 1 | 1 | 0% | 4,182 | 5,161 | +23% | 0 | 0 | — |
case-10 | pass→pass | 29,863 | 15,119 | -49% | 1 | 1 | 0% | 1,417 | 4,422 | +212% | 0 | 0 | — |
case-11 | fail→pass | 19,504 | 20,318 | +4% | 1 | 1 | 0% | 2,710 | 5,815 | +115% | 0 | 0 | — |
case-12 | fail→pass | 9,886 | 16,685 | +69% | 1 | 1 | 0% | 1,756 | 4,837 | +175% | 0 | 0 | — |
case-13 | fail→pass | 9,312 | 30,015 | +222% | 1 | 1 | 0% | 1,625 | 7,762 | +378% | 0 | 0 | — |
case-14 | pass→pass | 10,632 | 11,685 | +10% | 1 | 1 | 0% | 980 | 3,947 | +303% | 0 | 0 | — |
case-15 | pass→pass | 27,251 | 27,243 | -0% | 1 | 1 | 0% | 2,026 | 3,531 | +74% | 0 | 0 | — |
case-16 | fail→fail | 36,328 | 36,530 | +1% | 1 | 1 | 0% | 1,672 | 7,350 | +340% | 0 | 0 | — |
case-17 | fail→pass | 22,393 | 14,535 | -35% | 1 | 1 | 0% | 1,413 | 4,589 | +225% | 0 | 0 | — |
case-18 | pass→pass | 48,033 | 13,253 | -72% | 1 | 1 | 0% | 1,095 | 4,163 | +280% | 0 | 0 | — |
case-19 | fail→pass | 36,197 | 14,714 | -59% | 1 | 1 | 0% | 2,144 | 4,146 | +93% | 0 | 0 | — |
case-20 | pass→pass | 10,978 | 10,986 | +0% | 1 | 1 | 0% | 624 | 3,130 | +402% | 0 | 0 | — |
case-21 | fail→fail | 14,330 | 38,283 | +167% | 1 | 1 | 0% | 1,651 | 5,146 | +212% | 0 | 0 | — |
case-22 | fail→pass | 17,492 | 39,349 | +125% | 1 | 1 | 0% | 1,990 | 4,629 | +133% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.