Skip to content
FunCoding

mermaid-syntax

Mermaid syntax reference for writing or fixing a diagram in an artefact: flowchart, sequence, class, state, ER, Gantt, C4, mindmap, timeline and the other diagram types, node shapes, styling, theming, and why a diagram fails to render. Not needed for PlantUML (plantuml-syntax), or when the request is for a governed diagram artefact with document control, which /arckit:diagram produces.

Star
2,253
Category
Diagrams
Last commit
Oct 13, 2026

plugins/arckit-claude/skills/mermaid-syntax/SKILL.md

View on GitHub

Mermaid Syntax Reference

A comprehensive reference for all 23 Mermaid diagram types plus configuration and theming. This skill provides official Mermaid syntax documentation sourced from the mermaid-skill project (auto-synced from upstream Mermaid docs).

This skill ships reference material, not runnable scripts. Read the relevant reference file with Read, apply the syntax, and write the diagram into the user's artefact. Do not Bash-execute anything from references/ — they are Mermaid syntax docs, not commands.

To look up syntax for a specific diagram type, identify the type from the table below and read the corresponding reference file.

Supported Diagram Types

Select the appropriate diagram type and read the corresponding reference file:

TypeReferenceArcKit Commands Using It
Flowchartflowchart.md/arckit:diagram, /arckit:dfd, /arckit:roadmap, /arckit:plan, /arckit:backlog, /arckit:strategy, /arckit:story, /arckit:jsp-936
Sequence DiagramsequenceDiagram.md/arckit:diagram
Class DiagramclassDiagram.md—
State DiagramstateDiagram.md—
ER DiagramentityRelationshipDiagram.md/arckit:data-model
Gantt Chartgantt.md/arckit:roadmap, /arckit:plan, /arckit:strategy, /arckit:story, /arckit:presentation
Pie Chartpie.md/arckit:story, /arckit:presentation
Mindmapmindmap.md/arckit:story
Timelinetimeline.md/arckit:story
Git Graphgitgraph.md—
Quadrant ChartquadrantChart.md/arckit:presentation
Requirement DiagramrequirementDiagram.md—
C4 Diagramc4.md/arckit:diagram, /arckit:presentation
Sankey Diagramsankey.md—
XY ChartxyChart.md—
Block Diagramblock.md—
Packet Diagrampacket.md—
Kanbankanban.md—
Architecture Diagramarchitecture.md—
Radar Chartradar.md—
Treemaptreemap.md—
User JourneyuserJourney.md—
ZenUMLzenuml.md—

Configuration & Theming

TopicReference
Themingconfig-theming.md
Directivesconfig-directives.md
Layoutsconfig-layouts.md
Configurationconfig-configuration.md
Mathconfig-math.md
Tidy Treeconfig-tidy-tree.md
Examplesexamples.md

C4 Layout Science

For research-backed C4 diagram layout guidance (declaration ordering, edge crossing targets, colour standards, PlantUML directional hints), see c4-layout-science.md. This ArcKit-specific reference supplements the upstream C4 syntax reference with graph drawing science and layout optimisation techniques.

Common Syntax Gotchas

These are the most common Mermaid syntax errors encountered when generating diagrams:

GotchaProblemFix
<br/> in flowchart edge labelsMermaid flowchart parser rejects HTML in edge labelsUse comma-separated text: -->|"Uses, HTTPS"|
end as node IDend is a reserved keyword in MermaidUse a different ID: EndNode["End"]
Gantt date formatsGantt requires specific date formatUse YYYY-MM-DD (e.g., 2025-01-15)
Gantt task statusInvalid task status keywordsValid: done, active, crit, milestone
Parentheses in labelsUnescaped () breaks node parsingWrap in quotes: Node["Label (with parens)"]
Special chars in IDsHyphens, dots, spaces in node IDsUse camelCase or underscores: apiGateway, api_gateway
ER combined keysFK UK (space-separated) and PK_FK are parse errors, and the whole block silently fails to renderComma-separate them: uuid tenant_id FK, UK
ER attribute commentsAn unclosed ", or a " inside the comment, breaks the blockOne pair of double quotes, last on the line, no " inside
ER cardinality tokensInvented tokens (e.g. ||--x{) fail to parseLeft: || |o }o }| — right: || o| o{ |{
Subgraph namingSubgraph IDs with spaces need quotessubgraph "My Group"

ArcKit Integration

This skill handles conversational Mermaid syntax questions — quick lookups, syntax examples, troubleshooting rendering issues, and learning about diagram types.

For formal architecture diagram generation with document control, project integration, C4 layout science, and governance compliance, use the /arckit:diagram command instead. It generates versioned diagram artifacts saved to your project directory with full traceability to requirements and architecture principles.

Similar Skills

diagram

GAgarrytan/gstack136k883 new stars in the last 7 days

design

NEnextlevelbuilder/ui-ux-pro-max-skill135k1,864 new stars in the last 7 days

slides

NEnextlevelbuilder/ui-ux-pro-max-skill135k1,864 new stars in the last 7 days

Official

dating-web

NEnexu-io/open-design101k1,126 new stars in the last 7 days

Official

critique

NEnexu-io/open-design101k1,126 new stars in the last 7 days

pathfinder

THthedotmack/claude-mem100k3,024 new stars in the last 7 days