/lead-bug-hunt
Autonomous bug-elimination loop. Iteratively invokes /bug-hunt and /implement-batch until findings converge below an operator-specified severity floor. At termination, runs /review-test scoped to the run's new reproducing tests and fixes quality issues above the floor.
$ npx -y skills add chrisallenlane/claude-swe-workflows --skill lead-bug-hunt --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/lead-bug-hunt
Context preview
The summary Claude sees to decide when to auto-load this skill.
Autonomous bug-elimination loop. Iteratively invokes /bug-hunt and /implement-batch until findings converge below an operator-specified severity floor. At termination, runs /review-test scoped to the run's new reproducing tests and fixes quality issues above the floor.
SKILL.md
lead-bug-hunt.SKILL.mdname: lead-bug-hunt
description: Autonomous bug-elimination loop. Iteratively invokes /bug-hunt and /implement-batch until findings converge below an operator-specified severity floor. At termination, runs /review-test scoped to the run's new reproducing tests and fixes quality issues above the floor. Auto-approves /bug-hunt and /review-test ticket proposals; pulls the andon cord on contested findings, repeated implementation failure, hard-cap exhaustion, or breaking-change proposals. Optional /refactor finisher.
model: opus
Lead-Bug-Hunt — Autonomous Bug Elimination
Drives a codebase toward "no bugs above severity floor" without operator involvement between startup and termination. The operator states scope, severity floor, constraints, and finisher preference at startup; the skill then loops `/bug-hunt` → triage → `/implement-batch` until two consecutive hunt passes produce no findings above the floor, or until a hard cap or andon cord halts the run.
This skill is a narrower sibling of `/lead-project`. `/lead-project` takes open-ended commander's intent and decides which skills to invoke from a broad repertoire. `/lead-bug-hunt` has a fixed loop shape (hunt → fix → re-hunt) and a bounded sub-skill repertoire. It exists because "iterate until bugs converge" is a recurring workflow worth canonizing.
Philosophy
This skill implements the autonomy discipline documented in [`references/autonomy.md`](../../references/autonomy.md). The shared discipline governs the five levers (altitude rule, pre-loaded options, pre-rebutted recommendation, commander's intent, risk budgets), the cascade rule, the no-unilateral-breaking-changes guardrail, and the shared handoff template. Skill-specific shape (the hunt-cycle structure, convergence criteria, severity-floor triage) is layered on top.
The loop converges on a floor, not on zero
Bugs below a stated severity floor do not block termination. They are recorded as deferred items in the completion report. The operator chooses the floor at startup; defaults to **High** (fix Critical and High; defer Medium and below).
This is the dominant judgment call this skill exposes. Setting the floor too low produces a loop that never converges (`/bug-hunt` always finds *something* at Low). Setting it too high produces a run that ships with real bugs unaddressed. The floor is elicited explicitly so the operator owns this trade-off.
Reproducing tests are durable artifacts
`/bug-hunt` commits reproducing tests as it works. Those tests outlive the run — they become permanent regression tests in the suite. Their quality matters more than typical test code because they will catch regressions for years and bias future test authors who read them as examples.
This skill therefore treats test review as part of its core contract, not as adjacent cleanup. At termination (after convergence, after any `/refactor` finisher), the skill invokes `/review-test` scoped to the test files modified during this run, auto-approves any quality-finding ticket proposals at or above the severity floor, and fixes them via `/implement-batch`. Findings below the floor are deferred to the completion report.
Trust the reproducing test, escalate the disagreement
`/bug-hunt` produces findings backed by reproducing tests. This skill **trusts findings with passing reproducing tests against current HEAD** — they are real bugs by `/bug-hunt`'s evidence contract. The skill does not silently dismiss findings. If the skill genuinely believes a finding is wrong (the reproducing test asserts wrong behavior, the "bug" is intentional), that is an andon trigger ("contested finding"), not a unilateral disregard.
No escape hatches: the skill cannot rationalize bugs away to make the loop converge.
Auto-approval is delegated to the autonomy discipline
`/bug-hunt` and `/review-test` are advisory; their ticket proposals are auto-approved under `/lead-bug-hunt` per the orchestrator-family contract documented in [`references/autonomy.md`](../../references/autonomy.md) § "Auto-approval of sub-skill ticket proposals". The commander's-intent severity floor (field 2) is applied at the triage step (1b), not at the approval moment. The completion report lists every ticket created.
Broad authority, narrow gates
The skill may: invoke `/bug-hunt`, `/implement-batch`, `/implement`, `/bug-fix`, `/think-diagnose`, `/refactor`, `/review-test` (at termination, scoped to the run's new tests); create tickets via auto-approved proposals; commit fix work via sub-skills; create and modify the working branch.
The skill may NOT without explicit authorization: push or merge to main/master, force-push, propose breaking changes (see `references/autonomy.md` § "No unilateral breaking changes"), invoke `/review-*` skills other than the scoped `/review-test` at termination (out-of-axis — use `/lead-project` if you want broader review-driven work), install dependencies, run irreversible destructive operations.
Workflow Overview
┌──────────────────────────────────────────────────────────────────┐
│ LEAD-BUG-HUNT WORKFLOW │
├──────────────────────────────────────────────────────────────────┤
│ 0. Startup │
│ ├─ 0a. Branch and working-tree check │
│ ├─ 0b. Resume existing run or start fresh │
│ ├─ 0c. Elicit commander's intent (4 fields) │
│ └─ 0d. Seed LEAD_BUG_HUNT_STATE.md │
│ │
│ 1. Hunt cycle (repeat until convergence or andon cord) │
│ ├─ 1a. Hunt — invoke /bug-hunt, gather findings │
│ ├─ 1b. Triage — apply severity floor, screen for contests │
│ ├─ 1c. Decide — form batch, escalate, or terminate │
│ ├─ 1d. Act — invoke /implement-batch (or /implement, etc.) │
│ ├─ 1e. Ve
Read more
name: lead-bug-hunt description: Autonomous bug-elimination loop. Iteratively invokes /bug-hunt and /implement-batch until findings converge below an operator-specified severity floor. At termination, runs /review-test scoped to the run's new reproducing tests and fixes quality issues above the floor. Auto-approves /bug-hunt and /review-test ticket proposals; pulls the andon cord on contested findings, repeated implementation failure, hard-cap exhaustion, or breaking-change proposals. Optional /refactor finisher. model: opus
Lead-Bug-Hunt — Autonomous Bug Elimination
Drives a codebase toward "no bugs above severity floor" without operator involvement between startup and termination. The operator states scope, severity floor, constraints, and finisher preference at startup; the skill then loops `/bug-hunt` → triage → `/implement-batch` until two consecutive hunt passes produce no findings above the floor, or until a hard cap or andon cord halts the run.
This skill is a narrower sibling of `/lead-project`. `/lead-project` takes open-ended commander's intent and decides which skills to invoke from a broad repertoire. `/lead-bug-hunt` has a fixed loop shape (hunt → fix → re-hunt) and a bounded sub-skill repertoire. It exists because "iterate until bugs converge" is a recurring workflow worth canonizing.
Philosophy
This skill implements the autonomy discipline documented in [`references/autonomy.md`](../../references/autonomy.md). The shared discipline governs the five levers (altitude rule, pre-loaded options, pre-rebutted recommendation, commander's intent, risk budgets), the cascade rule, the no-unilateral-breaking-changes guardrail, and the shared handoff template. Skill-specific shape (the hunt-cycle structure, convergence criteria, severity-floor triage) is layered on top.
The loop converges on a floor, not on zero
Bugs below a stated severity floor do not block termination. They are recorded as deferred items in the completion report. The operator chooses the floor at startup; defaults to **High** (fix Critical and High; defer Medium and below).
This is the dominant judgment call this skill exposes. Setting the floor too low produces a loop that never converges (`/bug-hunt` always finds *something* at Low). Setting it too high produces a run that ships with real bugs unaddressed. The floor is elicited explicitly so the operator owns this trade-off.
Reproducing tests are durable artifacts
`/bug-hunt` commits reproducing tests as it works. Those tests outlive the run — they become permanent regression tests in the suite. Their quality matters more than typical test code because they will catch regressions for years and bias future test authors who read them as examples.
This skill therefore treats test review as part of its core contract, not as adjacent cleanup. At termination (after convergence, after any `/refactor` finisher), the skill invokes `/review-test` scoped to the test files modified during this run, auto-approves any quality-finding ticket proposals at or above the severity floor, and fixes them via `/implement-batch`. Findings below the floor are deferred to the completion report.
Trust the reproducing test, escalate the disagreement
`/bug-hunt` produces findings backed by reproducing tests. This skill **trusts findings with passing reproducing tests against current HEAD** — they are real bugs by `/bug-hunt`'s evidence contract. The skill does not silently dismiss findings. If the skill genuinely believes a finding is wrong (the reproducing test asserts wrong behavior, the "bug" is intentional), that is an andon trigger ("contested finding"), not a unilateral disregard.
No escape hatches: the skill cannot rationalize bugs away to make the loop converge.
Auto-approval is delegated to the autonomy discipline
`/bug-hunt` and `/review-test` are advisory; their ticket proposals are auto-approved under `/lead-bug-hunt` per the orchestrator-family contract documented in [`references/autonomy.md`](../../references/autonomy.md) § "Auto-approval of sub-skill ticket proposals". The commander's-intent severity floor (field 2) is applied at the triage step (1b), not at the approval moment. The completion report lists every ticket created.
Broad authority, narrow gates
The skill may: invoke `/bug-hunt`, `/implement-batch`, `/implement`, `/bug-fix`, `/think-diagnose`, `/refactor`, `/review-test` (at termination, scoped to the run's new tests); create tickets via auto-approved proposals; commit fix work via sub-skills; create and modify the working branch.
The skill may NOT without explicit authorization: push or merge to main/master, force-push, propose breaking changes (see `references/autonomy.md` § "No unilateral breaking changes"), invoke `/review-*` skills other than the scoped `/review-test` at termination (out-of-axis — use `/lead-project` if you want broader review-driven work), install dependencies, run irreversible destructive operations.
Workflow Overview
┌──────────────────────────────────────────────────────────────────┐ │ LEAD-BUG-HUNT WORKFLOW │ ├──────────────────────────────────────────────────────────────────┤ │ 0. Startup │ │ ├─ 0a. Branch and working-tree check │ │ ├─ 0b. Resume existing run or start fresh │ │ ├─ 0c. Elicit commander's intent (4 fields) │ │ └─ 0d. Seed LEAD_BUG_HUNT_STATE.md │ │ │ │ 1. Hunt cycle (repeat until convergence or andon cord) │ │ ├─ 1a. Hunt — invoke /bug-hunt, gather findings │ │ ├─ 1b. Triage — apply severity floor, screen for contests │ │ ├─ 1c. Decide — form batch, escalate, or terminate │ │ ├─ 1d. Act — invoke /implement-batch (or /implement, etc.) │ │ ├─ 1e. Ve
Showing the first part of this file.
A system of composable software engineering workflows for Claude Code. Plan projects, implement tickets, and run quality passes — from a single ticket to a multi-batch project, using the same layered architecture.
Repo: chrisallenlane/claude-swe-workflows
Other skills on claude-swe-workflows.
- /bug-fix
Bug-fixing workflow that coordinates diagnosis, test-driven reproduction, root-cause analysis, and targeted fixes. Use when the user wants to fix a bug with thorough investigation and regression testing.
Open skill - /bug-hunt
Proactive bug-hunting workflow. Assesses codebase risk through complexity, coverage, and structural analysis, then spawns focused investigators that write reproducing tests to validate suspected bugs. Thoroughness over speed. Advisory only — produces findings and proposes
Open skill - /implement-batch
Multi-ticket batch workflow. Takes a batch of tickets, plans execution order, implements each via /implement in autonomous mode, runs cross-cutting quality passes, and presents results for final review.
Open skill - /implement-project
Full-lifecycle project workflow. Takes batched tickets, implements via /implement-batch, runs smoke tests, then executes a comprehensive quality pipeline (refactor, review-arch, review-test, tidy-docs, review-release). Maximizes autonomy with andon cord escape.
Open skill - /implement
Iterative development workflow that coordinates implementation, refactoring, QA, and documentation agents to complete features systematically. Use when the user wants a full development workflow with quality checks.
Open skill - /lead-project
Autonomous technical lead. Takes commander's intent and drives a project to completion through an OODA loop over implementation, refactoring, review, and bug-hunting skills. Has broad authority — creates tickets, commits, invokes any skill — and only escalates via andon cord for
Open skill

