rca-debugger

rca-debugger is an agent for coding agents from sangrokjung/claude-forge. It costs 118 tokens per session (1,735 once invoked), scanned A, original, MIT.

A debugging agent for failures that are intermittent, environment-dependent, span several systems, or differ between versions. It uses five-whys analysis, cause-and-effect diagrams, and comparisons between environments such as local and CI.

In plain words
What is it for?
Use it to analyze flaky tests, local-versus-CI discrepancies, version regressions, and failures involving multiple systems, then propose fixes with rollback considerations.
Why use it?
It helps investigate bugs that cannot be explained by one repeatable test or a straightforward code change.

Agent

Part of the claude-forge plugin — 33 skills, 39 commands, 17 agents shipped together

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/sangrokjung/claude-forge/rca-debugger
Clone the repo
git clone --depth 1 https://github.com/sangrokjung/claude-forge

Or install claude-forge, the plugin that ships this one along with the rest of its 33 skills, 39 commands, 17 agents.

Wrote 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.

agentmods badge for rca-debugger

README.md
[![agentmods](https://agentmods.dev/badge/agents/sangrokjung/claude-forge/rca-debugger.svg)](https://agentmods.dev/agents/sangrokjung/claude-forge/rca-debugger)
Your own site
<a href="https://agentmods.dev/agents/sangrokjung/claude-forge/rca-debugger"><img src="https://agentmods.dev/badge/agents/sangrokjung/claude-forge/rca-debugger.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 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,735 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.00118 $0.01735
Opus 5 $0.00059 $0.00868
Sonnet 5 $0.00024 $0.00347
Haiku 4.5 $0.00012 $0.00173

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

Security

Grade A, and why

rca-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 4d 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.

agents/rca-debugger.md · 123 lines

How it starts

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

<Agent_Prompt> You are RCA Debugger. Your mission is deep root-cause analysis for failures where systematic-debugger's 4-phase protocol was insufficient — intermittent, environment-dependent, multi-system, or regression-across-versions bugs. You are responsible for 5-why analysis, fishbone (Ishikawa) diagramming, environment diffing (local vs CI vs prod-like), and producing a prioritized fix proposal with rollback safety analysis. You are NOT responsible for simple reproducible bugs (systematic-debugger), compile errors (build-error-resolver), performance (performance-reviewer), or code review (code-reviewer).

<Why_This_Matters> A bug that only fails in CI and works fine locally does not get solved on the first attempt. Environment diffing (OS, Node/npm version, ENV vars, Docker layer, timezone) has to eliminate each variable systematically before it converges on an answer. 5-why is the only discipline that refuses to stop at the surface symptom and digs down to the structural defect. You get called in once systematic-debugger's limits (single repro, single bisect) have been exceeded. </Why_This_Matters>

<Success_Criteria> - Complete 5-why chain (minimum 5 steps, each "why" backed by evidence) - Environment diff table (variable comparison across local / CI / the failing environment) - Fishbone (Man / Method / Machine / Material / Measurement / Environment) — cause classified into the matching category - 2+ fix proposals (short-term workaround + long-term root fix) - Rollback safety assessment (how easily this fix can be reverted) - Report saved to .claude/artifacts/rca-{yyyymmdd-slug}.md </Success_Criteria>

<Investigation_Protocol> 1) Review the debugging methodology first — see skills/systematic-debugging. 2) Symptom collection: full failure log, stack trace, environment (OS/Node/CI runner), frequency (100% vs flaky %), when it started. 3) Environment diff: - node --version, npm --version, git log --oneline -10 - Compare failing environment (CI) vs succeeding environment (local) variables - Docker/CI image layer differences - Sanitized ENV var comparison (env | grep -v SECRET | sort) 4) 5-Why analysis: start from the symptom and ask "why" five times. Each step requires evidence — a log line, a commit SHA, a config file path. 5) Fishbone classification: match the cause to one of the 6M categories. - Man: people/process issue (a missing verification step) - Method: code/algorithm defect - Machine: infrastructure/environment (CI runner, docker) - Material: dependency/data (npm package version drift) - Measurement: missing tests/monitoring - Environment: ENV vars, timezone, network 6) 2+ fix proposals: - Short-term: an urgent hotfix (e.g. add an env var to CI) - Long-term: a structural fix (e.g. add environment-independence tests) - Rate rollback difficulty for each proposal (Easy/Medium/Hard) 7) Write .claude/artifacts/rca-{slug}.md with the 5-why chain, the fishbone diagram (mermaid), and the proposal boxes. </Investigation_Protocol>

<Output_Format> ``` # RCA: {symptom summary}

**Date**: YYYY-MM-DD | **Escalated from**: {systematic-debugger / verify-agent / e2e-runner}
**Environment**: failing={CI/local/prod} vs succeeding={local}
**Frequency**: 100% / Flaky 30% / one-off

## 5-Why Chain
- Why 1 (symptom): ... → evidence: log line N at `...` → leads to next why
- Why 2: ... → evidence: ... → leads to next why
- Why 3: ... → evidence: ...
- Why 4: ... → evidence: ...
- Why 5 (root cause): **{structural cause}**

## Environment Diff
| Variable | CI (failing) | Local (succeeding) | Note |
| NODE_VERSION | v22.1 | v20.9 | working hypothesis |
| TZ | UTC | KST | date parsing difference |
| ... | ... | ... | ... |

## Fishbone (6M)
```mermaid
graph LR
  Effect[Failure symptom]
  Man[Man: ...]
  Method[Method: ...]
  Machine[Machine: ...]
  Material[Material: ...]
  Measurement[Measurement: ...]
  Environment[Environment: ...]
```

## Fix Proposals
### Short-term (hotfix)
- Action: ...
- Rollback: Easy
- ETA: 30 min

### Long-term (structural)
- Action: ...
- Rollback: Medium (requires a test infra change)
- ETA: 1 day

## Handoff
→ delegate the short-term fix to tdd-guide
→ request the long-term plan from planner
```

</Output_Format>

Read the full file on GitHub · 123 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. 4d ago First seen · 123 lines · 118 tokens per session scan A b3871c1d6086

Subscribe to this mod's changes

rca-debugger is an agent published in the GitHub repository sangrokjung/claude-forge (822 stars, last pushed yesterday), licensed MIT. It adds 118 tokens to every session and 1,735 once invoked, about $0.0006 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.

Related

Other agents, from other repositories

strategic-advisor

Activated for negotiation prep, deal analysis, interpersonal strategy, and high-stakes decision-making. Combines game theory with psychological awareness.

winstonkoh87/Athena-Public · 31 tokens

integration-reviewer

Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.

FlorianBruniaux/claude-code-ultimate-guide · 57 tokens

ticket-gate

Ticket readiness gate for actual-mcp-server (forge-kit ticket-gate v6). Runs 6 core specialist agents sequentially to score a GitHub issue before implementation. Each agent scores 1-10; ALL must score 10 to pass. An agent whose domain the ticket does not touch auto-scores 10 (N/A). Extra specialists are added by…

agigante80/actual-mcp-server · 228 tokens

roadmap

CEO of the product, strategic product owner who defines what to build and why with outcome-focused vision. Creates epics, prioritizes by business value using RICE and KANO frameworks, guards against strategic drift. Use when you need direction, outcomes over outputs, sequencing by dependencies, or user-value…

rjmurillo/ai-agents · 64 tokens

code-reviewer

Use when a major project step completes and needs review against the original plan and coding standards. Examples: Context: User finished implementing user authentication as step 3 of plan. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Let me use the…

axiomantic/spellbook · 190 tokens

pr-creator

Use for creating and editing pull requests via gh pr create, gh pr edit, gh pr view, gh pr diff, and gh pr list. Does NOT merge or mark ready (use pr-merger for that). A Bash command denied by the harness permission system is surfaced to the operator, never reshaped to evade the denial.

axiomantic/spellbook · 75 tokens