feat: Add mermaid-fixer skill for automatic Mermaid syntax error correction

- Add skill that uses check-mermaid.js to validate Mermaid diagrams
- Skill guides Claude to parse error reports and apply intelligent fixes
- Fixes common Mermaid parser bugs (parentheses, brackets, braces in labels)
- Include demo scripts with test Markdown file for validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-04-08 13:32:55 +08:00
parent 57b797196c
commit 1351371bd2
5 changed files with 911 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
{
"skill_name": "mermaid-fixer",
"evals": [
{
"id": 1,
"prompt": "The Mermaid diagrams in demo_scripts/demo.md have syntax errors. Please fix them.",
"expected_output": "The skill should run check-mermaid.js, identify the 3 syntax errors, and apply fixes by quoting labels with special characters. After fixes, all 9 Mermaid blocks should pass validation.",
"files": ["demo_scripts/demo.md"]
},
{
"id": 2,
"prompt": "My documentation file README.md has broken Mermaid diagrams. Can you check and fix them?",
"expected_output": "The skill runs check-mermaid.js on README.md, parses any error reports, applies appropriate fixes based on error types, and verifies the fixes by running the check again.",
"files": []
},
{
"id": 3,
"prompt": "CI/CD is failing with Mermaid validation errors on docs/api.md. Please fix the diagrams.",
"expected_output": "The skill identifies all Mermaid syntax errors using check-mermaid.js, applies fixes for each error type (parentheses, brackets, braces in labels), and ensures the file passes validation.",
"files": []
}
]
}