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.zipInstalls 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}`).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
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 andrecursive-retrospective§8 should invoke instead of carrying their own mini-RCA.
The three prompts (modular)
- General RCA —
references/root-cause-analysis/01-rca.md: any failure. Tiered L0 (log) / L1 (mini) / L2 (full). - Agentic Coding RCA —
references/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. - Mini-RCA —
references/root-cause-analysis/03-mini-rca.md: lightweight L1 for low-risk issues. - Judge —
references/root-cause-analysis/04-judge.md: independent evaluator with a mandatory verification gate (a claim isFACTonly 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
FACTonly if independently checked against its cited source this session; otherwiseINFERENCE/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 artifactare the real closure, notowner/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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| root-cause-analysis (this skill) | 0 | 25d | No flags | Advanced |
| error-handling-patterns | 35 | 2mo | No flags | Intermediate |
| codebase-context-extractor | 4 | 9mo | Review | Intermediate |
| investigating-code-patterns | 1 | 8mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
error-handling-patterns
wshobson
Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.
codebase-context-extractor
lofcz
This skill provides a comprehensive context extraction system for large codebases. It intelligently analyzes code structure, dependencies, and relationships to extract relevant context for understanding, debugging, or modifying code.
investigating-code-patterns
CaptainCrouton89
Systematically trace code flows, locate implementations, diagnose performance issues, and map system architecture. Use when understanding how existing systems work, researching concepts, exploring code structure, or answering "how/where/why is X implemented?" questions.
investigate
MadAppGang
Unified entry point for code investigation. Auto-routes to specialized detective based on query keywords. Use when investigation type is unclear or for general exploration.
claude
yuiseki
|
analyse
eschaar
Cross-cutting technical analysis. Investigates impact, tradeoffs, root causes, or feasibility without implementing changes. Use when asked to "analyse this", "investigate the impact", "what are the tradeoffs", "root cause analysis", "is this feasible?", or "compare these approaches". Produces an ana