Skip to content
Agentmart
Submit a tool

mermaid-author

Author correct, rendering-safe mermaid.js diagrams.

Skill by rcedwards

IndexedMIT
Write a review

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/rcedwards-mermaid-author

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.

We use your email only for this newsletter. Privacy

About

Author correct, rendering-safe mermaid.js diagrams. Use this skill whenever generating or editing mermaid diagram code, including flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, git graphs, mindmaps, timelines, pie charts, quadrant charts, C4 diagrams, user journey maps, block diagrams, Sankey diagrams, or any other mermaid-supported diagram type. Also use when the user mentions "mermaid", "diagram", "flowchart", "sequence diagram", "class diagram", "state machine", "ER diagram", "Gantt", or asks you to visualize architecture, flows, or relationships in text-based diagram form.

Use cases: writing

No 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-author

What's inside

Skill name
mermaid-author
Description
Author correct, rendering-safe mermaid.js diagrams. Use this skill whenever generating or editing mermaid diagram code, including flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, git graphs, mindmaps, timelines, pie charts, quadrant charts, C4 diagrams, user journey maps, block diagrams, Sankey diagrams, or any other mermaid-supported diagram type. Also use when the user mentions "mermaid", "diagram", "flowchart", "sequence diagram", "class diagram", "state machine", "ER diagram", "Gantt", or asks you to visualize architecture, flows, or relationships in text-based diagram form.
License
MIT
Instructions
359 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • diagram-types.md · references/

SKILL.md (first lines)

# Mermaid Diagram Authoring

This skill covers correct mermaid.js syntax for all diagram types, with emphasis on the parser pitfalls that cause silent failures or broken renders.

## Rules for all diagram types

These are the most common causes of broken mermaid diagrams.

### 1. Never use literal `\n` in node text or labels

The mermaid parser does not interpret `\n` as a newline in most contexts. It either renders literally or breaks parsing.

**For line breaks, use one of these approaches:**
- `<br/>` tags inside quoted strings. They break lines in flowchart nodes, subgraph titles, and sequence diagram
  messages and notes (checked with mermaid-cli 11.12; older renderers may differ)
- Markdown strings with actual newlines (wrap text in backtick-quotes): `` "`Line 1\nLine 2`" `` where `\n` is an actual newline character

**What breaks:**
```
A["First\nSecond"]     %% BAD - \n renders literally or breaks
A["First<br/>Second"]  %% GOOD - works in flowcharts
```

### 2. The word `end` is reserved

Lowercase `end` in node text, labels, or anywhere the parser scans will be interpreted as a block terminator (closing subgraphs, loops, alt blocks, etc.).

**Workarounds:**
- Capitalize: `End`, `END`, `Backend`
- Wrap in quotes: `A["Send end signal"]`
- Use parentheses/brackets: `A("end")`

### 3. Special characters that break syntax

These characters have syntactic meaning and will break parsing if used raw in text:

| Character | Problem | Solution |
|-----------|---------|----------|
| `(` `)` | Node shape delimiters | Wrap text in double quotes: `A("text(with parens)")` |
| `[` `]` | Node shape delimiters | Use quotes: `A["text[with brackets]"]` |
| `{` `}` | Node shape delimiters | Use quotes: `A{"text"}` or HTML entities |
| `#` | Entity prefix | Use `#35;` (mermaid entity) or wrap in quotes |
| `<` `>` | Arrow/HTML confusion | Use `#lt;` and `#gt;` or quotes |
| `:` | Separator in many diagram types | Wrap the entire text in quotes |
| `"` inside text | Terminates quoted strings | Double them: `A["say ""hello"""]` |
| `@` | Shape modifier (v11.3.0+) | Wrap in quotes if used in text |
| `~` | Generic type delimiter in class diagrams | Wrap in quotes |

**Mermaid entity syntax** (NOT standard HTML entities):
- Use `#35;` not `&#35;` for the `#` character
- Use `#lt;` / `#gt;` for angle brackets
- Use `#quot;` for double quotes

### 4. Node IDs starting with `o` or `x`

If a node ID starts with lowercase `o` or `x` and follows an edge, the parser interprets it as a circle-end (`--o`) or cross-end (`--x`) marker.

```
A --> oNode    %% BAD - parsed as A --o Node (circle edge)
A --> ONode    %% GOOD - capitalize
A --> o_node   %% BAD
A --> O_node   %% GOOD
```

### 5. Comments use `%%`, not `//` or `#`

```
%% This is a comment
A --> B  %% inline comment
```

Never use `%%{ }%%` inside comments, as it triggers directive parsing.

### 6. Whitespace and indentation matter in some diagrams

- **Mindmaps**: Hierarchy is entirely indentation-based. Inconsistent indentation creates wrong parent-child relationships.
- **Block diagrams**: Column layout depends on proper nesting.
- **General**: Avoid tabs; use spaces consistently.

---

## Diagram Type Reference

For detailed syntax of each diagram type, see `references/diagram-types.md`. Below is the quick-start for the most common types.

### Flowchart

```mermaid
flowchart LR
    A[Rectangle] --> B(Rounded)
    B --> C{Decision}
    C -->|Yes| D[Result]
    C -->|No| E[Other]
```

**Directions**: `TB`/`TD` (top-down), `BT`, `LR`, `RL`

**Node shapes** (classic):
- `[text]` rectangle
- `(text)` rounded
- `([text])` stadium
- `((text))` circle
- `{text}` diamond
- `{{text}}` hexagon
- `[/text/]` parallelogram
- `[\text\]` parallelogram alt
- `[/text\]` trapezoid
- `[\text/]` trapezoid alt
- `[(text)]` cylinder
- `(((text)))` double circle
- `[[text]]` subroutine
- `>text]` asymmetric

**Edge types**:
- `-->` arrow
- `---` line (no arrow)
- `-.->` dotted arrow
- `==>` thick arrow
- `~~~` invisible link

From rcedwards/blaude-bode, MIT.

More from rcedwards/blaude-bode

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 15, 2026 (14 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from rcedwards

Cite this page

mermaid-author skill. Agent Mart. https://agentmart.dev/skills/rcedwards-mermaid-author (last updated 2026-10-24)