Mermaid Syntax Skill — Development skill for Claude Code
A Claude Code skill for generating error-free Mermaid diagrams - prevents common syntax errors with special characters, reserved words, and escaping rules.
How to install Mermaid Syntax Skill
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open awesome-skills/mermaid-syntax-skill and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Mermaid Syntax Skill does
A Claude Code skill for generating error-free Mermaid diagrams - prevents common syntax errors with special characters, reserved words, and escaping rules.
Alternatives in Development
- n8n Validation Expert — Fix n8n validation errors with error catalog 3.6k ★
- Pi Reserved Keybindings — Extensions cannot override these shortcuts — they are silently skipped by registerShortcut() 526 ★
- Deep Dive Claude Code — 《深入理解 Claude Code 源码》— 系统剖析 Anthropic Claude Code CLI 的架构设计、工程实践与编程哲学 25 chapters, 101 Mermaid diagrams, 467 c 181 ★
README
Mermaid Syntax Skill
A Claude Code skill for generating error-free Mermaid diagrams. Prevents common syntax errors with special characters, reserved words, and escaping rules. **Supports Mermaid v11 features.**
Installation
# Clone to your Claude Code skills directory
git clone https://github.com/awesome-skills/mermaid-syntax-skill.git ~/.claude/skills/mermaid-syntax
Features
- Critical Error Prevention - Handles 90% of common Mermaid syntax errors
- Mermaid v11 Support - Hand-drawn look, bidirectional arrows, new diagram types
- Complete Syntax Reference - Flowchart, Sequence, Class, State, ER, Gantt, Git Graph, and more
- Working Examples - Ready-to-use diagram patterns
- Validation Script - Check diagrams for common errors before committing
Common Errors This Skill Prevents
| Error Type | Problem | Solution |
|---|---|---|
| Special Characters | A[Text (with) parens] breaks |
Use quotes: A["Text (with) parens"] |
| Reserved Word "end" | A --> end breaks diagram |
Use A --> End or A --> ["end"] |
| Node ID with o/x | oNode creates circle edge |
Use descriptive names: orderNode |
| Semicolon in Sequence | A->>B: key;value breaks |
Use entity: A->>B: key#59;value |
| Single % comment | % comment breaks |
Use %% comment |
Subgraph with |
subgraph Title breaks |
Use subgraph "Title |
| stroke-dasharray comma | stroke-dasharray: 5,5 breaks |
Escape: stroke-dasharray: 5\,5 |
Skill Structure
mermaid-syntax/
├── SKILL.md # Core syntax rules (auto-loaded when triggered)
├── references/
│ ├── flowchart-complete.md # All 30+ node shapes, edges, subgraphs
│ ├── sequence-complete.md # Messages, activations, control flow
│ ├── class-state-complete.md # Class/State/ER diagram syntax
│ └── other-diagrams.md # Gantt, Pie, Git Graph, Mindmap, Timeline
├── examples/
│ ├── flowchart-examples.md # 8 flowchart patte
Related Skills
Pbi Error
Diagnose DAX errors across 7 categories (syntax, type mismatch, circular dependency, missing column, ambiguous
SkillCheck Free
Free SKILL.md validator with 30+ checks across structure, naming, and semantics. Catches common errors before
Svelte Docs
Use when answering questions about Svelte components, runes, template syntax, reactivity, lifecycle, stores, s
Ae Expression Reference
Quick reference card for After Effects expression syntax: global objects, methods, functions, and common patte
Oop Architect
A Claude Code skill for OOP architecture planning and tracking — live Mermaid UML diagrams in CLAUDE.md that u
Patent Update Diagrams
智能扫描专利章节文档,分析并补充缺失的附图(仅处理章节03-07)。生成的 Mermaid 附图可使用 export_mermaid.py 导出为黑白 PNG。
Related Agents
Doc Diagrammer
Use this agent to create readable, focused Mermaid diagrams embedded directly in markdown documentation. Featu
Mermaid Expert
Create Mermaid diagrams for flowcharts, sequences, ERDs, and architectures. Masters syntax for all diagram typ
Diagram Agent
Architecture diagram generator, produces Mermaid syntax and ASCII flow charts for customer-facing artifacts (d