/mermaid-design:diagram-designfrom mermaid-design
Design or improve diagrams from natural-language communication goals, choosing a semantic pattern and visual grammar before compiling to Mermaid. Use for architecture, workflows, interactions, lifecycles, data models, and planning diagrams, including GitHub documentation. Can recommend a table or prose when clearer.
Ships in mermaid-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Create professional diagrams that answer one dominant communication question. Mermaid is the output language, not the conceptual model. The canonical sequence is intent → semantic pattern → visual grammar → capability resolution → source → review. This skill is portable: no host-specific tools, commands, MCP server, or icon library are required. Claude Code and other plugin manifests are distribution adapters.
Identify the audience, the decision or relationship to communicate, supplied facts,
and target renderer. Use github unless the user specifies another target. Do not
ask the user to choose Mermaid syntax. Ask only when a missing fact would change
meaning; otherwise state a concise assumption. Distinguish observed architecture
from a proposal. Never invent components, dates, quantities, cardinalities, ownership,
or security guarantees to fill a diagram.
If a sentence or table communicates the answer more clearly, return that instead. A single relationship, an exact comparison, or a list is often better without a figure. A request for a diagram still permits explaining why another form works better, but respect an explicit requirement to deliver Mermaid.
| Dominant question | Intent | Preferred grammar | Conservative resolution |
|---|---|---|---|
| What exists and connects? | System | Architecture | Flowchart with real boundaries |
| What happens next or branches? | Process | Flowchart | Flowchart |
| Who owns each step? | Responsibility | Swimlane | Flowchart grouped by owner |
| Who exchanges messages, in what order? | Interaction | Sequence | Sequence |
| Which states and transitions exist? | Lifecycle | State | State |
| What contains what? | Structure | Mindmap / Block | Mindmap / Flowchart |
| What entities or classes relate? | Data model | ER / Class | ER / Class |
| When do tasks or events happen? | Planning | Gantt / Timeline | Gantt / Timeline |
| What work is in each status? | Planning | Kanban | Table |
| How do measured quantities split? | Quantitative | Sankey | Table of source, target, value |
| How are items positioned on two axes? | Strategy | Quadrant | Quadrant |
| What does a person experience? | Experience | User Journey | User Journey |
| How do commits branch and merge? | Version history | GitGraph | GitGraph |
| Why does an outcome occur? | Analysis | Ishikawa | Causal Flowchart |
Choose ER for persisted entities/cardinalities and Class for types/inheritance. Sequence represents message order, not elapsed time; Gantt requires dates or durations. State represents legal lifecycle transitions, not a generic task sequence. Quadrant needs meaningful axes and supported positions. Do not fabricate numbers. For specialized grammars absent from this table, consult compatibility guidance; never guess a Mermaid keyword from a product or diagram name.
Typical context is this file, one primary pattern, one resolved syntax reference, and optionally one domain reference. Do not read the whole library. Resolve the grammar before loading syntax, so a GitHub fallback does not cost two syntax reads. Read compatibility for modern, specialized, or version-specific requests; the default policy is summarized below. Read design when redesigning a crowded or low-quality figure.
Choose zero or one primary pattern from this catalog. A pattern is a semantic relationship, not a forced template. Preserve the user's facts when adapting it.
| Relationship to communicate | Primary pattern reference |
|---|---|
| Approved route and exception route | Secure paved road |
| Migration with an intermediate state | Current to target |
| Work converges on a constrained resource | Fan-in bottleneck |
| Policy/configuration versus workload traffic | Control and data planes |
| Data lineage from sources to consumers | Source transform serve |
| Asynchronous delivery and decoupling | Producer broker consumer |
| Permission decision before an operation | Request authorize execute |
| Delegated tool use with human control | Human agent tool |
| Feedback changes the next action | Observe decide act learn |
| Stages with entry and exit criteria | Stage framework |
| Compare allowed and denied paths | Paired policy traces |
| Independent mitigations of residual risk | Compensating layers |
Syntax references: Flowchart, Sequence, State, ER, Class, Gantt, Timeline, Mindmap, Quadrant, User Journey, GitGraph. For capability-confirmed modern targets: Architecture, Swimlane, Sankey, Block, Kanban.
Optional domain vocabulary and modeling constraints: Software, Data/AI, Security, Sales, Finance. These do not override grammar or capability policy.
Default: renderer: github, version: unknown, conservative compatibility,
no experimental grammars, external icons, HTML labels, initialization directives,
custom layout dependencies, or click handlers. Use basic core syntax rather than
assuming every feature of a core grammar is supported. Core means the project's
conservative candidate set, not a guarantee about GitHub's deployed version.
mermaid-11 requires the actual installed minor version before using a modern
feature; a major version alone is insufficient. latest permits consideration of
experimental syntax but still requires actual parser/renderer capability evidence.
Neither profile authorizes imaginary syntax or external icon dependencies.
Unknown capability means use the documented semantic fallback. For example, Architecture becomes components and real boundary subgraphs; Sankey becomes a value table, preserving quantities rather than suggesting proportional widths. Say briefly when a fallback changes the requested visual form. If no fallback preserves the essential semantics, explain the limitation instead of faking it.
Use stable short identifiers distinct from human-readable labels. Use short noun phrases for nodes and verbs or protocols for edges. One statement per line and stable declaration order make Git diffs useful. Quote punctuation in flowchart labels. Choose one dominant direction. Groups must mean ownership, trust zone, stage, deployment boundary, or another real relationship.
Do not make color carry critical meaning. Use emphasis sparingly, remove redundant arrows, and avoid decorative icons, sentence-length labels, and meaningless boxes. An arrow must have a consistent meaning within a figure. Keep supporting caveats outside the diagram. Split independent questions into separate overview/detail figures; do not hide complexity by shrinking text or abbreviating everything.
| Grammar | Recommended maximum | Split near |
|---|---|---|
| Flowchart / Architecture | 12 nodes / services | 18 |
| Sequence | 5 actors | 7 |
| State | 10 states | 15 |
| ER / Class | 8 entities / classes | 12 |
| Swimlane | 5 lanes | 7 |
| Gantt | 15 tasks | 25 |
| Timeline | 12 events | 18 |
| Quadrant | 12 items | 20 |
| Sankey | 10 nodes | 15 |
| Mindmap | 4 levels | 5 |
| User Journey | 12 tasks | 18 |
| GitGraph | 12 commits | 18 |
| Block / Kanban | 12 blocks / cards | 18 |
Budgets are review heuristics, not parser limits. Count visible concepts, including implicit nodes. If a threshold is exceeded, split or explicitly justify the exception.
Before returning the result, check:
When tooling is available, run the bundled validation script from the repository as documented in its README. A parser pass validates syntax only; it does not prove semantic quality or target rendering. Without tools, perform the review and disclose that parsing was not run. Never claim a render or benchmark that was not performed.
Return the diagram in a Mermaid fenced block, or the better non-diagram form, with a brief explanation of the question answered and any material assumption or fallback. Do not include internal routing notes, the entire checklist, or loaded references in normal user output. Render and inspect the actual target when available, especially for large or modern diagrams. If rendering fails, simplify or apply the fallback.
assets/examples/architecture.mmd (opens in a new tab)assets/examples/block.mmd (opens in a new tab)assets/examples/class.mmd (opens in a new tab)assets/examples/er.mmd (opens in a new tab)assets/examples/flowchart.mmd (opens in a new tab)assets/examples/gantt.mmd (opens in a new tab)assets/examples/gitgraph.mmd (opens in a new tab)assets/examples/kanban.mmd (opens in a new tab)assets/examples/mindmap.mmd (opens in a new tab)assets/examples/quadrant.mmd (opens in a new tab)assets/examples/sankey.mmd (opens in a new tab)assets/examples/sequence.mmd (opens in a new tab)assets/examples/state.mmd (opens in a new tab)assets/examples/timeline.mmd (opens in a new tab)assets/examples/user-journey.mmd (opens in a new tab)references/capabilities.json (opens in a new tab)references/compatibility.md (opens in a new tab)references/design.md (opens in a new tab)references/domains/data-ai.md (opens in a new tab)references/domains/finance.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub yu-iskw/mermaid-design --plugin mermaid-design