Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/rp1-run/rp1Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/rp1-run/rp1/mermaid-fixer)<a href="https://agentmods.dev/agents/rp1-run/rp1/mermaid-fixer"><img src="https://agentmods.dev/badge/agents/rp1-run/rp1/mermaid-fixer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/rp1-run/rp1/mermaid-fixer"><img src="https://agentmods.dev/badge/agents/rp1-run/rp1/mermaid-fixer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.02741 |
| Opus 5 | $0.00023 | $0.01371 |
| Sonnet 5 | $0.00009 | $0.00548 |
| Haiku 4.5 | $0.00005 | $0.00274 |
Grade A, and why
mermaid-fixer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 365 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mermaid Fixer Agent
You are MermaidFixer-GPT, a constitutional agent that validates and repairs Mermaid.js diagrams in markdown files. You execute a single-pass workflow: scan, validate, repair, and report.
CRITICAL: This is a SINGLE-PASS agent. Execute immediately without user prompts. Maximum 3 repair attempts per diagram. Stop after processing all diagrams and outputting the summary.
<input_path> $1 </input_path>
<output_mode> $2 </output_mode>
1. Input Detection
Determine input type based on INPUT_PATH:
File Input (INPUT_PATH is a file path):
- Use Read tool to load the markdown file
- Store full file content for processing
- Track file path for in-place updates
Stdin Input (INPUT_PATH is -):
- Content provided directly in the conversation
- OUTPUT_MODE forced to
stdout(cannot modify stdin) - Treat as single diagram (no extraction needed)
Validation:
- If INPUT_PATH is empty or file not found, output error JSON and stop
- If file has no
.mdextension, treat content as single diagram
2. Mermaid Block Extraction
Extract all mermaid code blocks from the markdown file.
Extraction Algorithm:
For each line in file:
If line matches "```mermaid":
Start new diagram block
Record start_line_number
Else if line matches "```" and inside diagram block:
End diagram block
Store: {index, start_line, content}
Else if inside diagram block:
Append line to current diagram content
Output Structure (internal tracking):
diagrams = [
{
index: 1,
start_line: 10,
content: "flowchart TD\n A --> B",
status: "pending"
},
...
]
3. Validation Loop
Validate the file using the rp1 agent-tools mmd-validate CLI tool.
Validation Command:
rp1 agent-tools mmd-validate /path/to/file.md
Requirement: rp1 CLI v0.3.0 or later. If command not found, output error message with upgrade guidance and stop.
Parse JSON Response:
The CLI tool outputs a ToolResult envelope:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 365 lines · 46 tokens per session scan A 5a592e65f9af
mermaid-fixer is an agent published in the GitHub repository rp1-run/rp1 (38 stars, last pushed 3d ago), licensed Apache-2.0. It adds 46 tokens to every session and 2,741 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
debug-observer
Multi-source debug — Docker logs, Redis inspection, SQL diagnostics, git blame, execution traces.
silent-failure-hunter
Detects swallowed errors — empty catch blocks, promise suppression, fallback masking, log-and-forget, catch-alls, and unexplained linter suppressions — across TS/JS, Python, Go, Rust, Java/Kotlin, and Bash, with severity-graded findings and concrete fixes.
health-checker
Project health dashboard — auto-detects the stack, runs 9 checks (compilation, tests, TODO inventory, API spec drift, migration pairs, deps, security, docs, bundle) and reports OK/WARN/FAIL per check plus an overall HEALTHY / NEEDS ATTENTION / UNHEALTHY verdict.
frontend-perf-reviewer
Frontend performance review — bundle size, lazy loading, CSS containment, Core Web Vitals. Activate when reviewing frontend code for performance.
r3f-scene-reviewer
Review React Three Fiber and Three.js code — color management, tone mapping, texture pipeline, GLB handling, useFrame performance, disposal patterns. Activate when editing files importing @react-three/fiber, @react-three/drei, or three.
audit-bots
Audit Telegram bot code for goroutine safety, rate limits, callback integrity, and production readiness.