OpenParable
Skip to content
← Back to skills

Mermaid Syntax

Documents
mermaid-syntax

Mermaid Syntax is an Agent Skill for documents published in the tractorjuice/arc-kit repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

This skill should be used when the user asks about Mermaid diagram syntax, how to write flowchart, sequence, class, state, ER, Gantt, C4, mindmap, timeline, or other diagram types, node shapes, styling, theming, or rendering errors.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/tractorjuice/arc-kit/blob/HEAD/plugins/arckit-claude/skills/mermaid-syntax/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/mermaid-syntax, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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

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
Missing semicolons in ERER diagram attributes need specific syntaxFollow entity { type name } pattern
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.