root-cause-analysis

root-cause-analysis is a skill for Claude Code from autohandai/code-cli. It costs 50 tokens per session (452 once invoked), scanned A, original, Apache-2.0.

A structured method for writing a root-cause analysis after an incident, outage, regression, or recurring failure. The report records what happened, why it happened, contributing factors, and actions to prevent a repeat.

In plain words
What is it for?
Use it for post-mortems, service outages, regressions, and repeated failures, including timelines, triggers, design gaps, and prevention work.
Why use it?
It turns scattered logs and recollections into an evidence-based explanation that other engineers can act on.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it for post-mortems, service outages, regressions, and repeated failures, including timelines, triggers, design gaps, and prevention work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/autohandai/code-cli/root-cause-analysis
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.

Any agent
npx skills add autohandai/code-cli --skill root-cause-analysis
Clone the repo
git clone --depth 1 https://github.com/autohandai/code-cli

Made for: Claude Code.

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 root-cause-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/autohandai/code-cli/root-cause-analysis/github.svg)](https://agentmods.dev/skills/autohandai/code-cli/root-cause-analysis)
Your own site
<a href="https://agentmods.dev/skills/autohandai/code-cli/root-cause-analysis"><img src="https://agentmods.dev/badge/skills/autohandai/code-cli/root-cause-analysis/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.

agentmods 80×15 button for root-cause-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/autohandai/code-cli/root-cause-analysis"><img src="https://agentmods.dev/badge/skills/autohandai/code-cli/root-cause-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 452 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00050 $0.00452
Opus 5.5 $0.00020 $0.00181
Sonnet 5.5 $0.00010 $0.00090
Haiku 4.5 $0.00005 $0.00045

Measured 1mo ago against content hash 8566f51fc2c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

root-cause-analysis 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 1mo 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.

src/skills/builtin/root-cause-analysis/SKILL.md · 46 lines

What it actually says

Root-cause analysis

The goal is a document another engineer can act on: what happened, why it was possible, and what stops the class of failure, not just this instance.

Gather evidence first

  1. Establish the timeline from artifacts, not memory: commits (git_log), deploys, config changes, alerts, logs, test runs. Timestamp everything.
  2. Identify the trigger (the change or event) separately from the cause (why the system could not tolerate it) and the contributing factors (what let it reach users).
  3. Reproduce or at least confirm the mechanism in code with file paths and line numbers. Quote the exact lines.

Ask "why" until the answer is a design decision

Stop at a decision someone can change (a missing check, an assumed invariant, a shared resource, an unbounded wait), not at "human error". People make the same mistakes when the system makes them easy.

Write the report

Use this shape, kept short:

  • Impact: who, what, how long, blast radius.
  • Timeline: bullet list with times.
  • Trigger: the change or event.
  • Root cause: the design gap, with code references.
  • Contributing factors: detection, rollout, tests, ownership.
  • What went well: what limited the damage.
  • Actions: each with an owner-shaped verb, a test or check that would have caught it, and whether it prevents, detects, or mitigates. Prefer changes to the system over reminders to people.

Verify before delivering

Every claim in the report must trace to evidence you collected. If something is inferred, label it as such. Offer to open the follow-up tasks.

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. 1mo ago First seen · 46 lines · 50 tokens per session scan A 8566f51fc2c0

Subscribe to this mod's changes

root-cause-analysis is a skill published in the GitHub repository autohandai/code-cli (205 stars, last pushed today), licensed Apache-2.0. It adds 50 tokens to every session and 452 once invoked, about $0.0002 per session on Opus 5.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-09-15.

Related

Other skills, from other repositories

neuron-monitoring

Monitor Neuron AI agents and workflows with events observability, logging, and performance analysis. Use this skill whenever the user mentions debugging, monitoring, observability, performance analysis, tracing, or needs to understand why an agent is behaving a certain way. Also trigger for tasks involving agent…

neuron-core/neuron-ai · 80 tokens

evidence-audit

Evidence-led audit/fix rounds for any codebase in any language. Finds only defects that a runnable proof reproduces on current code, applies the narrowest in-scope patch, verifies with a second proof, promotes high-risk proofs to permanent regression tests, and reports exact validation results. Use whenever the user…

WrongStack/WrongStack · 152 tokens

bug-hunter

Use this skill when scanning source code for bugs, anti-patterns, code smells, or quality issues in a codebase, or when running a proof-driven bug hunt that must find, prove, fix, and verify one real defect. Trigger on the explicit vocabulary — "bug", "bug hunt", "/bughunt", "scan for issues", "find problems"…

WrongStack/WrongStack · 186 tokens

debugging

Use this skill when something is broken and the cause is unknown — a failing test, a crash, an error message, wrong output, a regression, a hang, or behaviour that differs between environments — and it has to be found and fixed at the root. Also use it to build the failing proof for a suspected defect before fixing…

WrongStack/WrongStack · 148 tokens

observability

Use this skill when adding or reviewing logging, metrics, or tracing in an application, or when a production problem can't be diagnosed from the signals that exist today. Triggers: user says "logging", "logs", "trace", "tracing", "metrics", "observability", "instrument", "OpenTelemetry", "structured logging", "log…

WrongStack/WrongStack · 86 tokens

remote-debugging

Diagnose a reported application failure on explicitly authorized remote hosts using bounded logs and runtime evidence. Use when local behavior differs from a known server or deployment; start read-only and keep diagnosis separate from disruptive remediation.

WrongStack/WrongStack · 45 tokens