mermaid-diagramlisted
Install: claude install-skill petermcalister/shared-skills
# Mermaid Diagram Skill
Generate validated Mermaid diagrams from text descriptions or source code.
## How This Skill Works
1. **Determine diagram type** from the user's request
2. **Load the relevant guide** for that type (only what's needed — saves context)
3. **Generate the .mmd file**
4. **Validate via mmdc** — diagrams with syntax errors are useless to the user
5. **Deliver** the validated .mmd and rendered PNG/SVG
## Intent Routing
Read only the guide you need for this request:
| User's intent | Guide to read |
|---------------|---------------|
| Workflow, process, business logic | `references/guides/diagrams/activity-diagrams.md` |
| Infrastructure, deployment, cloud, K8s | `references/guides/diagrams/deployment-diagrams.md` |
| System architecture, components, microservices | `references/guides/diagrams/architecture-diagrams.md` |
| API flow, service interactions, sequence | `references/guides/diagrams/sequence-diagrams.md` |
| General or unsure which type | `references/mermaid-diagram-guide.md` |
All paths are relative to this skill's directory.
## Validation Workflow
Unvalidated Mermaid diagrams frequently contain syntax errors — broken arrows, reserved word collisions, unescaped characters — that make them useless. Always validate before delivering.
```bash
# Option 1: Use the resilient workflow script (standalone via uv run / PEP 723)
uv run ${CLAUDE_PLUGIN_ROOT}/skills/mermaid-diagram/scripts/validate_mermaid.py --code "$(cat diagram.mmd)" --output diagr