investigate-root-cause

investigate-root-cause is a skill for Claude Code from duthaho/claudekit. It costs 121 tokens per session (2,927 once invoked), scanned A, original, MIT.

A structured debugging workflow for bugs, errors, failed tests, crashes, and unexpected behavior. It requires gathering evidence and stating a likely cause before changing code.

In plain words
What is it for?
Use it to reproduce failures, inspect relevant code and evidence, form and test a root-cause hypothesis, and document why the eventual fix addresses the actual problem.
Why use it?
It helps prevent fixes that only hide symptoms or introduce new problems. The process produces a clear explanation that can be reviewed by other engineers.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the claudekit plugin — 15 skills, 8 agents shipped together

Good fit Use it to reproduce failures, inspect relevant code and evidence, form and test a root-cause hypothesis, and document why the eventual fix addresses the actual problem.

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

Made for: Claude Code.

Or install claudekit, the plugin that ships this one along with the rest of its 15 skills, 8 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/duthaho/claudekit/investigate-root-cause"><img src="https://agentmods.dev/badge/skills/duthaho/claudekit/investigate-root-cause.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,927 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00121 $0.02927
Opus 5 $0.00060 $0.01463
Sonnet 5 $0.00024 $0.00585
Haiku 4.5 $0.00012 $0.00293

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

Security

Grade A, and why

investigate-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 10d 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/investigate-root-cause/SKILL.md · 195 lines

How it starts

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

Investigate Root Cause

Overview

A four-phase debugging workflow that forces an engineer to gather evidence and write down a hypothesis before changing any code. The skill exists because the most common debugging failure isn't a missing technique — it's the engineer skipping past the error message, forming a vague mental theory, and patching the symptom. Every phase here produces an artifact you could paste into a code review. If you can't produce the artifact, you haven't done the phase. The skill is for senior ICs and tech leads who already know how to debug; what it adds is the discipline to refuse to fix what you don't yet understand.

When to Use

  • A test is failing and you don't already know why
  • An error message appeared that you cannot immediately point to a line of code for
  • A reproduction is intermittent (sometimes passes, sometimes fails)
  • A previously passing system started failing after no obvious cause
  • Production is misbehaving and the cause isn't in the most recent commit
  • You catch yourself about to write a fix while still uncertain why the bug happens

When NOT to Use

  • The error message names a missing import, typo, or syntax error and the fix is one character. Just fix it.
  • The runbook for this exact failure exists and the documented fix has been applied before. Follow the runbook.
  • The "bug" is a config value that needs flipping in an environment variable. Flip it.

Process

Four phases. Each phase has a gate. You do not advance until the gate's evidence artifact exists.

Phase 1: Gather

Goal: Surface every fact that already exists about this bug, before forming any theory.

Inputs: A bug report, a failing test, an error message, or a complaint ("it doesn't work").

Actions:

  1. Capture the literal error. Copy the full text of the error message and the complete stack trace. Do not paraphrase. If there is no error message, write down the exact observed-vs-expected behavior in one sentence each.
  2. Find the reproduction. Run the failing scenario yourself. Record the exact command, environment, and inputs. If you cannot reproduce it, that is the bug to investigate first — go to Step 3 and Step 4 and stay in Phase 1 until you can.
  3. Read recent history. Run git log --oneline -30 and read the last 30 commits. Note which commits touch files in the stack trace.
  4. Collect logs. Pull logs around the failure window. If structured logs exist, filter to the request or session that hit the bug. If not, raise the verbosity and re-run the reproduction.
  5. Look at the data. If the bug involves a record, fetch the record. If it involves a query, run the query. If it involves a request body, capture the body.

Read the full file on GitHub · 195 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. 10d ago First seen · 195 lines · 121 tokens per session scan A 0f2ea68f1362

Subscribe to this mod's changes

investigate-root-cause is a skill published in the GitHub repository duthaho/claudekit (97 stars, last pushed 1mo ago), licensed MIT. It adds 121 tokens to every session and 2,927 once invoked, about $0.0006 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-30.