Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Systematically root-causes software bugs using a reproduce → isolate → hypothesize → bisect → verify methodology, replacing guess-and-check debugging with a disciplined, evidence-driven investigation. Use this skill when a user reports a bug, a test is failing intermittently or consistently, behavior differs between environments, a regression appeared after a change, something "used to work" and now doesn't, an error/stack trace needs root-causing, or when asked to "debug", "find the root cause"
.claude/skills/jayrha-debug-detective/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 50% | 0% |
| case-14 | ✓→✗ | ▼ Worse | 102% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 37% | 0% |
Debugging fails when it becomes random poking — changing lines, re-running, hoping. This skill enforces a scientific, evidence-first process: you never change code to "see what happens" until you have a falsifiable hypothesis backed by an observation. The goal is to find the root cause, not to make the symptom disappear.
Keywords: debug, root cause, bug, regression, crash, stack trace, flaky test, intermittent, heisenbug, deadlock, memory leak, race condition, bisect, repro, reproduce, isolate, hypothesis, works on my machine.
Core principle: A bug you cannot reproduce is a bug you cannot confirm fixed. Spend your effort earning a reliable reproduction first; everything else gets faster after that.
Follow these phases in order. Do not skip ahead — a fix found by skipping is usually a coincidence, not a cure.
references/intermittent-bugs.md.print of invariants) — observe, don't fix.users is None when the cache misses." A good hypothesis predicts an observation you haven't made yet.references/hypothesis-log.md for the format and use templates/investigation-log.md to track them.git bisect to find the offending commit. Run scripts/git_bisect_helper.sh to automate it with a test command.references/root-cause-frameworks.md).templates/investigation-log.md.| Symptom | First move | Key reference | |---|---|---| | Consistent crash / exception | Read the full stack trace bottom-up; find the deepest frame in your code | references/techniques.md | | "Worked before this change" | git bisect | scripts/git_bisect_helper.sh | | Flaky / 1-in-N failure | Raise failure rate, look for shared state / ordering / time / concurrency | references/intermittent-bugs.md | | Wrong output, no error | Binary-search the data pipeline; assert invariants at each stage | references/techniques.md | | Hang / deadlock | Get a thread dump / py-spy dump; find who holds what lock | references/techniques.md | | Memory growth | Snapshot heap over time; diff allocations; check unbounded caches/listeners | references/techniques.md | | Works on my machine | Diff the two environments systematically (versions, config, data, locale, TZ) | references/techniques.md | | Performance regression | Profile, don't guess; compare flamegraphs before/after | references/techniques.md |
null in a guard without asking why it was null. The real bug moves downstream.references/techniques.md — detailed per-symptom techniques, tooling, and language-specific tips.references/intermittent-bugs.md — playbook for flaky tests, races, and heisenbugs.references/root-cause-frameworks.md — 5 Whys, fault trees, delta debugging, and the scientific method applied to code.references/hypothesis-log.md — how to write and rank falsifiable hypotheses.scripts/git_bisect_helper.sh — automated git bisect run wrapper for regression hunting.templates/investigation-log.md — fill-in template to track a debugging session end to end.examples/null-pointer-investigation.md — a full worked example from report to verified fix.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 16,460 | 13,906 | -16% | 1 | 1 | 0% | 2,759 | 4,101 | +49% | 0 | 0 | — |
case-02 | fail→pass | 21,995 | 17,960 | -18% | 1 | 1 | 0% | 3,891 | 4,818 | +24% | 0 | 0 | — |
case-03 | pass→pass | 17,124 | 16,531 | -3% | 1 | 1 | 0% | 3,748 | 5,141 | +37% | 0 | 0 | — |
case-04 | fail→fail | 3,353 | 2,165 | -35% | 1 | 1 | 0% | 537 | 2,048 | +281% | 0 | 0 | — |
case-05 | fail→fail | 6,716 | 3,188 | -53% | 1 | 1 | 0% | 1,234 | 2,206 | +79% | 0 | 0 | — |
case-06 | fail→fail | 12,053 | 10,218 | -15% | 1 | 1 | 0% | 2,133 | 3,329 | +56% | 0 | 0 | — |
case-07 | pass→pass | 10,316 | 7,260 | -30% | 1 | 1 | 0% | 1,640 | 2,906 | +77% | 0 | 0 | — |
case-08 | pass→pass | 10,593 | 7,853 | -26% | 1 | 1 | 0% | 1,810 | 3,099 | +71% | 0 | 0 | — |
case-09 | pass→pass | 13,252 | 9,186 | -31% | 1 | 1 | 0% | 2,046 | 3,303 | +61% | 0 | 0 | — |
case-10 | pass→pass | 15,812 | 14,173 | -10% | 1 | 1 | 0% | 2,557 | 3,955 | +55% | 0 | 0 | — |
case-11 | pass→pass | 13,020 | 9,398 | -28% | 1 | 1 | 0% | 2,099 | 3,435 | +64% | 0 | 0 | — |
case-12 | fail→fail | 6,478 | 6,893 | +6% | 1 | 1 | 0% | 1,092 | 2,871 | +163% | 0 | 0 | — |
case-13 | pass→pass | 11,359 | 8,689 | -24% | 1 | 1 | 0% | 1,880 | 3,139 | +67% | 0 | 0 | — |
case-14 | pass→fail | 7,305 | 5,757 | -21% | 1 | 1 | 0% | 1,080 | 2,178 | +102% | 0 | 0 | — |
case-15 | pass→pass | 6,795 | 5,089 | -25% | 1 | 1 | 0% | 1,080 | 2,613 | +142% | 0 | 0 | — |
case-16 | pass→pass | 9,692 | 9,365 | -3% | 1 | 1 | 0% | 1,624 | 3,169 | +95% | 0 | 0 | — |
case-17 | pass→pass | 20,009 | 22,903 | +14% | 1 | 1 | 0% | 2,011 | 3,733 | +86% | 0 | 0 | — |
case-18 | pass→pass | 7,558 | 17,828 | +136% | 1 | 1 | 0% | 1,457 | 3,013 | +107% | 0 | 0 | — |
case-19 | pass→pass | 12,034 | 6,954 | -42% | 1 | 1 | 0% | 1,906 | 2,849 | +49% | 0 | 0 | — |
case-20 | pass→pass | 10,207 | 10,140 | -1% | 1 | 1 | 0% | 1,709 | 3,179 | +86% | 0 | 0 | — |
case-21 | pass→pass | 11,721 | 9,286 | -21% | 1 | 1 | 0% | 1,880 | 3,423 | +82% | 0 | 0 | — |
case-22 | fail→pass | 11,839 | 22,969 | +94% | 1 | 1 | 0% | 1,963 | 2,938 | +50% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.