thinking-five-whys-plus — Claude Code skill: what it does & setup
Builds an evidence-backed causal chain from a localized fault to its systemic root. It helps uncover why an issue happened when symptom-level hotfixes keep failing.
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a claude-codeWhat thinking-five-whys-plus does
This skill structures root-cause investigation into a strict multi-step sequence. It requires an already localized symptom, confirmed path, and time window. Each step must cite real evidence such as logs, metrics, code, or configuration, while explicitly ruling out competing hypotheses.
Instead of forcing a single narrative, the procedure branches whenever multiple independent causes exist. It applies counterfactual tests to every path: would removing this specific cause block this failure pathway? Stop criteria reject human blame and speculative leaps. Because of this constraint, running the skill without concrete logs or metrics will stall the chain immediately.
The workflow finishes with actionable countermeasures and verification criteria. It is intentionally bypassed for trivial one-line defects where systemic investigation adds unnecessary overhead.
What it helps with
- trace a localized fault to its systemic root cause using evidence
- evaluate branching failure causes without forcing a single narrative
- run counterfactual checks to test whether a fix blocks the failure pathway
- define verifiable countermeasures that eliminate enabling conditions
Example prompts for the agent
- Run thinking-five-whys-plus on the recent auth worker crash using the provided error logs.
- Investigate this recurring queue processing failure with thinking-five-whys-plus.
- Determine systemic countermeasures for the payment timeout issue using thinking-five-whys-plus.
How to install thinking-five-whys-plus
1Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a claude-code2Manually: put the files in place
~/.claude/skills/thinking-five-whys-plus/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/thinking-five-whys-plus/
1Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a codex2Manually: put the files in place
.agents/skills/thinking-five-whys-plus/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a cursor2Manually: put the files in place
.cursor/skills/thinking-five-whys-plus/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install tjboudreaux/cc-thinking-skills thinking-five-whys-plus2Manually: put the files in place
.github/skills/thinking-five-whys-plus/SKILL.md1Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a gemini-cli2Platform CLI
gemini skills install https://github.com/tjboudreaux/cc-thinking-skills --path skills/thinking-five-whys-plusManually: put the files in place
.devin/skills/thinking-five-whys-plus/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about thinking-five-whys-plus
How to install thinking-five-whys-plus in Claude Code?
Run npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a claude-code in your terminal. Alternatively, place the file at ~/.claude/skills/thinking-five-whys-plus/SKILL.md.
What does thinking-five-whys-plus do?
It creates an evidence-based chain of causes from a localized bug to actionable systemic roots. It verifies each link with counterfactual tests and produces concrete countermeasures.
When should you avoid using thinking-five-whys-plus?
Do not use it if the defect is not yet localized, for trivial one-line fixes, or when there is no empirical evidence to substantiate the next causal step.
Source text
SKILL.md · MIT
---
name: thinking-five-whys-plus
description: When a fault is localized and the proximate cause is known but the systemic root is not, chain evidence-linked whys with a counterfactual stop and a countermeasure.
disable-model-invocation: true
---
# Five Whys Plus
Build an evidence-linked causal chain from a known proximate fault to an actionable systemic root, then prescribe a countermeasure that would have blocked it.
## When to Use
- A fault is already localized to a component, path, or subsystem.
- The proximate cause is known, but recurrence or systemic root is not.
- Prior symptom-only fixes failed and the failure returned.
- You need prevention that addresses why the proximate cause was possible.
## When NOT to Use
- Fault is not localized or multiple candidate causes remain — discriminate first.
- Root is evidenced and actionable — fix it.
- No evidence can answer the next "why" — gather evidence.
- One-off error without a process, tooling, or design enabler.
- Selective defect needing IS/IS-NOT analysis.
- Forward failure forecasting before commitment.
## Procedure
1. **State the localized problem.** Record the observable symptom, confirmed component/path, time window, scope, and impact. Stop if localization is missing.
2. **Chain why with evidence.** Make the prior answer the new effect; propose a cause; cite logs, code, config, metrics, or witnesses; name and rule out alternatives. Stop on speculation.
3. **Branch before descending.** Ask what else could produce the same effect; keep every evidenced independent pathway. Treat the retained branches as a causal set rather than forcing one root.
4. **Counterfactually test each pathway and the set.** For each candidate ask, "Would removing this cause block this pathway?" Then ask, "Would removing the retained set block the observed failure?" Retain independently sufficient branches whose removal blocks their own pathway; do not reject them merely because another branch could still cause the failure.
5. **Enforce stop criteria per branch.** Stop a branch only when its cause is evidenced, controllable, actionable, recurrence-preventing, non-blame (not merely "someone erred"), and counterfactual-positive for that pathway. If it hits human error, ask why the error was possible.
6. **Prescribe a countermeasure for every retained root.** Name the systemic fix, owner-capable action, and how recurrence will be checked. Prefer removing enabling conditions over only patching the proximate symptom.
7. **Stop when verified or blocked.** Halt when stop criteria pass and a countermeasure is specified, or when further steps lack evidence. Do not pad by habit.
## Output
```text
Problem: <localized symptom + component>
Chain:
Why1: <cause> | Evidence: <...> | Ruled out: <...>
WhyN: ...
Causal set check: would removing all retained roots block the failure? yes/no
Roots:
- <systemic cause> | Pathway counterfactual: <...>
Countermeasure: <action that removes the enabling condition>
Verification: <how to confirm this pathway is blocked>
```
## Verification
- Falsify the chain if any step lacks evidence, if alternatives were never considered, if a retained root does not pass its pathway counterfactual, or if the full causal set does not explain the failure.
- Stop applying this skill once the root is fixed and verified, or when the problem is still pre-localization.
- Over-application guard: skip a full chain for a single known one-line defect; do not end at blame; do not invent depth without data.
© tjboudreaux · MIT · tjboudreaux/cc-thinking-skills