Imported from rp1-run/rp1 (
plugins/base/skills/fix-mermaid/SKILL.md). Install upstream withnpx skills add rp1-run/rp1 --skill fix-mermaid. Copyright stays with the author.
Mermaid Diagram Fixer
This command validates and repairs Mermaid.js diagrams in markdown files.
Usage
/fix-mermaid path/to/file.md # Process markdown file in-place
/fix-mermaid - # Process diagram from stdin (stdout output)
Invocation
{% dispatch_agent "rp1-base:mermaid-fixer", "INPUT_PATH: {FILE_PATH}, OUTPUT_MODE: in-place" %}
The agent will:
- Scan markdown for all mermaid code blocks
- Validate each diagram using rp1 CLI tool
- Attempt automatic repair (up to 3 iterations per diagram)
- Insert placeholders for unfixable diagrams
- Output JSON summary of repairs made
Requirements
- rp1 CLI v0.3.0 or later (includes
agent-tools mmd-validatecommand) - Chromium (auto-downloaded on first use by rp1)
