$npx -y skills add tw93/Waza --skill huntFinds root cause before applying fixes for errors, crashes, regressions, failing tests, broken behavior, and screenshot-reported defects. Use when users report in any language errors, crashes, broken behavior, regressions, failing tests, screenshot evidence, or something that use
| 1 | # Hunt: Diagnose Before You Fix |
| 2 | |
| 3 | Prefix your first line with 🥷 inline, not as its own paragraph. |
| 4 | |
| 5 | **Update check (non-blocking).** Once per conversation, run `bash <skill-base-dir>/scripts/check-update.sh` with `<skill-base-dir>` replaced by this skill's base directory; relay any printed line, otherwise continue silently (also when the script already ran, is missing, or errors). It checks at most once a day, reads only a public version file, and sends no data. |
| 6 | |
| 7 | A patch applied to a symptom creates a new bug somewhere else. |
| 8 | |
| 9 | ## Outcome Contract |
| 10 | |
| 11 | - Outcome: the root cause is identified before any fix is applied. |
| 12 | - Done when: one sentence explains the cause, every observed symptom fits it, and the fix or handoff is verified against a reproducible check. |
| 13 | - Evidence: source trace, repro command or UI path, logs or state, targeted test/build output, and runtime evidence for UI or native defects. |
| 14 | - Output: root cause, fix or handoff, verification result, and any unswept sibling risks. |
| 15 | |
| 16 | **Do not touch code until you can state the root cause in one sentence:** |
| 17 | > "I believe the root cause is [X] because [evidence]." |
| 18 | |
| 19 | Name a specific file, function, line, or condition. "A state management issue" is not testable. "Stale cache in `useUser` at `src/hooks/user.ts:42` because the dependency array is missing `userId`" is testable. If you cannot be that specific, you do not have a hypothesis yet. |
| 20 | |
| 21 | ## Diagnosis Signals |
| 22 | |
| 23 | Hypothesis quality gate: the hypothesis must explain every observable symptom, not just the one reported first; partial coverage is a symptom-level guess, not a root cause. For timing-dependent issues (flicker, intermittent failure, race), reproduce reliably before diagnosing. |
| 24 | |
| 25 | Rationalization smells: "I'll just try this" = no hypothesis, write it first. "I'm confident" = run the instrument that proves it. "Probably the same issue" = re-read the execution path from scratch. "It works on my machine" = enumerate env differences before dismissing. "One more restart" = read the last error verbatim; never restart more than twice without new evidence. |
| 26 | |
| 27 | ## Durable Context Preflight |
| 28 | |
| 29 | See [references/durable-context.md](references/durable-context.md) for when to read durable context, the read-order budget, and the memory-type mapping. |
| 30 | |
| 31 | For `/hunt`: durable context is hypothesis fuel only, and current code, logs, and repro evidence override memory. It never replaces a fresh root-cause sentence or a reproducible symptom list. |
| 32 | |
| 33 | ## Hard Rules |
| 34 | |
| 35 | - **Same symptom after a fix is a hard stop; so is "let me just try this."** Both mean the hypothesis is unfinished. Re-read the execution path from scratch before touching code again. |
| 36 | - **After three failed hypotheses, stop.** Use the Handoff format below to surface what was checked, what was ruled out, and what is unknown. Ask how to proceed. |
| 37 | - **Verify before claiming.** Never state versions, function names, or file locations from memory. Run `sw_vers` / `node --version` / grep first. No results = re-examine the path. |
| 38 | - **External tool failure: diagnose before switching.** When an MCP tool or API fails, determine why first (server running? API key valid? Config correct?) before trying an alternative. |
| 39 | - **System/tooling symptoms need a lower-layer baseline.** Before blaming the visible app, generated file, or top-level feature, measure the raw lower layer first: OS capture versus post-processing, runtime service versus UI, compiler/toolchain versus test assertion, network/API versus client handling. Retire hypotheses that the baseline disproves instead of circling them. |
| 40 | - **Pay attention to deflection.** When someone says "that part doesn't matter," treat it as a signal. The area someone avoids examining is often where the problem lives. |
| 41 | - **Visual/rendering bugs: static analysis first.** Trace paint layers, stacking contexts, and layer order in DevTools before adding console.log or visual debug overlays. Logs cannot capture what the compositor does. Only add instrumentation after static analysis fails. |
| 42 | - **Behavioral / lifecycle / async bugs: instrument first, not after failure.** Window lifecycle, event delivery, navigation, focus, timer, state-machine, and async-ordering bugs almost never yield to static reading alone. Do not wait for a failed fix to add logs. The moment your hypothes |