Agent skill
mermaid-validator
Automatically validate mermaid diagrams after creating or editing them in markdown files
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/mermaid-validator
SKILL.md
When to Use This Skill
Proactively use this skill after:
- Creating new mermaid diagrams in markdown files
- Editing existing mermaid diagrams
- User asks to validate/check mermaid diagrams
Always validate before completing the task.
Instructions
- Read the markdown file (use the file from context or ask user which file to validate)
- Run validation using:
mmdc -i <file-path> -o /tmp/mermaid-validation.svg 2>&1 - Report validation results:
- If valid: Confirm the diagram is valid and exit
- If invalid: Show the errors found and explain what's wrong
- Fix the issues automatically (invalid diagrams have no value)
- Re-validate to confirm the fix worked
- Repeat steps 4-5 until there are no validation issues
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?