root-cause-first

root-cause-first is a skill for Claude Code, Codex from benjaminard/fable-skills. It costs 57 tokens per session (639 once invoked), scanned A, original, MIT.

A debugging guide that requires finding and explaining the actual cause of an error before changing code. It emphasizes reproducing the problem, tracing the failing path, and checking real system state.

In plain words
What is it for?
Use it for bugs, crashes, failing tests, regressions, flaky behavior, and unexpected output before applying a fix.
Why use it?
It reduces guesswork and avoids patches that hide symptoms while leaving the underlying problem. This is especially useful when earlier fixes did not work or failures look familiar but may have another cause.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it for bugs, crashes, failing tests, regressions, flaky behavior, and unexpected output before applying a fix.

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

Made for: Claude Code, Codex.

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-first

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/benjaminard/fable-skills/root-cause-first"><img src="https://agentmods.dev/badge/skills/benjaminard/fable-skills/root-cause-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 639 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.00057 $0.00639
Opus 5.5 $0.00023 $0.00256
Sonnet 5.5 $0.00011 $0.00128
Haiku 4.5 $0.00006 $0.00064

Measured 1mo ago against content hash 0aa91e9853fa, 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-first 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.

skills/root-cause-first/SKILL.md · 40 lines

How it starts

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

Root Cause First

Fix causes, not symptoms. A fix applied to an undiagnosed problem is a guess, and guesses compound: each one changes the system, making the real cause harder to see.

Before you fix anything

  1. Reproduce it. Run the failing thing and watch it fail. If you cannot reproduce the failure, you cannot know your fix works, and you say so instead of claiming a fix.
  2. Trace it. Follow the failure from the symptom back to the cause: read the actual error, read the code path that produced it, inspect the actual state (logs, variables, files, network) rather than assuming it. Stop tracing only when you can explain the mechanism: "X happens because Y does Z."
  3. Beware pattern-matching. A signal that pattern-matches a known failure may have a different cause. "This looks like the usual CORS issue" is a hypothesis, not a diagnosis. Verify the mechanism before acting on the resemblance, especially before any state-changing action like a restart, delete, or config edit.
  4. Then fix the cause. If the honest fix is upstream (a data problem, a wrong assumption in a caller, a stale dependency), fix it there. Do not patch the symptom downstream and call it done. If a downstream patch is genuinely the right short-term call, label it a bridge and state the debt it creates.

The failed-approach ledger

When a fix attempt fails, write down (in a scratch file or your working notes) before doing anything else:

  • What you tried
  • What you expected
  • What actually happened
  • What this rules out

Then, and only then, form the next hypothesis. The ledger exists to enforce one rule: never retry a failed approach verbatim. If you find yourself making the same edit a second time, or re-running the same command hoping for a different result, stop. That is the signal you are guessing.

The two-failure rule

After two failed fix attempts, stop fixing and restart diagnosis from scratch:

  1. Re-read the original error with fresh eyes. The answer is often in a line you skimmed.
  2. Question your framing: is the bug even where you think it is? Check one layer up and one layer down.
  3. Shrink the reproduction: find the smallest input or code path that still fails.
  4. If available, hand the evidence (not your theory) to a fresh-context subagent and ask it to diagnose independently. Your accumulated assumptions are now part of the problem.

Read the full file on GitHub · 40 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. 1mo ago First seen · 40 lines · 57 tokens per session scan A 0aa91e9853fa

Subscribe to this mod's changes

root-cause-first is a skill published in the GitHub repository benjaminard/fable-skills (34 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 639 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-08-30.

Related

Other skills, from other repositories

alterlab-link-health

Audits and repairs Markdown link health across a skills repo via a four-tier pipeline (config hardening, intra-repo file-ref fixes, external URL substitutions, residual exclusions) and enforces a Tier 3 substitution guardrail that prevents regressions of previously-passing links; designed for lychee-based GitHub…

AlterLab-IEU/AlterLab-Academic-Skills · 160 tokens

performance-analysis

Performance analysis, bottleneck detection, and optimization recommendations. Use when profiling slow code or systems, hunting a performance regression, or producing an optimization plan with measurable targets.

frankxai/claude-skills-library · 36 tokens

pair-programming

AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with…

frankxai/claude-skills-library · 85 tokens

debug

Diagnosis before prescription: reproduce, hypothesize, isolate, fix root cause, add a regression test; refactor mode maps deps, coupling and blast radius. Triggers: bug, error, fix, broken, not working, crashed, stack trace, exception, refactor, restructure, coupling, dependency map.

ariaxhan/kernel-claude · 64 tokens

opus-pocus

The grand ritual — run the Opus Pocus audit passes over this repo's Claude instruction layer (memory files, hooks, skills, agents) and its automation layer, then emit The O.W.L. report with a grade per spell and a fix table you approve from. Triages first, so passes with no subject in your repo are marked N/A rather…

Totes-MickGOATs/opus-pocus · 176 tokens

alohomora

Audit blocking guards for over-reach — false positives that refuse legitimate work. Finds path resolution that treats out-of-scope paths as in-scope, guards applied to work outside the resource they protect, matching on symptom instead of emitter AND condition, missing or uncapped escape hatches, and block messages…

Totes-MickGOATs/opus-pocus · 160 tokens