/dyc:huntfrom dyc
Finds the actual root cause of a failing test, error, crash, regression, a page rendered blank or wrong, or a request that throws, before applying fixes, proven against a known-good reference (prior version, release artifact, or "good" screenshot). Use when users report errors, crashes, broken behavior, blank rendering, failing tests, or a used-to-work state that now fails. Not for code review (route to check) or a first-impression visual complaint with no working baseline (route to ui).
Ships in dyc. 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.
Read when SKILL.md points to them.
A patch applied to a symptom creates a new bug somewhere else.
Hunt enforces root-cause identification before any fix is applied: state a falsifiable hypothesis, probe it, then fix only what the evidence supports.
Do not touch code until you can state the root cause in one sentence:
"I believe the root cause is [X] because [evidence]."
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. Probes are chosen to kill or confirm the hypothesis, never open-ended exploration. A red-capable repro loop (failing test, diagnostic script, captured trace) is evidence gathering, not a fix; build it before hypothesizing. Do not write production changes until the root-cause sentence stands.
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.
When the user names memory, a prior decision, or a memory path, apply the project's durable-context rules when the project defines them: current state wins over memory, memory is never authorization, the redaction gate applies. Durable context is hypothesis fuel only — it never replaces a fresh root-cause sentence or a reproducible symptom list.
Load the matching reference when the hunt enters that territory:
| When hunting | Load |
|---|---|
| A hard or non-reproducible failure; need reproduce→localize→reduce→fix→guard discipline | references/debugging.md |
| A bug that runs in a browser (layout, console, network) | references/browser-devtools.md |
| Native app freeze, beachball, not-responding, first-open lag, overlay lockup | references/native-freeze.md |
| Slow page load, poor Core Web Vitals, LCP symptoms with a live browser available | references/performance-lcp.md |
| High memory usage, OOM, or heap snapshot comparison (browser/Node.js) | references/memory-leaks.md |
| Print/PDF rendering bugs (broken output, page breaks, font not rendering) | references/rendering-debug.md |
| IME, Unicode, character rendering, or text encoding bugs | references/ime-unicode.md |
| A recurring failure class, or a second fix for the same bug | references/failure-patterns.md |
| Temporary instrumentation needed to test a hypothesis | references/logging-techniques.md |
A prerequisite refactor (e.g. a shared interface must change) needs a stated reason and the Authorization rule from the Outcome Contract; keep unrelated refactors separate.
Activate when: "以前是好的", "之前是好的", "used to work", "上一次提交还是对的", "broke after update", or the user remembers a specific good commit or version. Bisect owns every case where a bisectable commit or version entry point exists.
git status --short --branch -uall. Any modified, staged, or untracked files mean no bisect in the current checkout: run it in a temporary detached worktree and remove that worktree when done. If a temporary worktree is impossible, stop and ask for explicit cleanup/stash approval.git diff <last-good>..HEAD -- <suspect path> first; fall through to bisect only when the diff is too large or the culprit is not obvious.git bisect good/bad). When it names the culprit, read only that diff down to the specific line, then git bisect reset before removing the temporary worktree.Activate when the user says the same issue is still wrong after a fix, provides a "good" screenshot/version/file, or describes a visual result as previously correct — and no bisectable commit entry point exists (if one does, use Bisect Mode).
Treat the reference as evidence, not decoration: list every symptom in the user's concrete words; identify the reference oracle (old build, fixture, screenshot, described expected state); define the pass/fail check before editing; then name the exact current-vs-reference delta. Do not generalize a visual defect into "style polish" when the evidence points to a broken render, race, font pipeline, or state path. If the same symptom survives an attempted fix, the Hard Rules apply.
Activate after fixing a root-cause pattern, before declaring the bug done; also when the user says "举一反三" or "其他地方有没有同样问题". One local fix that ignores the blast leaves N - 1 bugs in the tree.
Extract the pattern signature (the specific function, regex, API call, CSS selector, lock acquisition, validation skip, or input boundary) and grep -rn it across the repo, excluding generated dirs, build output, and vendored deps; for class-of-bug patterns, grep the surrounding shape, not just the literal text. For every match, answer in writing: same bug / safe to leave (why) / unsure (ask the user). Do not claim "fixed" until the blast report is in the Output block. Unrelated bugs the sweep surfaces get listed, not fixed, unless the user agrees.
Run the one probe that would fail if the hypothesis were wrong, then read it. If the evidence contradicts the hypothesis, discard it completely and re-orient on what the probe just showed. Do not keep a hypothesis just because the code "looks like" the cause.
Use this ladder before claiming a bug is fixed:
When the reporter's environment is the missing rung and cannot be reproduced locally, ship a read-only probe they can paste and run — printing environment, the disputed measurement, and hypothesis-relevant state, nothing secret-bearing. Discover their layout rather than hardcoding it. Two rounds of "could you check whether..." without a probe is the failure shape this replaces.
For recurring classes of failures, load references/failure-patterns.md before adding a second fix.
Every log is a yes/no question: "if this prints X before Y, hypothesis A survives; otherwise A is dead." A log that cannot rule a hypothesis in or out is noise. Remove temporary logs before finishing; gate persistent diagnostics behind the project's debug flag. Full playbook: references/logging-techniques.md.
| What happened | Rule |
|---|---|
| Patched the wrong layer (displayed surface instead of the data source) | Trace the execution path backward before touching any file |
| Stack trace points deep into a library | Walk back 3 frames into your own code |
| Changed the algorithm but the output stayed wrong | Invalidate or version-bump persisted output from the old code |
| Reporter reproduces, local machine is fine, agent patched blind | Produce one copy-paste diagnostic command first; diagnose from the evidence |
Close every hunt with one of the two formats below.
Open the wrap-up with one plain line stating the outcome and whether the changes are committed; the block supports that line, it does not replace it.
Root cause: [what was wrong, file:line]
Fix: [what changed, file:line]
Sibling sweep: [N same-shape sites checked, N fixed / none found / not run, why]
Confirmed: [evidence or test that proves the fix]
Tests: [pass/fail count, regression test location]
Regression guard: [test file:line] or [none, no correct test seam: why]
Status: resolved, resolved with caveats (state them), or blocked (state what is unknown).
Regression guard rule: for any bug fix, add a regression test when a correct seam exists and record the red-green run; a bug that recurred or was previously "fixed" always needs one. If no correct seam exists, record it as an architecture finding with the reason and the missing seam, rather than treating the absence as done. Guard details: references/debugging.md.
Symptom:
[Original error description, one sentence]
Hypotheses Tested:
1. [Hypothesis] → [Test method] → [Result: ruled out because...]
2. ...
Evidence Collected:
- [Log snippets / stack traces / file content]
- [Reproduction steps]
- [Environment info: versions, config, runtime]
Ruled Out:
- [Root causes eliminated]
Unknowns:
- [What is still unclear or missing]
Suggested Next Steps:
1. [Next investigation direction]
2. [External tools, permissions, or context needed]
Status: blocked
evals/cases/root-cause-cache-race.yaml (opens in a new tab)evals/cases/stack-trace-null-deref.yaml (opens in a new tab)evals/eval.yaml (opens in a new tab)references/browser-devtools.md (opens in a new tab)references/debugging.md (opens in a new tab)references/failure-patterns.md (opens in a new tab)references/ime-unicode.md (opens in a new tab)references/logging-techniques.md (opens in a new tab)references/memory-leaks.md (opens in a new tab)references/native-freeze.md (opens in a new tab)references/performance-lcp.md (opens in a new tab)references/rendering-debug.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
排查, 报错, 崩溃, 不工作, 跑不通, 以前是好的, 回归, 截图回归, 和之前版本不一样, 判断错误原因, 反复修不好, debug, regression, used to work, broke after update, not working, fix error, stack trace
Other plugins' skills for the same job
npx claudepluginhub mymx2/m2-plugins --plugin dyc12 skills in this plugin
/checkReviews code diffs, PRs, release readiness, and project or document audits, then reports evidence-grounded findings. Use when users ask for code review, issue or PR triage, release gates, project scorecards, security/performance/coverage review, or doc proofreading. Not for debugging root causes (hunt) or drafting prose (write)./chromeDrives a real Chrome browser through the chrome-devtools-mcp MCP server for page automation, network and console analysis, emulation, and extension testing. Use when a task needs operating a live browser: navigating, snapshotting the accessibility tree, interacting by element uid, capture a screenshot or full-page capture, console errors, traces, or heap snapshots, or fixing the MCP server setup. Not for diagnosing application logic root causes (use hunt) or judging visual quality (use ui)./forge插件与技能的全生命周期管理:基于 Agent Plugins Spec 创建标准插件、通过 extensions + init 模式适配多厂商(Claude Code / Qoder / Codex / CodeBuddy),以及发现、安装、编写、校验技能。Use when creating a plugin, scaffolding a multi-vendor plugin, writing plugin.json, generating init.ts, finding/installing skills, or authoring/validating SKILL.md. Not for runtime debugging of deployed skills (route to hunt) or reviewing plugin code quality (route to check)./healthRuns a budget-aware agent-assisted engineering health audit for instruction/config drift, hooks/MCP, verifier surfaces, and AI maintainability. Use when users ask to audit Claude, Codex, Pi, agent instructions, MCP or hooks, verifier coverage, or AI-maintainability drift. Not for debugging application code or reviewing PRs./learnRuns a six-phase research workflow that turns unfamiliar domains, real docs, source bundles, or collected material into a publish-ready comparison or reference. Use when users ask for multi-source research: deep-dives, comparing tradeoffs, compiling sources, synthesizing unfamiliar material, or turning a source bundle into a coherent reference. Not for quick lookups or single-URL fetches (route to read)./pmProduces PM deliverables and decision frameworks: PRD, user stories, Epic breakdown, backlog prioritization (RICE, MoSCoW), feedback analysis, competitive comparison, metrics reviews (DAU, funnel, retention), roadmaps, GTM (pricing, channels, positioning). Use when users ask to write a PRD, split stories, rank a backlog, analyze feedback or competitors, review metrics, or plan GTM. Not for engineering planning (think), open research (learn), prose polishing (write), or code review (check).