root-cause

root-cause is a skill for Claude Code from CassioRoos/godfly-skills. It costs 107 tokens per session (817 once invoked), scanned A, original, MIT.

An evidence-based method for finding the underlying systemic cause after a failure has already happened. It uses Five Whys, repeatedly asking why, while linking each answer to evidence such as logs, code, configuration, or timeline facts.

In plain words
What is it for?
Use it for root-cause and causal-chain analysis after an incident, when the immediate failure is understood but the deeper changeable cause is not.
Why use it?
It helps teams move beyond the immediate symptom and avoid unsupported guesses about what caused an incident.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it for root-cause and causal-chain analysis after an incident, when the immediate failure is understood but the deeper changeable cause is not.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cassioroos/godfly-skills/root-cause
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 CassioRoos/godfly-skills --skill root-cause
Clone the repo
git clone --depth 1 https://github.com/CassioRoos/godfly-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/cassioroos/godfly-skills/root-cause.svg)](https://agentmods.dev/skills/cassioroos/godfly-skills/root-cause)
Your own site
<a href="https://agentmods.dev/skills/cassioroos/godfly-skills/root-cause"><img src="https://agentmods.dev/badge/skills/cassioroos/godfly-skills/root-cause.svg" alt="Measured on agentmods" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 817 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.00107 $0.00817
Opus 5 $0.00053 $0.00409
Sonnet 5 $0.00021 $0.00163
Haiku 4.5 $0.00011 $0.00082

Measured 7d ago against content hash cf656616b79f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

root-cause 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 7d 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.

skills/root-cause/SKILL.md · 68 lines

How it starts

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

Root Cause - Post-Hoc Causal-Chain Analysis

Something already happened. The fire is out, the immediate failure is understood. Now trace the symptom back through an evidence-backed causal chain to the systemic cause the team can actually change.

Quick Start

  1. State the symptom in specific, observable terms (with timestamp/scope)
  2. Build the why-chain — every link cites evidence, branches allowed
  3. Stop at a changeable systemic cause, then challenge the constraint that produced it
  4. Emit the output contract: causal chain table, contributing factors, fix targets

Not This Skill

Situation Use instead
System is failing right now troubleshooting-investigator
Understanding a working system deep-dive
Writing the postmortem document premortem-postmortem (which calls this skill for causal analysis)

Techniques

Evidence-Backed Five Whys

Chain backward from symptom to systemic cause. Every "why" answer must cite evidence — a log line, code path, config value, data record, or timeline fact. Narrative answers without evidence are rejected and recorded as assumptions, not links.

Read cookbook/five-whys.md

Constraint Challenge (First Principles)

Once the chain reaches a systemic cause, identify the inherited assumption or constraint that produced it and test whether it still holds. This is where "fix the bug" becomes "fix the system that made the bug inevitable".

Read cookbook/first-principles.md

Wrong-Problem Check

Sometimes the chain terminates not in a broken mechanism but in "the system was solving the wrong problem". When that happens, ask what job the system was actually hired to do — the failure is a mismatch between the job and the design, and the fix target is the design premise, not the code.

Output Contract

Every analysis produces:

  1. Causal chain table: symptom → why-1..n → systemic cause, with evidence cited per link (assumptions explicitly flagged)
  2. Contributing factors list: branch causes that enabled or amplified the failure
  3. Recommended fix targets: the changeable process, design, or constraint per root — never "person X should be more careful"

Read the full file on GitHub · 68 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 68 lines · 107 tokens per session scan A cf656616b79f

Subscribe to this mod's changes

root-cause is a skill published in the GitHub repository CassioRoos/godfly-skills (1 stars, last pushed 7d ago), licensed MIT. It adds 107 tokens to every session and 817 once invoked, about $0.0005 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 skills, from other repositories

code-remediate

Apply selected review fixes; bare PR targets use current online items, while PR +review adds the latest matching artifact.

Borda/AI-Rig · 28 tokens

audit

Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.

oliver-kriska/claude-elixir-phoenix · 35 tokens

polish-code

Stage, format, lint, test, review, smoke test, and re-run itself until stable. Use when the user asks to "polish code", "refine code", "iterate on code quality", "review loop", "clean up, test, and review loop", or "run the polish loop".

tobihagemann/turbo · 67 tokens

java-code-review

Review Java code for bugs, duplicate code, correctness risks, maintainability improvements, and missing tests. By default review files modified in git; when the user explicitly names files, classes, packages, or a diff, review that scope instead. Generate a detailed review.md report with actionable comments and fixes.

sivaprasadreddy/sivalabs-agent-skills · 64 tokens

simplify-code

Run a multi-agent review of changed files for scope, reuse, quality, efficiency, clarity, and altitude issues followed by fixes. Use when the user asks to "simplify code", "review changed code", "check for code reuse", "review code quality", "review efficiency", "simplify changes", "clean up code", "refactor changes"…

tobihagemann/turbo · 81 tokens

auto-test-code

A structured process for critically reviewing and testing software code. It records review findings, test plans, commands, results, and supporting files in a project workspace.

huangwb8/skills · 56 tokens