root-cause

root-cause is a command for Claude Code from radumarias/xorio-claude-plugin. It costs 37 tokens per session (1,092 once invoked), scanned A, original, MIT.

A method for finding the most likely underlying cause of a software problem by repeatedly asking why and checking evidence.

In plain words
What is it for?
Use it for focused debugging with a five-whys investigation, or choose deep mode for problems with several possible causes.
Why use it?
It reduces the risk of treating a visible symptom as the real cause or relying on unsupported guesses.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the xorio plugin — 10 skills, 10 commands, 4 agents, 2 hooks shipped together

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.

agentmods
npx agentmods add commands/radumarias/xorio-claude-plugin/root-cause
Clone the repo
git clone --depth 1 https://github.com/radumarias/xorio-claude-plugin

Made for: Claude Code.

Or install xorio, the plugin that ships this one along with the rest of its 10 skills, 10 commands, 4 agents, 2 hooks.

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/commands/radumarias/xorio-claude-plugin/root-cause.svg)](https://agentmods.dev/commands/radumarias/xorio-claude-plugin/root-cause)
Your own site
<a href="https://agentmods.dev/commands/radumarias/xorio-claude-plugin/root-cause"><img src="https://agentmods.dev/badge/commands/radumarias/xorio-claude-plugin/root-cause.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,092 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00037 $0.01092
Opus 5 $0.00018 $0.00546
Sonnet 5 $0.00007 $0.00218
Haiku 4.5 $0.00004 $0.00109

Measured 5d ago against content hash 33b9b2855ffe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 5d 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.

commands/root-cause.md · 67 lines

How it starts

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

Root Cause Analysis

Identify the most plausible root cause of the given problem — grounded in evidence, not speculation.

Problem

$ARGUMENTS

Mode select

Parse $ARGUMENTS for the --deep flag (strip it from the problem text):

  • absent → Light mode (default): a single evidence-grounded 5 Whys pass. Fast, cheap, interactive-friendly. Best for a well-scoped problem.
  • present → Deep mode: a multi-agent causal-tree investigation via the Workflow tool. Use for gnarly, ambiguous, or likely-multi-cause failures. Costs more — --deep is the explicit opt-in to multi-agent orchestration.

Light mode (default) — evidence-grounded 5 Whys

Apply the "5 Whys" — "five" is a guideline; iterate more or fewer times until you reach a root cause or detect a cycle. Two rules separate a real RCA from a guess:

  1. Ground every link before accepting it. Each "because" is a claim — prove it against the system, don't assert it:
    • what changed / whengit log / git blame / (if it narrows it) git bisect
    • the code behaves as claimed → grep/read the path; better, run the repro or the failing test
    • cite the evidence inline (file:line, commit SHA, command + output). A link you can't ground is a hypothesis, not a cause — label it so.
  2. Don't tunnel. At the first "why", list 2–4 candidate causes, not one; pursue the best-evidenced. Before concluding, name at least one alternative branch and state what evidence rules it out. Convergence from two angles beats a single chain.

State the problem, then iterate: answer → ground → "why?" → … Keep a running record (see Output). Stop at the root cause (or a detected cycle), then conclude.


Deep mode (--deep) — parallel, verified causal tree

Drive this with the Workflow tool (dynamic fan-out → pipeline); a simple case may run inline with parallel Task agents instead. Resolve model tiers at runtime — never hardcode model names: STRONG = the most capable model available (from the session environment), MID = one tier below (cheaper, mechanical/structured work), LIGHT = the cheapest (trivial gates). If the ranking is unclear, omit the model and inherit the session model.

Read the full file on GitHub · 67 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. 5d ago First seen · 67 lines · 37 tokens per session scan A 33b9b2855ffe

Subscribe to this mod's changes

root-cause is a command published in the GitHub repository radumarias/xorio-claude-plugin (3 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,092 once invoked, about $0.0002 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.