
Mermaid Visualizer
Install this when your agent keeps breaking Mermaid diagrams in Obsidian or markdown and you want syntax rules that avoid parse errors before publishing.
Overview
Mermaid Visualizer is an agent skill most often used in Build (also Ship review, Operate iterate) that applies Mermaid syntax rules and error-prevention fixes so markdown diagrams render reliably.
Install
npx skills add https://github.com/axtonliu/axton-obsidian-visual-skills --skill mermaid-visualizerWhat is this skill?
- Covers list-syntax conflicts (ordered-list parse errors) with multiple safe label patterns
- Documents subgraph ID + display-name rules for names with spaces
- Reference sections for nodes, arrows, styling, layout direction, and troubleshooting
- Circled-number and Step-prefix alternatives when numbered nodes fail the parser
- Load-on-demand companion to Obsidian visual skills when syntax errors appear
- Reference table of contents spans 8 major syntax sections including critical error prevention
Adoption & trust: 1.2k installs on skills.sh; 3k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You keep getting Mermaid parse errors—especially from numbered labels and subgraph names—and waste cycles guessing which syntax the renderer accepts.
Who is it for?
Solo builders maintaining architecture or workflow diagrams inside Obsidian vaults and Git-backed markdown docs.
Skip if: Teams that only need auto-generated charts from data pipelines or who never author Mermaid by hand in notes.
When should I use this skill?
When creating or fixing Mermaid diagrams in Obsidian or markdown and encountering syntax or parse errors.
What do I get? / Deliverables
After the skill runs, diagram source follows validated Mermaid patterns so Obsidian and markdown previews render flowcharts and subgraphs without list-syntax failures.
- Corrected Mermaid diagram source
- Syntax-compliant subgraph and node definitions
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Build → docs because the skill is a Mermaid syntax reference used while authoring diagrams in notes, READMEs, and specs. Docs subphase fits diagram authoring and technical writing where Mermaid blocks ship with the product narrative.
Where it fits
Author a deployment flowchart in the README without ordered-list syntax breaking the Mermaid block.
Repair subgraph titles and node labels flagged in a doc review before merge.
Update an incident runbook diagram when on-call edits change step numbering.
How it compares
Use as a syntax guardrail reference while writing diagrams—not as a charting API or BI visualization integration.
Common Questions / FAQ
Who is mermaid-visualizer for?
Indie builders and technical writers who use Obsidian or Markdown Mermaid blocks and want an agent that knows the parser’s edge cases before you commit docs.
When should I use mermaid-visualizer?
Use it in Build when drafting system diagrams in docs, during Ship when fixing broken diagrams in PR review, and in Operate when updating runbooks—any time Mermaid throws parse errors on numbered or subgraph labels.
Is mermaid-visualizer safe to install?
It is documentation-only procedural knowledge with no built-in shell or network actions; review the Security Audits panel on this Prism page before enabling it in your agent.
SKILL.md
READMESKILL.md - Mermaid Visualizer
# Mermaid Syntax Rules Reference This reference provides comprehensive syntax rules and error prevention strategies for Mermaid diagrams. Load this when encountering syntax errors or needing detailed syntax information. ## Table of Contents 1. [Critical Error Prevention](#critical-error-prevention) 2. [Node Syntax](#node-syntax) 3. [Subgraph Syntax](#subgraph-syntax) 4. [Arrow and Connection Types](#arrow-and-connection-types) 5. [Styling and Colors](#styling-and-colors) 6. [Layout and Direction](#layout-and-direction) 7. [Advanced Patterns](#advanced-patterns) 8. [Troubleshooting](#troubleshooting) ## Critical Error Prevention ### List Syntax Conflict (Most Common Error) **Problem:** Mermaid parser interprets `number. space` as Markdown ordered list syntax. **Error Message:** `Parse error: Unsupported markdown: list` **Solutions:** ```mermaid ❌ [1. Perception] ❌ [2. Planning] ❌ [3. Reasoning] ✅ [1.Perception] # Remove space ✅ [① Perception] # Use circled numbers ✅ [(1) Perception] # Use parentheses ✅ [Step 1: Perception] # Use prefix ✅ [Step 1 - Perception] # Use dash ✅ [Perception] # Remove numbering ``` **Circled number reference:** ``` ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳ ``` ### Subgraph Naming Rules **Rule:** Subgraphs with spaces must use ID + display name format. ```mermaid ❌ subgraph Core Process A --> B end ✅ subgraph core["Core Process"] A --> B end ✅ subgraph core_process A --> B end ``` **Referencing subgraphs:** ```mermaid ❌ Title --> Core Process # Cannot reference display name ✅ Title --> core # Must reference ID ``` ### Node Reference Rules **Rule:** Always reference nodes by ID, never by display text. ```mermaid # Define nodes A[Display Text A] B["Display Text B"] # Reference nodes A --> B ✅ Use node IDs Display Text A --> Display Text B ❌ Cannot use display text ``` ## Node Syntax ### Basic Node Types ```mermaid # Rectangle (default) A[Rectangle Text] # Rectangle with rounded corners B(Rounded Text) # Stadium shape C([Stadium Text]) # Circle D((Circle<br/>Text)) # Asymmetric shape E>Right Arrow] # Rhombus (decision) F{Decision?} # Hexagon G{{Hexagon}} # Parallelogram H[/Parallelogram/] # Database I[(Database)] # Trapezoid J[/Trapezoid\] ``` ### Node Text Rules **Line breaks:** - `<br/>` only works in circle nodes: `((Text<br/>Break))` - For other nodes, use separate annotation nodes or keep text concise **Special characters:** - Spaces: Use quotes if needed: `["Text with spaces"]` - Quotes: Replace with 『』or avoid - Parentheses: Replace with 「」or avoid - Colons: Generally safe but avoid if causing issues - Hyphens/dashes: Safe to use **Length guidelines:** - Keep node text under 50 characters - Use multiple lines (circle nodes) or separate annotation nodes for longer content - Consider splitting into multiple nodes if text is too long ## Subgraph Syntax ### Basic Structure ```mermaid graph TB # Correct format with ID and display name subgraph id["Display Name"] direction TB A --> B end # Simple ID only (no spaces) subgraph simple C --> D end # Can set direction inside subgraph subgraph horiz["Horizontal"] direction LR E --> F end ``` ### Nested Subgraphs ```mermaid graph TB subgraph outer["Outer Group"] direction TB subgraph inner1["Inner 1"] A --> B end subgraph inner2["Inner 2"] C --> D end inner1 -.-> inner2 end ``` **Limitation:** Keep nesting to 2 levels maximum for readability. ### Connecting Subgraphs ```mermaid graph TB subgraph g1["Group 1"] A[Node A] end subgraph g2["Group 2"] B[Node B] end # Connect individual nodes (recommended) A --> B # Connect subgraphs (creates invisible link for layou