Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Comprehensive guide for creating software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams (domain modeling, object-oriented design), sequence diagrams (application flows, API interactions, code execution), flowcharts (processes, algorithms, user journeys), entity relationship diagrams (database schemas), C4 architecture diagrams (system context, containers, components), state diagrams, git graphs, pie charts,
.claude/skills/davila7-mermaid-diagrams/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | 74% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 75% | 0% |
| case-23 | ✗→✓ | ▲ Improved | 213% | 0% |
| case-07 | ✓→✗ | ▼ Worse | 121% | 0% |
| case-22 | ✓→✓ | = Same ✓ | 70% | 0% |
Create professional software diagrams using Mermaid's text-based syntax. Mermaid renders diagrams from simple text definitions, making diagrams version-controllable, easy to update, and maintainable alongside code.
All Mermaid diagrams follow this pattern:
mermaiddiagramType definition content
Key principles:
classDiagram, sequenceDiagram, flowchart)%% for commentsChoose the right diagram type:
mermaidclassDiagram Title -- Genre Title *-- Season Title *-- Review User --> Review : creates class Title { +string name +int releaseYear +play() } class Genre { +string name +getTopTitles() }
mermaidsequenceDiagram participant User participant API participant Database User->>API: POST /login API->>Database: Query credentials Database-->>API: Return user data alt Valid credentials API-->>User: 200 OK + JWT token else Invalid credentials API-->>User: 401 Unauthorized end
mermaidflowchart TD Start([User visits site]) --> Auth{Authenticated?} Auth -->|No| Login[Show login page] Auth -->|Yes| Dashboard[Show dashboard] Login --> Creds[Enter credentials] Creds --> Validate{Valid?} Validate -->|Yes| Dashboard Validate -->|No| Error[Show error] Error --> Login
mermaiderDiagram USER ||--o{ ORDER : places ORDER ||--|{ LINE_ITEM : contains PRODUCT ||--o{ LINE_ITEM : includes USER { int id PK string email UK string name datetime created_at } ORDER { int id PK int user_id FK decimal total datetime created_at }
For in-depth guidance on specific diagram types, see:
%% comments to explain complex relationships.mmd files alongside code for easy updatesConfigure diagrams using frontmatter:
mermaid--- config: theme: base themeVariables: primaryColor: "#ff6b6b" --- flowchart LR A --> B
Available themes: default, forest, dark, neutral, base
Layout options:
layout: dagre (default) - Classic balanced layoutlayout: elk - Advanced layout for complex diagrams (requires integration)Look options:
look: classic - Traditional Mermaid stylelook: handDrawn - Sketch-like appearanceNative support in:
Export options:
npm install -g @mermaid-js/mermaid-cli then mmdc -i input.mmd -o output.pngdocker run --rm -v $(pwd):/data minlag/mermaid-cli -i /data/input.mmd -o /data/output.png{} in comments, use proper escape sequences for special charactersAlways diagram when:
Use diagrams to:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | pass→pass | 9,383 | 9,084 | -3% | 1 | 1 | 0% | 2,144 | 3,641 | +70% | 0 | 0 | — |
case-01 | pass→pass | 8,091 | 6,971 | -14% | 1 | 1 | 0% | 1,601 | 2,940 | +84% | 0 | 0 | — |
case-02 | pass→pass | 12,767 | 5,559 | -56% | 1 | 1 | 0% | 2,461 | 2,622 | +7% | 0 | 0 | — |
case-03 | pass→pass | 6,643 | 4,342 | -35% | 1 | 1 | 0% | 1,295 | 2,441 | +88% | 0 | 0 | — |
case-21 | pass→pass | 3,564 | 2,763 | -22% | 1 | 1 | 0% | 583 | 2,060 | +253% | 0 | 0 | — |
case-04 | pass→pass | 9,219 | 4,100 | -56% | 1 | 1 | 0% | 1,862 | 2,470 | +33% | 0 | 0 | — |
case-05 | pass→pass | 2,576 | 2,849 | +11% | 1 | 1 | 0% | 473 | 2,093 | +342% | 0 | 0 | — |
case-06 | pass→pass | 5,591 | 4,508 | -19% | 1 | 1 | 0% | 1,098 | 2,539 | +131% | 0 | 0 | — |
case-07 | pass→fail | 7,561 | 8,229 | +9% | 1 | 1 | 0% | 1,454 | 3,219 | +121% | 0 | 0 | — |
case-08 | pass→pass | 4,280 | 4,033 | -6% | 1 | 1 | 0% | 894 | 2,468 | +176% | 0 | 0 | — |
case-09 | pass→pass | 8,849 | 6,082 | -31% | 1 | 1 | 0% | 2,200 | 2,985 | +36% | 0 | 0 | — |
case-10 | pass→pass | 7,090 | 2,872 | -59% | 1 | 1 | 0% | 1,437 | 2,164 | +51% | 0 | 0 | — |
case-11 | fail→pass | 6,379 | 4,129 | -35% | 1 | 1 | 0% | 1,381 | 2,406 | +74% | 0 | 0 | — |
case-12 | pass→pass | 3,287 | 2,449 | -25% | 1 | 1 | 0% | 674 | 2,084 | +209% | 0 | 0 | — |
case-13 | pass→pass | 7,289 | 2,472 | -66% | 1 | 1 | 0% | 1,189 | 2,102 | +77% | 0 | 0 | — |
case-14 | pass→pass | 6,644 | 3,387 | -49% | 1 | 1 | 0% | 1,165 | 2,287 | +96% | 0 | 0 | — |
case-15 | pass→pass | 3,336 | 2,430 | -27% | 1 | 1 | 0% | 609 | 2,021 | +232% | 0 | 0 | — |
case-16 | pass→pass | 2,624 | 2,313 | -12% | 1 | 1 | 0% | 484 | 1,983 | +310% | 0 | 0 | — |
case-17 | pass→pass | 7,217 | 4,401 | -39% | 1 | 1 | 0% | 1,249 | 2,474 | +98% | 0 | 0 | — |
case-18 | pass→pass | 9,024 | 4,071 | -55% | 1 | 1 | 0% | 1,680 | 2,379 | +42% | 0 | 0 | — |
case-19 | pass→pass | 4,792 | 3,732 | -22% | 1 | 1 | 0% | 871 | 2,305 | +165% | 0 | 0 | — |
case-20 | fail→pass | 6,699 | 4,458 | -33% | 1 | 1 | 0% | 1,415 | 2,471 | +75% | 0 | 0 | — |
case-23 | fail→pass | 4,169 | 4,497 | +8% | 1 | 1 | 0% | 826 | 2,588 | +213% | 0 | 0 | — |
case-24 | pass→pass | 3,678 | 4,111 | +12% | 1 | 1 | 0% | 660 | 2,406 | +265% | 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. 24 cases were attempted. The headline lift of +8 percentage points is the difference between those two pass rates over the 24 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
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.