five-whys

five-whys is a skill for Claude Code, Codex from kirodotdev/KiroCrew. It costs 88 tokens per session (4,373 once invoked), scanned A, original, Apache-2.0.

A guided research mode that explores a bug, incident, system, concept, or decision by asking one focused question at a time. Its default method is the 5 Whys technique, which repeatedly asks why to uncover an underlying cause.

In plain words
What is it for?
Use it for root-cause analysis, learning an unfamiliar concept, investigating incidents, or comparing decisions through user-directed branches.
Why use it?
It helps turn a broad or confusing topic into a step-by-step investigation while keeping track of answers and open questions.

Skill for Claude CodeCodex

About the project

Kiro Crew is a persistent development workspace where agents continue multi-step software work across sessions, schedules, and connected interfaces. Developers use it locally or remotely through a desktop app, web dashboard, CLI, Slack, or Discord, with unattended tasks and recurring jobs. The catalogue contains skills and instructions for working with this workspace.

kirodotdev/KiroCrew · 3,532 stars · on GitHub

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/kirodotdev/kirocrew/five-whys
Any agent
npx skills add kirodotdev/KiroCrew --skill five-whys
Clone the repo
git clone --depth 1 https://github.com/kirodotdev/KiroCrew

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 five-whys

README.md
[![agentmods](https://agentmods.dev/badge/skills/kirodotdev/kirocrew/five-whys.svg)](https://agentmods.dev/skills/kirodotdev/kirocrew/five-whys)
Your own site
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/five-whys"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/five-whys.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,373 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 $0.00088 $0.04373
Opus 5 $0.00044 $0.02187
Sonnet 5 $0.00018 $0.00875
Haiku 4.5 $0.00009 $0.00437

Measured 5d ago against content hash 2f4e2ca93e20, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

five-whys 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/five_whys.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/kiro_crew/builtin_skills/five-whys/SKILL.md · 278 lines

How it starts

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

5 Whys — guided dive-deep MODE

This is a mode, not a one-shot answer — once triggered you enter it and stay in it across turns until the user is satisfied or exits. Its purpose is to help someone understand something deeply: a bug, an incident, a system, a concept, or a decision. It works by asking one focused question at a time, keeping every answer short and direct, and branching — so understanding is verified at each step and the exploration reaches the real root.

The engine of the mode: every step is one append to an event log; the tree, the current question, the open branches and the final report are all folded from that one log — never maintained by hand. 5 Whys is the default engine of a small research method built on that log; more capabilities (web search, recap, ...) plug into the same log — see Capabilities below.

The core loop (this is the whole mode)

Each turn does exactly one of these, then stops and waits:

  1. Answer the current question — short and direct (see disciplines below).
  2. Propose the next layer: 2-4 candidate branch questions about the answer you just gave. Each is a single, direct "why...?" / "how...?" / "what causes...?" — the obvious next things to dig into.
  3. Let the user steer. They can (a) pick one of your proposed questions, (b) pick several (each becomes a branch), or (c) type their own question — which becomes a new branch just the same. Never force your menu; the user's own question always wins.
  4. Append the events for what happened (an ask, an answer, a focus move...) to the log via scripts/five_whys.py (see The mechanical core), then repeat.

So branches form naturally: every answer sprouts a small menu, the user follows one thread deep, and the unpicked questions wait as branches to return to.

The reasoning chain (the spine of every dive)

Peeling a thing apart should follow one basic chain of thought. Let it order the answers you give and the branch questions you propose, so the exploration always moves from grasping the thing to judging it:

Read the full file on GitHub · 278 lines

Files

What ships with it

1 file 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. 5d ago First seen · 278 lines · 88 tokens per session scan A 2f4e2ca93e20

Subscribe to this mod's changes

five-whys is a skill published in the GitHub repository kirodotdev/KiroCrew (3,532 stars, last pushed 2d ago), licensed Apache-2.0. It adds 88 tokens to every session and 4,373 once invoked, about $0.0004 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.