RO

root-cause-analysis

Performs post-failure analysis focusing on system improvements rather than individual blame.

Install

mkdir -p .claude/skills/root-cause-analysis && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18752" && unzip -o skill.zip -d .claude/skills/root-cause-analysis && rm skill.zip

Installs to .claude/skills/root-cause-analysis

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Blameless root-cause analysis that produces durable system levers, not blame or one-off patches. Use AFTER a failure/regression/wrong-output/near-miss when you need to explain why it existed AND why it escaped controls, then land the smallest system change that prevents recurrence. Tiered L0/L1/L2 by impact. Distinct from debug-loop (which fixes the live bug); this is what debug-loop's report step and the recursive-retrospective §8 delegate to. Agent-invoked (no dedicated command); the design is optimized for agent use: structured tiered (L0/L1/L2) output, primarily reached by delegation from debug-loop, recursive-retrospective, and the RCA agents; a human can still reach it by natural-language request after a failure. NOT for searching/storing past incidents — that is `debugging-memory` (`{op:search|store}`).
821 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Diagnose failures without blame
  • Identify durable system levers
  • Produce corrective actions to prevent recurrence
  • Explain creation path of bad conditions
  • Explain escape path of failures past controls
  • Generate tiered L0/L1/L2 RCA reports

How it works

The skill analyzes why a failure occurred and why it bypassed controls, producing a report that identifies the smallest system change to prevent recurrence, focusing on creation and escape paths.

Inputs & outputs

You give it
A failure, regression, wrong output, or near-miss event
You get back
A blameless root-cause analysis report with durable system changes

When to use root-cause-analysis

  • Post-mortem analysis after regression
  • Investigating failure patterns
  • Identifying systemic weak points

About this skill

Root Cause Analysis

Diagnose failures without blame, identify durable system levers, and produce corrective actions that prevent recurrence. A valid RCA explains BOTH the creation path (why the bad condition existed) and the escape path (why it reached the user/repo/system despite controls). The goal is the smallest durable system change that would have prevented, detected, contained, or reversed the failure — not assigning fault.

Boundary (read first — avoids overlap)

  • debug-loop / debugging-memory = live, find-and-fix THIS bug now (iterative investigate→fix→verify).
  • root-cause-analysis (this) = blameless post-failure analysis → durable lever + actuator + regression artifact + spread check. It runs after the fix, or on a class/pattern, and is what debug-loop's report phase and recursive-retrospective §8 should invoke instead of carrying their own mini-RCA.

The three prompts (modular)

  1. General RCAreferences/root-cause-analysis/01-rca.md: any failure. Tiered L0 (log) / L1 (mini) / L2 (full).
  2. Agentic Coding RCAreferences/root-cause-analysis/02-agentic-rca.md: extension of Prompt 1 for AI-coding-agent failures (attribution gate, agentic failure modes, loop-fix vs code-repair). It is Prompt 1 + deltas, not a restatement.
  3. Mini-RCAreferences/root-cause-analysis/03-mini-rca.md: lightweight L1 for low-risk issues.
  4. Judgereferences/root-cause-analysis/04-judge.md: independent evaluator with a mandatory verification gate (a claim is FACT only if checked against source). NEW vs the source suite — closes the "labeled FACT but never verified" gap.

Hardening applied (vs the source RCA suite)

  • Level↔schema binding. L0 = 3 fields; L1 = Mini-RCA; only L2 uses the full schema. The full output schema does NOT apply to L0/L1 (the source "use this exact structure" fought the tiering).
  • Density governor. Omit a section that yields no signal; never pad an empty table. Shorter-with-signal beats exhaustive.
  • Verify-before-FACT. A causal claim may be tagged FACT only if independently checked against its cited source this session; otherwise INFERENCE/ASSUMPTION.
  • Tool-bound spread check. "Where else could this happen?" is a grep/NavGator-impact job, not prose — run the scan and cite hits.
  • Owner optional in agent contexts. The owner of a durable fix is often a gate/hook, not a person; actuator + regression artifact are the real closure, not owner/due-date.
  • Mini-RCA tree-escalation. If a second independent contributor appears, escalate from the linear four-whys to the L2 causal map.

Native strengths preserved (the reason this suite is worth keeping)

  • Creation path + escape path duality (control existed? fired? ignored/misread/bypassed/too weak?).
  • Action Strength Hierarchy (eliminate > substitute > forcing-function > standardize > automate-detection > checklist > train/doc). "Be more careful" / docs-as-sole-fix is banned unless risk is low and no stronger lever is feasible.
  • Lever + Actuator (where the fix lands vs what makes it fire) — the dormant-fix antidote.
  • Banned closures: human error · agent error · be more careful · edge case · quirk · cosmetic · one-off · works now · "fixed in code" without prevention.
  • Regression artifact proving old-behavior-fails / new-behavior-passes.
  • First Attribution Gate (agentic): check task/context/loop/tool/codebase/verification/review BEFORE blaming the agent.

Model tiering

  • L2 RCA + the judge are Frontier-tier (Fable); judge MUST run independent of the analysis author. Frontier-unavailable → Opus fallback, never Code tier.
  • L0/L1 can run at the executor tier.

Output homes

  • Corrective actions with a memory/rule target route through the canonical memory_writer.py; regression artifacts (tests/evals/policy/checklist) commit in-repo.

When not to use it

  • For live, find-and-fix bugs
  • For searching or storing past incidents
  • When assigning fault or blame

Limitations

  • A valid RCA explains BOTH the creation path and the escape path
  • A causal claim may be tagged FACT only if independently checked against its cited source
  • Banned closures: human error, agent error, be more careful, edge case, quirk, cosmetic, one-off, works now, fixed in code without prevention

How it compares

This skill provides a structured, blameless post-failure analysis to identify durable system levers and corrective actions, distinct from immediate bug fixing.

Compared to similar skills

root-cause-analysis side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
root-cause-analysis (this skill)025dNo flagsAdvanced
error-handling-patterns352moNo flagsIntermediate
codebase-context-extractor49moReviewIntermediate
investigating-code-patterns18moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry