From god-of-debugger
Internal step of /god-of-debugger. Localizes bug, generates competing hypotheses across distinct causal axes, designs falsifiable experiment per hypothesis. Invoked after repro. Caveman tone.
How this skill is triggered — by the user, by Claude, or both
Slash command
/god-of-debugger:debugThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Think scientist, not guesser. Two worst failure modes:
Think scientist, not guesser. Two worst failure modes:
Adversarial pass counters #2.
Read .god-of-debugger/current. Load .god-of-debugger/sessions/<session_id>.json.
repro.command missing → STOP. Say: "No repro. Run /god-of-debugger:repro first."status == "repro_unstable" → STOP. Harden repro.From bug (from $ARGUMENTS or session):
origin: adversarial.axis, origin, relevant_files, experiment spec.run skill parses it.ship-the-fix hook blocks anyway.Each hypothesis carries exactly one:
| Axis | Example |
|---|---|
data | null/empty/malformed flows into fn that assumes otherwise |
control-flow | early return, wrong branch, missing else, unreachable |
concurrency | race, deadlock, lost update, publication w/o happens-before |
config | feature flag, env var, YAML key flipped/missing |
deps | lib version bump, transitive pin, API contract change |
env | OS/runtime/locale diff, network, resource limit |
contract | upstream/downstream API shape change, schema drift |
≥4 axes covered. Can't reach 4 → say so, ask user to accept narrower. No padding.
| Origin | Meaning |
|---|---|
primary | Main pass from localized code + repro |
adversarial | Attack category bias + premise mistakes |
Peers once created. Origin tag = traceability, not weight.
Good hypothesis:
H3 (concurrency):
cart_sessionmap atcart/session.go:142mutated from TTL-expiry goroutine (cart/expiry.go:61) without holdingsessionMu. Assertion that lock held on every map write trips within 10k load iterations. Kills: assertion never fires across 10k runs.
Before hypotheses, narrow working set:
session.localization.relevant_files.Main token-efficiency lever. Do it first.
After primary list, invoke adversary agent with:
Adversary stance:
"List above probably wrong or incomplete. What hypothesis NOT on list would senior engineer generate? Most embarrassing thing it could be?"
Adversary searches preferentially:
Merge adversarial into session.hypotheses. User must see which were adversarial.
| # | Kind | Action | Killed when |
|---|---|---|---|
| 1 | log probe | Insert log at location. Run repro. | Predicted value never appears across N runs. |
| 2 | assertion | Insert temp assert. Run repro. | Assertion holds across N runs. |
| 3 | unit test | Write test that fails iff hypothesis holds. | Test passes. |
| 4 | git bisect (v0.2) | Bisect range with repro-derived check. | Range has no culprit. |
| 5 | dep pin (v0.2) | Down/upgrade dep. | Bug persists across versions. |
| 6 | env toggle (v0.2) | Flip flag/env/config. | Bug independent of toggle. |
v0.1 ships 1–3. Hypotheses needing 4–6 parked (listed, never "survive") until runner exists.
Prefer cheapest discriminating experiment first:
Cheap kill fast → don't escalate. Parked kinds → record cheapest viable plan anyway.
Every hypothesis MUST contain before any runner runs:
kill_condition: exact observable outcome that falsifies.survive_condition: exact observable outcome that leaves alive.Protocol, not decoration. Runners judge against these. Cannot rewrite after seeing output.
After reasoning, emit exactly one fenced JSON block:
{
"session_id": "<from session state>",
"bug": "<one-sentence restatement>",
"repro": { "command": "<from session>", "hit_rate": 0.85 },
"localization": {
"relevant_files": ["path/to/file_a", "path/to/file_b"],
"basis": "stack trace + grep + recent git history"
},
"axes_covered": ["concurrency", "config", "deps", "contract"],
"hypotheses": [
{
"id": "H1",
"origin": "primary | adversarial",
"axis": "concurrency",
"claim": "<specific causal mechanism with file/line>",
"relevant_files": ["path/to/file_a", "path/to/file_b"],
"predicts": "<obs if true>",
"kills_it": "<obs if false>",
"kill_condition": "<pre-registered>",
"survive_condition": "<pre-registered>",
"experiment": {
"kind": "probe | assertion | test",
"action": "<exact diff, command, or spec>",
"expected_if_true": "<output if H1 correct>",
"expected_if_false": "<output if H1 wrong>",
"budget": { "wall_seconds": 120, "max_tokens": 50000, "iterations": 100 },
"cost": "cheap | medium | expensive"
}
}
],
"parked": [
{ "id": "H_x", "reason": "requires bisect runner (v0.2)" }
],
"notes": "<optional: priors, suspicious recent commits>",
"cost_log": {
"planned_models": {
"experiment_design": "sonnet",
"verdict_extraction": "haiku"
}
}
}
Also update session.hypotheses with same array. Hook + run skill read it.
repro_unstable.git log --oneline -20 on relevant files. Look for suspicious commits.adversary. Merge 2–3 non-overlapping adversarial.kill_condition + survive_condition before finalizing experiment.session.localization, session.hypotheses, session.cost_log. Emit JSON./god-of-debugger:run."origin tag.kill_condition + survive_condition.Remember: plugin quality = prompt quality. Take it seriously.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub soummyaanon/god-of-debugger --plugin god-of-debugger