← ClaudeAtlas

fix-mermaidlisted

Fix Mermaid diagrams that fail to render (e.g., "Syntax error in graph", Mermaid 9.4.3). Applies safe Mermaid 9.4.3-compatible rewrites inside Mermaid blocks without disturbing surrounding prose.
xiaoshuai1024/skills · ★ 0 · AI & Automation · score 72
Install: claude install-skill xiaoshuai1024/skills
## Fix Mermaid (Mermaid 9.4.3) ## Scope / constraints - Only edit the markdown files the user asks you to edit. - Prefer **minimal diffs**: modify **only Mermaid diagram source** (inside Mermaid blocks) unless the rendering failure is caused by Mermaid text not being in a Mermaid block (then wrap it into a Mermaid block). - Target Mermaid runtime: **9.4.3**. ## Quick diagnosis 1. Locate Mermaid usage: - Fenced blocks: <code>```mermaid</code> - Also check for Mermaid shortcodes (if present): `{{< mermaid >}} ... {{< /mermaid >}}` 2. Identify the failure mode: - If the page shows `Syntax error in graph`, the diagram source is being parsed but is invalid Mermaid. - If nothing renders and there is no error, the source may not be inside a Mermaid block or is being escaped by the renderer. ## Safe rewrite rules (Mermaid 9.4.3) Apply these rewrites **inside the diagram only**. ### 1) Quote node labels (default) When node labels contain any of: Chinese punctuation, parentheses `()`, slashes `/`, plus `+`, semicolons, colons, or line breaks, rewrite: - From: `A[管理后台 luban]` - To: `A["管理后台 luban"]` In practice, when debugging, it’s usually fastest and safest to quote **all** node labels in the diagram to standardize and avoid edge-case parsing. ### 2) Avoid problematic “DB/cylinder” shapes with symbols Prefer plain quoted nodes over special shapes when labels include symbols: - From: `DB[(MySQL + Redis)]` - To: `DB["(MySQL + Redis)"]` ### 3) Fix `subgraph` titles Mer