autopilot
The whole coding loop on one deliberate yes: map, spec, critic-hardened plan, GitHub issues, parallel worktree implementers, fresh-context review loops, one PR…
Lightweight bug-fixing loop — reproduce → root-cause → fix test-first → verify — deliberately separate from the heavyweight feature workflow so small fixes don't drag a spec-and-plan process behind them. Demands a deterministic reproduction before any code changes, a stated
$ npx -y skills add duthaho/skillhub --skill bugfix --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/bugfixContext preview
The summary Claude sees to decide when to auto-load this skill.
Lightweight bug-fixing loop — reproduce → root-cause → fix test-first → verify — deliberately separate from the heavyweight feature workflow so small fixes don't drag a spec-and-plan process behind them. Demands a deterministic reproduction before any code changes, a stated
name: bugfix description: >- Lightweight bug-fixing loop — reproduce → root-cause → fix test-first → verify — deliberately separate from the heavyweight feature workflow so small fixes don't drag a spec-and-plan process behind them. Demands a deterministic reproduction before any code changes, a stated root-cause hypothesis confirmed with evidence (never a shotgun fix), a failing test that captures the bug, and the original repro re-run as proof. Keeps a one-line-per-bug log in out/dev/bugfix-log.md and checks it first, so recurring bugs get recognized instead of re-diagnosed. Use when the user reports something broken, failing, throwing, or flaky, or asks to fix a bug — e.g. "/bugfix login 500s on empty password", "fix this error", "this test is flaky", "why is X crashing". If the fix turns out to need real design work, hand off to feature; the shipping gate is done.
`/bugfix <symptom / error / failing thing>`
Answer one question: **why does this actually happen, and what's the minimal fix that provably removes it?** The order is non-negotiable — reproduce before diagnosing, diagnose before fixing, prove after fixing. A fix without a confirmed root cause is a guess wearing a commit message.
Read `out/dev/bugfix-log.md` if it exists. A similar symptom fixed before is the best diagnostic head start there is — past root causes cluster ("we've had three timezone bugs in this module"). Mention any match. Also skim recent `git log` — a bug that appeared recently usually shipped recently.
Turn the report into a **deterministic reproduction**: a command, a failing test invocation, a curl, a click path, a `git bisect run` harness — something that fails on demand and will pass when the bug is dead.
once**, with the invocation and its output pasted. That output is the baseline the fix is judged against — a repro described but never run doesn't count.
`out/dev/bugfix-log.md`, commit messages — so replace every secret with `<REDACTED>` before showing it, build repro loops against env vars so the credential stays in the environment rather than in the command line, and quote only the signal-carrying lines of a captured artifact (auth headers rarely carry signal). If the redacted output isn't enough to diagnose, say so and ask.
speed is your debugging speed: faster, sharper signal, more deterministic (pin time, seed RNG, isolate the filesystem).
inputs, steps, config, and data one at a time, re-running after each cut, until every remaining element is load-bearing. A minimal repro shrinks the hypothesis space and becomes Step 3's failing test nearly for free.
would help (versions, data, environment, timing), and ask. Do not fix code you can't watch fail — "fixed" without a repro is unfalsifiable.
the trigger, pin nondeterminism until it fails most runs. A 50% flake is debuggable; a 1% flake is not. The fix is judged against the same rate.
Work from symptom back to cause; don't pattern-match a fix onto the error message.
1. Read the failing path — the actual code, not just the stack trace. 2. **List 3–5 ranked hypotheses** before probing any — a single hypothesis anchors on the first plausible idea. Each must be **falsifiable**: "if X is the cause, then Z will show W." No prediction = a vibe; sharpen it or drop it. Show the user the ranked list, but don't block on a reply. 3. Probe the top one. Confirm with evidence: a log line, a debugger/print probe, a minimal experiment — the hypothesis must *predict* something you then observe. Tag every probe line with a unique prefix (e.g. `[DEBUG-a4f2]`) so cleanup is a single grep. 4. Wrong? Cross it off, log what was ruled out, move down the list. **Two dead hypotheses → step back**: re-read the repro, question an assumption, or bring the user the map of what's been ruled out. Grinding the same theory harder is not investigation.
**No shotgun fixes**: changing several things at once until the symptom stops proves nothing and usually hides a second bug. One hypothesis, one change, one observation.
1. **Write the failing test that captures the bug** — it should fail for the bug's exact reason, at the root-cause layer (unit test at the broken function beats an end-to-end flake). 2. Apply the **minimal fix** for the root cause. Not the refactor the code deserves, not the defensive `try/except` around the symptom — the cause. 3. Test green, then the **full suite** green (the fix must not buy one green at the cost of another).
**Three straight failed fix attempts is a spiral, not progress.** Stop editing code: the "confirmed" root cause is now in doubt, so return to Step 2's hypothesis list, name the assumption that might be wrong, and run one discriminating probe (or ask one diagnostic question) before the next attempt. (Step 2's two-dead-hypotheses rule governs probing; this one governs fixing — they don't share a counter.)
If the minimal fix keeps growing — touching many files, changing behavior, demanding design decisions — stop and say so: this is a **feature** wearing a bug costume. Hand off to `/feature` with the diagnosis as its input; the root-cause work is not wasted, it's the spec's first paragraph.
output. This is th
Give Claude Code a memory and make it cite its sources — skills for research, daily work, and shipping code. They started as prompts I kept retyping, so I wrote each one down once. Keyless: no API keys, no signups.
The whole coding loop on one deliberate yes: map, spec, critic-hardened plan, GitHub issues, parallel worktree implementers, fresh-context review loops, one PR…
Human-facing documentation, architecture docs, and mermaid diagrams for a codebase, a module, or a feature — "draw me the architecture, with receipts." Fans…
Prompt-cache economics forensics — why your Claude Code tokens burn so fast, with the numbers to prove it. Parses local ~/.claude transcripts (0 tokens, a…
Morning work briefing — "what does my day look like, in one scan?" Gathers today's calendar and emails needing attention (via connected Google MCP tools when…
End-of-session shipping gate — "prove it works, then ship it." Runs an evidence checklist (full test suite, lint/typecheck, build, and actually running the…