Root cause analysis with 5 Whys methodology for software problems. Triggers: 根本原因, root cause, 5 Whys, なぜなぜ分析, 対症療法, patch, symptom, 症状, 表面的, workaround, ワークアラウンド, 本質的, 応急処置, bandaid, quick fix.
/plugin marketplace add thkt/claude-config/plugin install complete-workflow-system@thkt-development-workflowsThis skill is limited to using the following tools:
references/five-whys.mdreferences/symptom-patterns.mdTarget: Solve problems once and properly by addressing root causes, not symptoms.
| Type | Example | Result |
|---|---|---|
| Symptom Fix | Add setTimeout to wait for DOM | Works now, breaks later |
| Root Cause Fix | Use React ref properly | Permanent solution |
| Symptom Fix | Add flag to prevent double-submit | Complexity grows |
| Root Cause Fix | Disable button during submission | Simple, reliable |
| Section | File | Focus | Triggers |
|---|---|---|---|
| 5 Whys | references/five-whys.md | Analysis process, templates | 5 Whys, なぜなぜ |
| Patterns | references/symptom-patterns.md | Common symptom→cause patterns | 対症療法, workaround |
Before implementing a fix, ask:
Problem: Button click triggers action twice
Solution: Use ref instead of state for imperative flag, or disable button properly
| Principle | Application |
|---|---|
| Prevention > Patching | Best fix prevents the problem entirely |
| Simple > Complex | Root cause solutions are usually simpler |
| Ask Why | Don't accept the first answer |
| Progressive Enhancement | Can CSS/HTML solve this? |
// ❌ Symptom: setTimeout to wait for DOM
useEffect(() => {
setTimeout(() => { document.getElementById('target')?.scrollIntoView() }, 100)
}, [])
// ✅ Root cause: Use React ref
const targetRef = useRef<HTMLDivElement>(null)
useEffect(() => { targetRef.current?.scrollIntoView() }, [])
// ❌ Symptom: Multiple effects to sync state
useEffect(() => { setFilteredItems(items.filter(i => i.active)) }, [items])
useEffect(() => { setCount(filteredItems.length) }, [filteredItems])
// ✅ Root cause: Derive state, don't sync
const filteredItems = useMemo(() => items.filter(i => i.active), [items])
const count = filteredItems.length
// ❌ Symptom: Parent polling child for state
const childRef = useRef()
useEffect(() => {
const interval = setInterval(() => { childRef.current?.getValue() }, 1000)
}, [])
// ✅ Root cause: Proper data flow (lifting state or callbacks)
const [value, setValue] = useState()
return <Child onValueChange={setValue} />
enhancing-progressively - CSS-first approach often addresses root causesapplying-code-principles - Design principles prevent root cause issuesroot-cause-reviewer - Primary consumer of this skill