@rp1-run/fix-mermaid
AValidates and repairs mermaid diagrams in markdown files. Scans for mermaid blocks, validates syntax, and auto-repairs common errors.
Install
agr install @rp1-run/fix-mermaid --target claudeWrites 1 file into .claude/skills/, pinned to git-1c7c388d.
- .claude/skills/fix-mermaid/SKILL.md
Document
name: fix-mermaid description: "Validates and repairs mermaid diagrams in markdown files. Scans for mermaid blocks, validates syntax, and auto-repairs common errors." metadata: category: documentation is_workflow: false version: 1.0.0 tags: - documentation - validation - repair created: 2025-12-11 updated: 2026-02-26 author: cloud-on-prem/rp1 arguments: - name: FILE_PATH type: string required: true description: "Path to markdown file, or - for stdin diagram" sub_agents: - "rp1-base:mermaid-fixer"
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)
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-1c7c388d3bb82026-07-31