/documentation:mermaid-best-practicesfrom documentation
This skill should be used when the user asks to "create a diagram", "draw a flowchart", "make a mermaid diagram", "fix mermaid", "diagram not rendering", "sequence diagram", "state diagram", "flowchart", "ER diagram", "mermaid syntax", "mermaid chart", or needs guidance on creating Mermaid diagrams that render correctly in Obsidian, GitHub, and other markdown environments — including node quoting, shape syntax, subgraph labels, arrow types, and avoiding common pitfalls.
Ships in documentation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Rules for creating Mermaid diagrams that render correctly across Obsidian, GitHub, and standard markdown renderers.
Core principle: Always quote node text. Use stable diagram types. Test before committing.
Always wrap node text in double quotes when it contains:
%% WRONG
flowchart TD
A[Market Analysis] --> B[Pick a Niche]
%% CORRECT
flowchart TD
A["Market Analysis"] --> B["Pick a Niche"]
Safe default: Quote everything. There is zero downside.
Parentheses () conflict with node shape syntax and cause parse failures.
%% WRONG — parser confuses shape delimiters with text
A(["Step 1 (important)"])
%% CORRECT — use dashes or remove parens
A(["Step 1 — important"])
| Syntax | Shape | Example |
|---|---|---|
A["text"] | Rectangle | A["Analysis"] |
A("text") | Rounded | A("Decision") |
A{"text"} | Diamond (decision) | A{"Condition?"} |
A(["text"]) | Stadium | A(["Start"]) |
A[["text"]] | Subroutine | A[["Subprocess"]] |
A[("text")] | Cylinder (DB) | A[("Database")] |
A(("text")) | Circle | A(("Endpoint")) |
Subgraph labels with spaces or special characters must use the ID["Title"] form:
%% WRONG
subgraph Data Preparation
A --> B
end
%% CORRECT
subgraph PREP["Data Preparation"]
A --> B
end
| Syntax | Meaning |
|---|---|
--> | Arrow |
--- | Line (no arrowhead) |
-.-> | Dashed arrow |
==> | Thick arrow |
--"label"--> | Arrow with label |
%% Labels on arrows — quote if non-ASCII or spaces
A -->|"Yes"| B
A -->|"No"| C
| Type | Use Case |
|---|---|
flowchart TD/LR | Processes, funnels, workflows |
sequenceDiagram | Interactions, API flows |
stateDiagram-v2 | State machines |
gantt | Timelines, project plans |
graph TD/LR | Simple graphs |
classDiagram | UML class diagrams |
erDiagram | Entity-relationship |
| Type | Issues |
|---|---|
quadrantChart | May fail in older renderers |
mindmap | Limited support |
timeline | Unstable rendering |
pie | Label encoding issues with non-ASCII |
Tip: For SWOT analysis, use flowchart with subgraph instead of quadrantChart.
flowchart TD
A["Traffic"] --> B["Landing Page"]
B --> C{"Converts?"}
C -->|"Yes"| D["Lead"]
C -->|"No"| E["Retargeting"]
D --> F["Qualification"]
F --> G["Deal"]
style A fill:#E3F2FD
style G fill:#C8E6C9
flowchart LR
subgraph INPUT["Input"]
A["Request"]
end
subgraph PROCESS["Processing"]
B["Step 1"]
C["Step 2"]
D["Step 3"]
end
subgraph OUTPUT["Output"]
E["Result"]
end
A --> B --> C --> D --> E
style INPUT fill:#FFF3E0
style PROCESS fill:#E8F5E9
style OUTPUT fill:#E3F2FD
stateDiagram-v2
[*] --> Draft: Create
Draft --> Review: Submit
Review --> Published: Approve
Review --> Draft: Reject
Published --> [*]
note right of Review: Content review
sequenceDiagram
participant U as User
participant S as System
participant D as Database
U->>S: Request
S->>D: Query
D-->>S: Data
S-->>U: Response
ID["Title"] formCause: Markdown syntax (lists, headers) leaked into the mermaid code block. Fix: Ensure all content inside the block is valid Mermaid syntax only.
subgraph ... end pairingCause: Outdated renderer or missing Mermaid plugin. Fix: Update Obsidian / ensure GitHub has Mermaid support enabled.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub j2h4u/oh-my-claude-plugins --plugin documentation3 skills in this plugin
/doc-coauthoringThis skill should be used when the user asks to "write documentation", "create a proposal", "draft technical spec", "write decision doc", "create structured content", "co-author documentation", mentions "writing docs", "creating proposals", "drafting specs", or needs to efficiently transfer context and refine content through a structured collaborative workflow./readme-generatorThis skill should be used when the user asks to "write README", "create README", "update README", "generate README", "improve README", "rewrite README", "create project documentation", or needs to create human-focused README.md files following current best practices with proper structure, quick start sections, and appropriate content organization based on project type (CLI tool, library, web app, full-stack).Other plugins' skills for the same job