root-cause

root-cause is a skill for Claude Code from jjanczur/tyran. It costs 61 tokens per session (1,044 once invoked), scanned A, original, Apache-2.0.

A failure-investigation method that traces a bug or failed test to the mechanism causing it. It starts with a reproducible case and tests one variable at a time.

In plain words
What is it for?
Use it for bugs, unexplained red tests, and failures that do not reproduce reliably. It helps record the environment, experiments, prediction, and a test that pins the cause.
Why use it?
It prevents guessed fixes when the failure is unclear, intermittent, or cannot yet be reproduced.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tyran plugin — 15 skills, 5 agents, 5 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 skills/jjanczur/tyran/root-cause
Any agent
npx skills add jjanczur/tyran --skill root-cause
Clone the repo
git clone --depth 1 https://github.com/jjanczur/tyran

Made for: Claude Code.

Or install tyran, the plugin that ships this one along with the rest of its 15 skills, 5 agents, 5 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/skills/jjanczur/tyran/root-cause.svg)](https://agentmods.dev/skills/jjanczur/tyran/root-cause)
Your own site
<a href="https://agentmods.dev/skills/jjanczur/tyran/root-cause"><img src="https://agentmods.dev/badge/skills/jjanczur/tyran/root-cause.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,044 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.00061 $0.01044
Opus 5 $0.00030 $0.00522
Sonnet 5 $0.00012 $0.00209
Haiku 4.5 $0.00006 $0.00104

Measured 6d ago against content hash 4e7393937f88, 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 6d 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 · 90 lines

How it starts

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

Root cause — working a failure down to its mechanism

This is the situation the conductor is told to spend its most expensive reasoning on: a diagnosis, a failure nobody can reproduce, two agents who disagree. Spending more thinking on an undisciplined search just produces a more confident wrong answer, so here is the discipline.

Reproduce first. Everything else is downstream of this

A fix for a bug you cannot reproduce is a guess with a diff attached. You cannot tell whether it worked, and neither can the reviewer — the bug's absence after the change is indistinguishable from the bug's absence before it.

Get to the smallest reliable reproduction you can, and write down the exact command, input and environment. If it reproduces only sometimes, capture the rate — "3 of 20 runs" is a fact you can measure against later, "it is flaky" is not. If it will not reproduce at all, that is now the task: what does the failing environment have that yours does not — version, data, timezone, concurrency, permissions, a warm cache?

Read the whole error

The first line names where it surfaced, not where it went wrong. Read the full stack, the frames from your own code in particular, and everything logged in the seconds before. The answer is stated outright more often than anyone expects, which is why "I read the error" and "I read the first line of the error" have to be different sentences.

One variable, and write the prediction first

Change ONE thing per experiment, and write down what you expect to happen before you run it. An experiment whose outcome you did not predict teaches almost nothing: whatever comes back, it confirms something you already believed. A prediction that turns out wrong is the single most informative event available to you, and you only get it by committing first.

Two changes at once and you have learned nothing about either.

Halve the surface

Do not re-read the code hoping to spot it. Bisect.

  • Over time: git bisect against a command that exits non-zero on the failure. A scriptable check turns an afternoon into a few minutes.
  • Over the input: cut it in half, keep the half that still fails, repeat.
  • Over the system: disable, stub or bypass half the pipeline. Where does the value stop being correct? Instrument at the boundary between two components before you go inside either.

Read the full file on GitHub · 90 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. 6d ago First seen · 90 lines · 61 tokens per session scan A 4e7393937f88

Subscribe to this mod's changes

root-cause is a skill published in the GitHub repository jjanczur/tyran (86 stars, last pushed 2d ago), licensed Apache-2.0. It adds 61 tokens to every session and 1,044 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

postmortem

Auto-generates a structured postmortem from a completed campaign. Reads the campaign file, telemetry logs, and feature ledger. Produces a documented analysis of what broke, what the safety systems caught, and what patterns emerged. Can also be invoked manually for any incident.

SethGammon/Citadel · 58 tokens

systematic-debugging

4-phase root cause analysis: observe, hypothesize, verify, fix. Enforces investigation before any code changes. Emergency stop after 2 failed fixes. Prevents shotgun debugging and fix cascades.

SethGammon/Citadel · 45 tokens

ai-development-guide

Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend implementation choices, code smells, failures, or implementation completeness.

shinpr/claude-code-workflows · 43 tokens

recipe-diagnose

Investigate problem, verify findings, and derive solutions.

shinpr/claude-code-workflows · 15 tokens

logic-review

Find logic bugs in a single file or function via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy). Trigger when a user shares code and suspects something is wrong without naming a concrete failure — phrases like "review this", "does this look right", "check this function", "audit this…

hyhmrright/logic-lens · 161 tokens

logic-fix-all

Autonomous repository-wide audit-and-fix pipeline: health → review → locate/explain → fix → diff-verify → iterate until clean. Starts with a mandatory consent prompt (token-intensive); after consent runs hands-free. Trigger when the user wants ALL logic issues found and fixed — "fix everything", "fix all logic…

hyhmrright/logic-lens · 211 tokens