mermaid-syntax
Correct Mermaid diagram syntax reference covering all types (flowchart, sequence, class, ERD, state, C4, git, gantt, pie).
Skill by hugobatista
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hugobatista-mermaid-syntax
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mermaid-syntax
What's inside
- Skill name
mermaid-syntax- Description
- Correct Mermaid diagram syntax reference covering all types (flowchart, sequence, class, ERD, state, C4, git, gantt, pie). Emphasizes parser-compatible patterns to avoid rendering errors in GitHub, Obsidian, VS Code, and other tools. Use when creating, visualizing, or documenting software architecture through diagrams.
- License
- MIT
- Instructions
- 321 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Mermaid Syntax Reference
## Syntax Compatibility Rules
These 5 rules prevent parser errors across common rendering tools (GitHub, Obsidian, VS Code extensions):
1. **Subgraphs**: use `subgraph "Title"` — NOT `subgraph ID["Title"]` (named subgraphs require mermaid ≥10.3)
2. **Diamond nodes**: always give an explicit ID — `DECISION{"text"}` — NOT anonymous `{"text"}` after `-->`
3. **Line breaks**: `\n` works inside `["text"]`; avoid `\n` inside `{"text"}` — keep diamond labels single-line
4. **Sequence notes**: plain text only — no `<br/>`, `<br>`, or other HTML tags
5. **Special characters**: replace `&` with `and` to avoid HTML entity issues
## Core Syntax
Every diagram starts with a type declaration on the first line:
```mermaid
flowchart LR
sequenceDiagram
classDiagram
erDiagram
stateDiagram-v2
gitGraph
gantt
pie
```
Use `%%` for comments. Indentation improves readability but isn't required.
## Flowchart
### Node shapes
| Syntax | Shape |
|---|---|
| `A[text]` | Rectangle |
| `A(text)` | Rounded rectangle |
| `A([text])` | Stadium / pill |
| `A[[text]]` | Subroutine |
| `A[(text)]` | Database / cylinder |
| `A((text))` | Circle |
| `A{text}` | Rhombus / decision |
| `A{{text}}` | Hexagon |
| `A>text]` | Asymmetric / flag |
| `A[/text/]` | Parallelogram |
| `A[\text\]` | Parallelogram (reverse) |
| `A[/text\]` | Trapezoid |
### Edges
| Syntax | Type |
|---|---|
| `A --> B` | Arrow |
| `A --- B` | Link (no arrow) |
| `A -.-> B` | Dotted arrow |
| `A ==> B` | Thick arrow |
| `A -->\|label\| B` | Labeled arrow (preferred) |
| `A -- label --> B` | Labeled arrow (alt) |
### Subgraphs
Always use quoted titles:
```mermaid
flowchart LR
subgraph "Group Name"
A --> B
end
```
### Example
```mermaid
flowchart TD
Start([Start]) --> Auth{Authenticated?}
Auth -->|Yes| Dashboard[Show dashboard]
Auth -->|No| Login[Show login form]
Login --> Auth
```
## Sequence Diagram
### Participants
```mermaid
sequenceDiagram
participant A
participant B as "Display Name"
actor User
```
### Messages
| Syntax | Type |
|---|---|
| `->>` | Synchronous call |
| `-->>` | Synchronous response |
| `-)` | Asynchronous call |
| `--)` | Asynchronous response |
| `-x` | Delete / loss |
### Structure blocks
```mermaid
sequenceDiagram
participant A
participant B
alt Condition
A->>B: branch
else Other
A->>B: other branch
end
opt Optional
A->>B: optional
end
loop Every N secondsFrom hugobatista/agent-skills, MIT.
More from hugobatista/agent-skills
- 0.582score
web-frontend
hugobatista
Use when building or modifying web frontend code.
SkillAFreshness: A★ 1Claude Code +9 - 0.547score
pyproject-toml
hugobatista
Use when creating or modifying pyproject.toml configuration for Python projects.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
architecture-brief
hugobatista
Generate an architecture overview document from a pull request or local git diff.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
python-cli
hugobatista
Use when building or modifying Python CLI tools.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
markdown-style
hugobatista
Use when writing or editing Markdown documentation (*.md files).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
ste100
hugobatista
Use when writing or editing technical documentation (manuals, procedures, work instructions, warnings, cautions, notes, maintenance guides, user guides).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
renovate
hugobatista
Use when creating or modifying Renovate configuration for automated dependency management.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
python-project
hugobatista
Use when writing, reviewing, or modifying Python code (*.py files).
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
docker-python
hugobatista
Dockerfile best practices for Python projects.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
node-ci
hugobatista
Creates GitHub Actions CI workflows for Node.js/Bun projects: typecheck (tsc), tests (bun test), draft releases, and npm publish with OIDC trusted publishing.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
forge-detect
hugobatista
Detect the forge type from the current repo's git remote.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
python-ci
hugobatista
ALWAYS load alongside the python-project skill for any new or existing Python project.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 20, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/hugobatista/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hugobatista
- 0.582score
web-frontend
hugobatista
Use when building or modifying web frontend code.
SkillAFreshness: A★ 1Claude Code +9 - 0.547score
renovate
hugobatista
Use when creating or modifying Renovate configuration for automated dependency management.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
pyproject-toml
hugobatista
Use when creating or modifying pyproject.toml configuration for Python projects.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
markdown-style
hugobatista
Use when writing or editing Markdown documentation (*.md files).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
ste100
hugobatista
Use when writing or editing technical documentation (manuals, procedures, work instructions, warnings, cautions, notes, maintenance guides, user guides).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
python-cli
hugobatista
Use when building or modifying Python CLI tools.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
mermaid-syntax skill. Agent Mart. https://agentmart.dev/skills/hugobatista-mermaid-syntax (last updated 2026-10-24)