Writes precise, well-structured Mermaid diagrams for any visualization need. Use when creating flowcharts, sequence diagrams, state machines, ER models, timelines, mindmaps, Gantt charts, or any other Mermaid-supported diagram type. Activate on "mermaid", "diagram", "flowchart", "sequence diagram", "state diagram", "ER diagram", "visualize", "draw graph". NOT for rendering/exporting Mermaid to images (use mermaid-graph-renderer), ASCII art, or GUI-based design tools.
npx skills add https://github.com/curiositech/some_claude_skills --skill mermaid-graph-writer
Writes precise, well-structured Mermaid diagrams. Selects the optimal diagram type for the content, uses correct syntax, and produces diagrams that are readable by both humans (rendered) and agents (text DSL).
✅ Use for:
❌ NOT for:
mermaid-graph-renderer)diagramming-expert)flowchart TD
A{What are you modeling?} -->|Branching logic| B[flowchart]
A -->|Request/response over time| C[sequenceDiagram]
A -->|States and transitions| D[stateDiagram-v2]
A -->|Entities and relationships| E[erDiagram]
A -->|Chronological evolution| F[timeline]
A -->|Concept hierarchy| G[mindmap]
A -->|Time-sequenced tasks| H[gantt]
A -->|Proportions| I[pie]
A -->|2-axis comparison| J[quadrantChart]
A -->|Branch/merge history| K[gitGraph]
A -->|Type hierarchy / OO| L[classDiagram]
A -->|User experience steps| M[journey]
A -->|Quantity flows| N[sankey-beta]
A -->|Numeric data| O[xychart-beta]
A -->|System components| P[block-beta]
A -->|Infrastructure| Q[architecture-beta]
A -->|Task board| R[kanban]
A -->|Requirements traceability| S[requirementDiagram]
A -->|System context / containers| T[C4Context]
A -->|Protocol packets / headers| U[packet-beta]
A -->|Multi-axis comparison| V[radar]
A -->|Hierarchical proportions| W[treemap]
A -->|Code-style sequences| X[zenuml]
| Content | Type | Direction |
|---------|------|-----------|
| Decision tree / process | flowchart TD | Top-down for decisions, LR for processes |
| API protocol / agent comms | sequenceDiagram | Always vertical (implicit) |
| Lifecycle / status machine | stateDiagram-v2 | Automatic layout |
| Database / data model | erDiagram | Automatic layout |
| "What changed when" | timeline | Horizontal chronological |
| Taxonomy / brainstorm | mindmap | Radial from root |
| Project schedule | gantt | Horizontal timeline |
| Category proportions | pie | Circular |
| Effort vs. impact | quadrantChart | 2D scatter |
| Git branching strategy | gitGraph | Horizontal |
| Class/interface hierarchy | classDiagram | Automatic |
| User flow with satisfaction | journey | Horizontal sections |
| Flow quantities between categories | sankey-beta | Left-to-right flow |
| Bar/line charts | xychart-beta | Standard axes |
| System block layout | block-beta | Grid-based |
| Cloud/infra topology | architecture-beta | Grouped services |
| Task status columns | kanban | Column-based |
| Requirements traceability | requirementDiagram | Automatic layout |
| System context / containers | C4Context / C4Container | Layered (5 sub-types) |
| Protocol packets / headers | packet-beta | Horizontal bit layout |
| Multi-axis scoring | radar | Radial axes |
| Hierarchical proportions | treemap | Nested rectangles |
| Code-style sequences | zenuml | Vertical (plugin) |
TD / TB — top-down (best for decision trees)LR — left-right (best for processes, pipelines)BT — bottom-up (rare, for dependency graphs)RL — right-left (rare)[text] Rectangle (default action)
(text) Rounded rectangle (soft step)
{text} Diamond (decision/condition)
([text]) Stadium/pill (start/end)
[[text]] Subroutine (subprocess)
[(text)] Cylinder (database/storage)
((text)) Circle (event/trigger)
>text] Flag (async/signal)
{{text}} Hexagon (preparation)
[/text/] Parallelogram (input/output)
[\text\] Reverse parallelogram
[/text\] Trapezoid
[\text/] Reverse trapezoid
--> Solid arrow (main flow)
--- Solid line (association)
-.-> Dotted arrow (optional/async)
==> Thick arrow (emphasis/critical path)
--text--> Labeled edge
~~~ Invisible link (layout control only)
flowchart TD
subgraph Backend
A[API] --> B[DB]
end
subgraph Frontend
C[UI] --> D[State]
end
C -->|fetch| A
->> Solid arrow (sync request)
-->> Dotted arrow (async response)
-) Open arrow (async fire-and-forget)
-x Cross (failed/rejected)
activate / deactivate Lifeline activation
alt / else / end Conditional branching
loop / end Repetition
par / and / end Parallel execution
critical / end Critical section
break / end Break-out flow
rect rgb(...) / end Background highlight
Add autonumber after the first line to auto-number all messages.
[*] --> State1 Start transition
State1 --> State2 Named transition
State1 --> State2: event Labeled transition
State2 --> [*] End transition
state State1 { Nested states
[*] --> SubA
SubA --> SubB
}
state fork <<fork>> Fork pseudostate
state join <<join>> Join pseudostate
state choice <<choice>> Choice pseudostate
||--|| Exactly one to exactly one
||--o{ One to zero-or-many
}o--o{ Zero-or-many to zero-or-many
||--|{ One to one-or-many
erDiagram
USER {
int id PK
string name
string email UK
}
ORDER {
int id PK
int user_id FK
date created_at
}
USER ||--o{ ORDER : places
A[Check if tests pass]A[Step 2.3]Pick one direction for the whole diagram. Don't mix TD and LR within the same flowchart.
Beyond 15 nodes, split into multiple diagrams or use subgraphs. A crowded diagram is worse than no diagram.
When a diagram has natural clusters (frontend/backend, phases, teams), use subgraphs to group them visually.
Every edge leaving a diamond ({decision}) node must have a label:
A{Ready?} -->|Yes| B and A -->|No| CA{Ready?} --> B and A --> C (which is yes? which is no?)~~~) only for layout tweakingNovice: Using a flowchart for everything — even protocols, state machines, and data models.
Expert: Match diagram type to content structure. Sequence diagrams for protocols. State diagrams for lifecycle. ER for data models. Each type exists because flowcharts can't express that structure well.
Novice: One diagram with 30 nodes and crossing edges.
Expert: Split into overview diagram + detail diagrams. Use subgraphs. Max ~15 nodes per diagram.
Novice: {Decision} --> A and {Decision} --> B — which condition leads where?
Expert: Always label edges from decision diamonds: -->|Yes| and -->|No| (or -->|Success| and -->|Failure|, etc.)
Novice: "First check if X. If X then do A, otherwise do B. Then if A succeeds, do C, otherwise retry A."
Expert: That's a flowchart. Write it as one. The formal graph is more precise AND more readable.
references/diagram-types.md — Consult for comprehensive syntax, features, and examples for all 23 Mermaid diagram types: timeline, mindmap, quadrant, sankey, XY chart, block, architecture, kanban, pie, gitgraph, class, journey, requirementDiagram, C4 (5 sub-types), packet-beta, radar, treemap, and zenumlscripts/validate_mermaid.py — Validates Mermaid syntax in any file: checks diagram type declarations, matching fences, structural correctnessComprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.
UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.
Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.
Take curiositech/mermaid-graph-writer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.