Agent skill
five-whys
Root cause analysis technique for self-improvement. Use after any failure, mistake, or suboptimal outcome to find systemic causes and actionable changes. Triggers: analyzing why something went wrong, debugging repeated failures, post-mortem analysis, retrospectives, understanding root causes, reflecting on what could be improved.
Install this agent skill to your Project
npx add-skill https://github.com/ozten/skills/tree/main/five-whys
SKILL.md
Five Whys
Iteratively ask "Why?" until reaching a cause that is actionable, systemic, and honest.
Process
- State the problem (specific, factual, no judgment)
- Ask "Why did this happen?"
- Take that answer, ask "Why?" again
- Repeat until reaching a root cause
- Identify what to change
Forking
When an answer contains multiple factors (look for "and", "plus", "also", or multiple clauses), fork into separate branches. Each branch gets its own chain of whys and its own change.
Problem: Deploy failed
│
├─ Branch A: Why did the config have a typo?
│ └── Why? I edited it manually
│ └── Why? No templating or validation
│ └── Change: Add config schema validation
│
└─ Branch B: Why were there no tests?
└── Why? I didn't know that path existed
└── Why? I didn't check coverage
└── Change: Require coverage check
Blameless Reframes
| Avoid | Instead |
|---|---|
| "I was careless" | "What check would have caught this?" |
| "I should have known" | "What information was I missing?" |
| "I made a mistake" | "What made this mistake possible?" |
"I failed" is never a root cause. Ask: what process, knowledge, or check was missing?
Pitfalls
- Stopping too early: "I didn't test it" → keep going → "Why didn't I test?"
- Vague answers: "Be more careful" is not actionable. "Read the full file before editing" is.
- Single-threading: Multiple factors need multiple branches
Good Changes
- Specific: "Search for function usage before modifying" not "Be more thorough"
- Verifiable: You can tell if you did it
- Preventive: Stops this class of problem, not just this instance
Output Template
## Problem
[What went wrong - specific and factual]
## Analysis
### Branch A: [First factor]
1. Why? [Answer]
2. Why? [Answer]
3. Why? [Root cause]
**Root cause**: [Systemic gap]
**Change**: [Specific action]
### Branch B: [Second factor, if any]
1. Why? [Answer]
2. Why? [Root cause]
**Root cause**: [Systemic gap]
**Change**: [Specific action]
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
nano-banana-image-gen
Generate images using the `imagen` CLI (Gemini and OpenAI models). Use when the user says "nano banana", "generate an image", "create an image", "make me a picture", "image gen", "draw", "illustrate", or wants to create images from text prompts.
webdev-combobox-autocomplete
Foundational patterns for building accessible autocomplete/combobox components with state management, ARIA patterns, keyboard navigation, async suggestions, and framework-agnostic implementation. Use when building autocomplete inputs, command palettes, search inputs, select replacements, or any dropdown with keyboard navigation and suggestions.
ui-design-iteration
Iterates on data-intensive UI designs to improve scannability, hierarchy, accessibility, and systematization. Use when improving an existing UI, reviewing a design for UX issues, or transforming a functional-but-flat interface into a polished product.
tpm-spec-verify
Enrich a Phase Sepc/PRD with Quality Requirements (Q-nnn) and Acceptance Criteria (AC-nnnn). Use when user wants to add QA perspective, define test criteria, identify non-functional requirements, add verification steps, or prepare a Phase PRD for test planning.
find-bugs
Adversarial three-agent bug review pipeline. Runs search → adversary → judge to find high-confidence bugs with reduced false positives. Use: /find-bugs src/
webdev-filter-query-builder
Domain-specific filter query building with AST representation, operator handling, query serialization, and field-type-specific inputs. Use when building advanced filter UIs for observability tools, data analytics, search interfaces, or any system requiring structured query construction with boolean logic, comparison operators, and URL/string serialization.
Didn't find tool you were looking for?