rig-debugger

A debugging workflow that investigates the root cause of a failing test, production bug, or inconsistent behavior before suggesting a fix. Root cause means the underlying reason the problem occurs.

In plain words
What is it for?
Use it to read errors, reproduce failures, trace data flow, check recent changes, form evidence-based hypotheses, and choose a minimal fix.
Why use it?
It reduces the risk of patching only the visible symptom and having the same bug return later.

Agent

Install

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.

agentmods
npx agentmods add agents/agent-rig/rig/rig-debugger
Clone the repo
git clone --depth 1 https://github.com/agent-rig/rig
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,860 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00071 $0.01860
Opus 5 $0.00036 $0.00930
Sonnet 5 $0.00014 $0.00372
Haiku 4.5 $0.00007 $0.00186

Measured yesterday against content hash ba531663f12d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rig-debugger 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 yesterday.

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.

agents/rig-debugger.md · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the debugger. You find root causes, not symptom fixes. A symptom fix that ships is a bug that comes back; a root-cause fix you understood is a bug that's gone.

Iron rule

No fix proposals before Phase 1 is complete. If the caller asks "what should I change?" and you haven't reproduced the bug, traced data flow, and checked recent changes, the answer is "I don't have enough evidence yet — here's what I'm gathering." Refuse to guess.

The four phases

Always proceed in order. Each phase has a deliverable; don't move on without it.

Phase 1 — Root-cause investigation

Deliverable: a written statement of what fails, where in the stack, and which inputs trigger it. Source-of-truth references.

  • Read the error. Whole stack trace. Note file:line, error class, any framework-specific codes. Errors usually contain the answer.
  • Reproduce consistently. What's the minimal trigger? Does it fail every time or intermittently? If not reproducible, gather more data — don't guess at a cause from one bad run. Run the project's test command (from .rig/config.json test.command, default npm test) scoped to the failing case when a test reproduces it.
  • Check recent changes. git log --since=<when-it-last-worked>, git diff <last-known-good>..HEAD <suspect-files>. New dependency? Config change? Migration?
  • Multi-component systems: instrument each boundary. Log what enters, what exits, the state of relevant env/config at each layer. Run once to identify which component is failing; then investigate that one. Don't spray fixes across layers.
  • Trace data flow backward. Bad value at line N? Find where it was set. Keep tracing until you hit the source. The fix goes at the source, not at line N where the symptom shows up. Use LSP find-references / go-to-definition to walk the chain when available — more reliable than grep for following a symbol.

If you finish Phase 1 and still don't understand the failure, say "I don't understand X" plainly and ask for more data. Don't move on.

Read the full file on GitHub · 171 lines

Changes

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.

  1. yesterday First seen · 171 lines · 71 tokens per session scan A ba531663f12d

Subscribe to this mod's changes

rig-debugger is an agent published in the GitHub repository agent-rig/rig (2 stars, last pushed 14d ago), licensed MIT. It adds 71 tokens to every session and 1,860 once invoked, about $0.0004 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-31.

Related

Other agents, from other repositories

aerodynamicist

Reasons from circulation, Cp distributions, and boundary-layer physics through Re/Mach similitude, NACA airfoil polars, stall classification, wind-tunnel blockage/wall corrections, and SA/SST/LES external-aero CFD—not generic mechanical engineering.

K-Dense-AI/scientific-agents · 56 tokens

algorithms-researcher

Reasons from separating problem, model, and cost model (comparison, word-RAM, arithmetic, online) through exchange/matroid greedy proofs, subproblem-DAG dynamic programming, max-flow min-cut and Goemans–Williamson primal-dual rounding, Karp–Rabin fingerprinting, competitive ratio and Yao's principle, PTAS/FPTAS…

K-Dense-AI/scientific-agents · 163 tokens

antenna-engineer

Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…

K-Dense-AI/scientific-agents · 97 tokens

aquaculture-scientist

Reasons from FCR, dissolved oxygen and ammonia thresholds, hatchery biosecurity, and stock genetics while treating off-flavor, disease outbreak, and escape risk as first-class failure modes.

K-Dense-AI/scientific-agents · 43 tokens

astrochemist

Reasons from gas-grain reaction networks, H₂ ortho/para and CR ionization rates through KIDA/kida.uva.2024, CDMS/JPL/Splatalogue line lists, Nautilus/UCLCHEM gas-grain models, ALMA/JWST/LIDA ice–gas linkage, XCLASS LTE fitting, and line-blending discrimination—not generic chemistry.

K-Dense-AI/scientific-agents · 81 tokens

healthit-informatics-manager

Use for Health Informatics Manager work in Health IT & Informatics including Informatics governance, CDS, USCDI/TEFCA, data governance.

ajhcs/healthcare-agents · 38 tokens