Mermaid patterns for flowchart, sequence, state, class, ER, and chart syntax, config, themes, multi-chart files. Load before any edit to a .mmd file or a mermaid fence, however small, or for Mermaid.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Mermaid Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-mermaid-patterns)
---
name: mermaid-patterns
description: Mermaid patterns for flowchart, sequence, state, class, ER, and chart syntax, config, themes, multi-chart files. Load before any edit to a .mmd file or a mermaid fence, however small, or for Mermaid.
---
# Mermaid patterns
Default assumption: Mermaid 12.4 and mermaid-cli 12.2, per the Mermaid changelog and the mermaid-cli releases.
A row applies when the Mermaid that renders the diagram, in the viewer or under `mmdc`, is at least its version. `mmdc --version` prints the CLI's version, not Mermaid's; read Mermaid's from the `version` in its `node_modules/mermaid/package.json`.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| Writing a diagram, or upgrading Mermaid or mermaid-cli | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing a Mermaid diagram | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Setting config, a theme, or an accessible title, quoting a label, or rendering diagrams through the API | [reference/practices.md](reference/practices.md) |
| Checking that a diagram renders, or running `mmdc` | [reference/tooling.md](reference/tooling.md) |