/john-skills:five-whys-methodologyfrom john-skills
Diagnoses root causes of problems through systematic, evidence-based five-whys investigation. Produces a likelihood-ranked list of candidate root causes with confidence levels — diagnosis only, never a fix.
Ships in john-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Identify the root cause(s) of a reported problem through systematic, evidence-based investigation — and stop there. This skill diagnoses; it does not fix. Diagnosis is deliberately decoupled from solution so the user can review the findings and decide what to do next.
The deliverable is a likelihood-ranked list of candidate root causes, each backed by concrete evidence and a stated confidence level.
Trigger only on an explicit diagnostic request — e.g. "find the root cause of X", "diagnose this", "do a five whys check", "run a root cause analysis", "why is this happening". Do not trigger on a bare bug report or a "fix this" request. If the user just wants something fixed, this skill is not in scope.
The default failure mode when facing a problem:
This skill breaks that loop by forcing evidence before conclusions and by separating the act of diagnosis from the act of fixing.
Read whatever you need, reason about the evidence, and assemble the ranked list. You may read any and all files you judge relevant to finding the root cause — error sites, call sites, dependencies, configs, tests, logs. Follow the evidence wherever it leads; do not artificially limit which files you open.
Use subagents freely. When the investigation is large or naturally parallel — e.g. each hypothesis from Phase 1 can be branch-tested independently, or a wide codebase needs sweeping — dispatch subagents (the Explore agent for read-only searches, or general agents) to investigate branches concurrently and report evidence back. Have each subagent return its findings (causal chain, evidence, refute/support verdict); you synthesize the results into the ranked list. This keeps the main context focused and speeds up breadth-first investigation.
Before asking a single "why", pin down what you're actually diagnosing. A vague symptom guarantees a low-confidence result.
Do not commit to the first causal chain that comes to mind — that tunnel vision is a top cause of low-confidence output. Instead:
For each surviving hypothesis, start from the symptom and iteratively ask "why?", grounding every answer in evidence you actually checked. "Five" is just a name — continue until you reach an actionable root cause, however many levels that takes.
Causal chains branch. Real problems often have more than one contributing cause at a given level. When a "why" has multiple plausible answers supported by evidence, split into branches and pursue each. Track the result as a small causal tree, not a single rope. Different branches may terminate in different root causes — that's expected, and all surviving candidates belong in the final ranked list.
Symptom
├── Hypothesis A ──→ Why? → Cause ──→ Why? → Root cause A1
│ └→ Why? → Root cause A2
├── Hypothesis B ──→ Why? → Root cause B1
└── Hypothesis C ──→ [refuted by evidence — discarded]
For each "why", gather concrete evidence before answering:
Base each answer on evidence, not speculation. If a branch rests on an unverified assumption, either verify it or mark that candidate's confidence down accordingly.
A candidate qualifies as a root cause when:
Symptom: "Tests are failing"
user.profile is undefined, but tests expect an empty object"Symptom: "API returns 404"
/api/v1/users but code defines /api/users — missing /v1 prefix"Don't stop at: symptom restatements, vague causes ("there's a config issue"), or the first plausible explanation without verification.
After assembling candidates, state your confidence in the top-ranked candidate —
high, medium, or low — and say what drove that rating. The skill terminates cleanly
only at high confidence. Anything less means there is more investigation to do, so loop
back rather than presenting prematurely.
Low or medium confidence is itself a symptom. Identify which of these is the cause and apply the remedy before re-ranking:
| Reason for low confidence | Remedy |
|---|---|
| Incomplete hypothesis set — committed to one chain without enumerating alternatives | Return to Phase 1; brainstorm the full candidate list, then branch-test each |
| Missing critical information — no logs, stack trace, runtime values, version info | Name the specific missing artifact; ask the user for it (or where to find it), or obtain it yourself |
| Unverified assumption in the chain — a "why" was a guess, never checked | Go verify it against actual code/values; if unverifiable, mark that candidate down |
| Non-discriminating evidence — two+ candidates fit equally well | Find a disambiguating observation that only one candidate predicts |
| Correlation, not causation — suspicious code but no proven link to the symptom | Trace the actual execution path from symptom back to the suspected cause |
| Ill-defined symptom — expected vs. actual still unclear | Return to Phase 0; resolve what "correct" looks like |
| Stale / conflicting evidence — code doesn't match what's running, or sources disagree | Reconcile which source is authoritative before trusting it |
| Intermittent / non-deterministic — race, flake, load-dependent (a confidence ceiling) | Note the timing/concurrency factor; declare the ceiling rather than spinning |
| Inaccessible / opaque component — external service or code you can't inspect (a ceiling) | Mark the branch as a boundary; the candidate stays explicitly hypothetical |
Re-investigate and re-rank. Loop until confidence reaches high — or a full pass turns up no new evidence and the only remaining limiters are genuine ceilings (intermittent, opaque). In that terminal-but-uncertain case, present the best-effort ranked list and state plainly that confidence is capped, which reason caps it, and what would lift it.
Before presenting, pressure-test the diagnosis by invoking the phone-a-friend skill
(via the Skill tool). Frame it as adversarial review of the top candidate: hand the friend
the symptom, the causal chain, and the evidence you relied on, and ask it to refute the
diagnosis or surface a more likely cause. Fold the outcome — confirmation, a downgrade, or
a new candidate — into the ranked list before showing it to the user. Rationale: a
confident-but-wrong diagnosis is the most dangerous output, and high confidence is the
skill's clean exit, so it earns one adversarial check before it ships.
Present findings as a ranked list. Do not propose or implement a fix.
## Root Cause Analysis: [symptom]
**Symptom observed:** [what was reported / observed]
**Files & evidence examined:** [key files, logs, outputs you inspected]
### Candidate root causes (most → least likely)
#### 1. [Candidate] — Likelihood: High · Confidence: [high/medium/low]
- **Causal chain:** Symptom → why → why → … → this cause
- **Evidence:** [concrete evidence: file:line, log excerpt, observed value]
- **Why it's a root cause:** [actionable · explanatory · terminal]
- **What would raise/lower confidence:** [if not high]
#### 2. [Candidate] — Likelihood: Medium · Confidence: [...]
- ...
#### 3. [Candidate] — Likelihood: Low · Confidence: [...]
- ...
### Confidence statement
Top candidate confidence: **[high/medium/low]** — [reasoning].
[If high: "Pressure-tested via phone-a-friend; outcome: …"]
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
root-cause-analysis, five-whys, debugging, problem-diagnosis
npx claudepluginhub jbdamask/john-claude-skills --plugin john-skills32 skills in this plugin
/architecture-decision-recordsWrite and maintain Architecture Decision Records (ADRs) that capture the context and rationale behind significant technical decisions. Use when documenting an architectural or technology choice, recording a design trade-off, superseding a past decision, or setting up an ADR process. Also use proactively to offer an ADR when a significant decision is made during a coding session (database, framework, auth scheme, API style, integration pattern). Triggers on "write an ADR", "document this decision", "record this architecture choice", "add a decision record", "supersede ADR"./aws-learningsProactively catch common AWS infrastructure mistakes before they happen. Use when creating or modifying AWS components — CloudFormation, CDK, Lambda, API Gateway, IAM, S3, CloudFront, EC2, EventBridge, SQS, Secrets Manager, or SSM — to find and apply hard-won deployment lessons and avoid known pitfalls. Read-only: fetches lessons, does not add them./aws-learnings-addContribute a new lesson to the AWS Learnings library (the llms.txt-format library at github.com/jbdamask/aws-learnings-library). Use this whenever you've just debugged, fixed, or discovered a non-obvious AWS gotcha — CloudFormation, CDK, Lambda, API Gateway, IAM, S3, CloudFront, EC2, EventBridge, SQS, Secrets Manager, SSM — and want to capture it for next time. Triggers on phrases like 'add an AWS learning', 'save this AWS lesson', 'capture this gotcha', 'add this to the learnings library', or after solving a tricky AWS deployment problem worth remembering. This skill WRITES files (a new lesson file + an updated index) and prepares a pull request; it is the write companion to the read-only 'aws-learnings' skill.Other plugins' skills for the same job