Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-five-whys-plus -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/thinking-five-whys-plus/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/thinking-five-whys-plus/

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

Similar skills

Everything for Testing and QA →

From the same set27

thinking-probabilistic A skill that makes the agent name a base rate, give confidence intervals and update its estimate when new evidence lands, instead of stating one confident number. CX Codex +1 591installs thinking-scientific-method Structured debugging skill that ranks falsifiable hypotheses and runs the cheapest discriminating check before changing code. CX Codex +1 587installs thinking-reversibility A skill that makes the agent check how expensive a decision is to undo before it decides how much analysis to spend. Useful when you can't tell whether deep thought is warranted. CX Codex +1 577installs thinking-circle-of-competence Makes the agent answer only from what it read or ran in this session. Useful when a confident wrong answer costs you. CX Codex +1 572installs thinking-ooda A skill for incidents and moving-target debugging: it runs the agent through Observe→Orient→Decide→Act at ~70% confidence, then re-observes. CX Codex +1 572installs thinking-via-negativa A skill that makes the agent look for what can be removed before it adds anything new. Useful when the reflex is to bolt on another layer or dependency. CX Codex +1 569installs thinking-jobs-to-be-done Works out the progress a user hires a product for, then ranks features by it. Useful when you cannot tell what to cut and what to grow. CX Codex +1 568installs thinking-cynefin Sorts a problem into a Cynefin domain by cause and effect, then names the response mode: runbook, analysis, probe or stabilize. Useful when a method keeps failing. CX Codex +1 567installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor