Mermaid Creator
Generate syntactically safe, professional Mermaid diagrams.
Workflow
-
- Analyze: Identify graph type (Flowchart, Sequence, Mindmap, etc.) and direction (TB/LR).
-
- Draft: Create nodes and edges. Strictly adhere to syntax gotchas (especially list syntax conflicts).
-
- Style: Apply professional semantic colors to nodes.
-
- Output: Wrap in
```mermaidcode fence. Save output or print directly to user.
- Output: Wrap in
Gotchas & Syntax Rules (CRITICAL)
- Number List Conflict:
1. Textwill break Markdown parsers. MUST USE1.Text(no space),① Text, or[1] Text. - Subgraph Naming: Subgraphs with spaces MUST use IDs:
subgraph core["Core Process"]. Neversubgraph Core Process. - Node References: Edges must connect node IDs, never node labels. (e.g.
A --> B, notTitle --> B). - Forbidden Characters in Labels: Replace
"with『』and()with「」. - Line Breaks: HTML
<br/>only works reliably in circular nodes(( )). Use separate nodes for long text.
Color Palette (Inline Styling)
Apply via style NodeID fill:#hex,stroke:#hex,stroke-width:2px
- Input/Success:
fill:#d3f9d8,stroke:#2f9e44 - Process/Logic:
fill:#e5dbff,stroke:#5f3dc4 - Action/Highlight:
fill:#ffe8cc,stroke:#d9480f - Output/Result:
fill:#c5f6fa,stroke:#0c8599 - Title/Header:
fill:#1971c2,stroke:#1971c2,color:#ffffff - Neutral/Background:
fill:#f8f9fa,stroke:#dee2e6
References
| File | Content | Tokens |
|---|---|---|
references/syntax-rules.md |
Detailed syntax edge cases & advanced layout patterns | ~200 |