sequenzia/agent-alchemy/bug-killer

Claude Code and agent skill by sequenzia/agent-alchemy

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Systematic, hypothesis-driven debugging workflow with triage-based track routing. Use when asked to "fix this bug", "debug this", "why is this failing", "this is broken", "investigate this error", "track down this issue", or any debugging situation. Supports --deep flag to force full investigation.

Install

npx vskill@latest install sequenzia/agent-alchemy/bug-killer

SKILL.md

The same SKILL.md was published earlier as majiayu000/claude-skill-registry/bug-killer.

Bug Killer — Hypothesis-Driven Debugging Workflow

Execute a systematic debugging workflow that enforces investigation before fixes. Every bug gets a hypothesis journal, evidence gathering, and root cause confirmation before any code changes.

CRITICAL: Complete ALL 5 phases. The workflow is not complete until Phase 5: Wrap-up & Report is finished. After completing each phase, immediately proceed to the next phase without waiting for user prompts.

Phase Overview

  1. Triage & Reproduction — Understand, reproduce, route to quick or deep track
  2. Investigation — Gather evidence with language-specific techniques
  3. Root Cause Analysis — Confirm root cause through hypothesis testing
  4. Fix & Verify — Fix with proof, regression test, quality check
  5. Wrap-up & Report — Document trail, capture learnings

Phase 1: Triage & Reproduction

Goal: Understand the bug, reproduce it, and decide the investigation track.

1.1 Parse Context

Extract from $ARGUMENTS and conversation context:

  • Bug description: What's failing? Error messages, symptoms
  • Reproduction steps: How to trigger the bug (test command, user action, etc.)
  • Environment: Language, framework, test runner, relevant config
  • Prior attempts: Has the user already tried fixes? What didn't work?
  • Deep flag: If --deep is present, skip triage and go directly to deep track (jump to Phase 2 deep track)
1.2 Reproduce the Bug

Attempt to reproduce before investigating:

  1. If a failing test was mentioned, run it:

``bash # Run the specific test to confirm the failure <test-runner> <test-file>::<test-name> ``

  1. If an error was described, find and trigger it
  2. If neither, search for related test files and run them

Capture the exact error output — this is your primary evidence.

If the bug cannot be reproduced:

  • Ask the user for more context via AskUserQuestion
  • Check if it's environment-specific or intermittent
  • Note "not yet reproduced" in the hypothesis journal
1.3 Form Initial Hypothesis

Based on the error message and context, form your first hypothesis:

markdown
### H1: [Title]
-Hypothesis: [What you think is causing the bug]
-Evidence for: [What supports this — error message, stack trace, etc.]
-Evidence against: [Anything that contradicts it — if none yet, say "None yet"]
-Test plan: [Specific steps to confirm or reject]
-Status: Pending
1.4 Route to Track

Quick-fix signals (ALL must be true):

  • Clear, specific error message pointing to exact location
  • Localized to 1-2 files (not spread across the codebase)
  • Obvious fix visible from reading the error location
  • No concurrency, timing, or state management involved

Deep-track signals (ANY one triggers deep track):

  • Bug spans 3+ files or modules
  • Root cause unclear from the error message alone
  • Intermittent or environment-dependent failure
  • Involves concurrency, timing, shared state, or async behavior
  • User already tried fixes that didn't work
  • Generic error message (e.g., "null reference" without clear origin)
  • Stack trace points to library/framework code rather than application code

Present your assessment via AskUserQuestion:

  • Summarize the bug and your initial hypothesis
  • Recommend quick or deep track with justification
  • Options: "Quick track (Recommended)" / "Deep track" / "Deep track" / "Quick track" — depending on your assessment
  • Let the user override your recommendation

Track escalation rule: If during quick track execution, 2 hypotheses are rejected, automatically escalate to deep track. Preserve all hypothesis journal entries when escalating.


Phase 2: Investigation

Goal: Gather evidence systematically, guided by language-specific techniques.

2.1 Load Language Reference

Detect the primary language of the bug's context and load the appropriate reference:

LanguageReference File
PythonRead ${CLAUDE_PLUGIN_ROOT}/skills/bug-killer/references/python-debugging.md
TypeScript / JavaScriptRead ${CLAUDE_PLUGIN_ROOT}/skills/bug-killer/references/typescript-debugging.md
Other / MultipleRead ${CLAUDE_PLUGIN_ROOT}/skills/bug-killer/references/general-debugging.md

Always also load general-debugging.md as a supplement when using a language-specific reference.

2.2 Quick Track Investigation

For quick-track bugs, investigate directly:

  1. Read the error location — the file and function where the error occurs
  2. Read the immediate callers — 1-2 files up the call chain
  3. Check recent changes — git log --oneline -5 -- <file> for the affected files
  4. Update hypothesis — does the evidence support H1? Add evidence for/against

Proceed to Phase 3 (quick track).

2.3 Deep Track Investigation

For deep-track bugs, use parallel exploration agents:

  1. Plan exploration areas — identify 2-3 focus areas based on the bug:
  • Focus 1: The error site and immediate code path
  • Focus 2: Data flow and state management leading to the error
  • Focus 3: Related subsystems, configuration, or external dependencies
  1. Launch code-explorer agents:

Spawn 2-3 code-explorer agents from core-tools:

``` Use Task tool with subagent_type: "agent-alchemy-core-tools:code-explorer"

Prompt for each agent: Bug context: [description of the bug and error] Focus area: [specific area for this agent]

Investigate this focus area in relation to the bug:

  • Find all relevant files
  • Trace the execution/data path
  • Identify where behavior diverges from expected
  • Note any suspicious patterns, recent changes, or known issues
  • Report structured findings

```

Launch agents in parallel for independent focus areas.

  1. Synthesize exploration results:
  • Collect findings from all agents
  • Identify convergence (multiple agents pointing to same area)
  • Update hypothesis journal with new evidence
  • Form additional hypotheses if evidence warrants (aim for 2-3 total)

Proceed to Phase 3 (deep track).


Phase 3: Root Cause Analysis

Goal: Confirm the root cause through systematic hypothesis testing.

3.1 Quick Track Root Cause

For quick-track bugs:

  1. Verify the hypothesis:
  • Read the specific code identified in Phase 2
  • Trace the logic step-by-step
  • Confirm that the hypothesized cause produces the observed error
  1. If confirmed (Status → Confirmed):
  • Update H1 with confirming evidence
  • Proceed to Phase 4
  1. If rejected (Status → Rejected):
  • Update H1 with evidence against and reason for rejection
  • Form a new hypothesis (H2) based on what you learned
  • Investigate H2 following Phase 2 quick track steps
  • If H2 is also rejected → escalate to deep track
  • Preserve all journal entries, continue with Phase 2 deep track
3.2 Deep Track Root Cause

For deep-track bugs:

  1. Prepare hypotheses for testing:
  • You should have 2-3 hypotheses from Phase 2
  • Each needs a concrete test plan (how to confirm or reject)
  1. Launch bug-investigator agents:

Spawn 1-3 bug-investigator agents to test hypotheses in parallel:

``` Use Task tool with subagent_type: "bug-investigator"

Prompt for each agent: Bug context: [description of the bug and error]

Hypothesis to test: [specific hypothesis] Test plan:

  1. [Step 1 — e.g., run this specific test with these arguments]
  2. [Step 2 — e.g., check git blame for this function]
  3. [Step 3 — e.g., trace the data from input to error site]

Report your findings with verdict (confirmed/rejected/inconclusive), evidence, and recommendations. ```

Launch agents in parallel when they test independent hypotheses.

  1. Evaluate results:
  • Update hypothesis journal with each agent's findings
  • If one hypothesis is confirmed → proceed to Phase 4
  • If all are rejected/inconclusive → apply 5 Whys technique:

Take the strongest "inconclusive" finding and ask "why?" iteratively: `` Observed: [what actually happens] Why? → [first-level cause] Why? → [second-level cause] Why? → [root cause] ``

  • Form new hypotheses from 5 Whys analysis and repeat investigation
  1. If stuck after 2 rounds of investigation:
  • Present all findings to the user via AskUserQuestion
  • Share the hypothesis journal
  • Ask for additional context or direction
  • Options: "Continue investigating", "Try a different angle", "Provide more context"

Phase 4: Fix & Verify

Goal: Fix the root cause and prove the fix works.

4.1 Design the Fix

Before writing any code:

  1. Explain the root cause — state clearly what's wrong and why
  2. Explain the fix — describe what will change and WHY it addresses the root cause
  3. Identify affected files — list every file that needs modification
  4. Consider side effects — could this fix break other behavior?
4.2 Implement the Fix
  1. Read all files that will be modified before making changes
  2. Apply the fix using Edit tool — minimal, focused changes
  3. Match existing patterns — follow the codebase's conventions
4.3 Run Tests
  1. Run the originally failing test — it should now pass:

``bash <test-runner> <test-file>::<test-name> ``

  1. Run related tests — tests in the same file and nearby test files:

``bash <test-runner> <test-directory> ``

  1. If tests fail:
  • Determine if the failure is related to the fix or pre-existing
  • If related, revise the fix (do NOT revert to a different approach without updating the hypothesis journal)
  • If pre-existing, note it but don't let it block the fix
4.4 Write Regression Test

Write a test that would have caught this bug:

  1. The test should fail WITHOUT the fix (verifying it tests the right thing)
  2. The test should pass WITH the fix
  3. The test should be minimal — test the specific behavior that was broken
  4. Place it in the appropriate test file following project conventions
4.5 Deep Track: Quality Check and Related Issues

Deep track only — skip on quick track.

  1. Load code-quality skill:

`` Read ${CLAUDE_PLUGIN_ROOT}/skills/code-quality/SKILL.md `` Review the fix against code quality principles.

  1. Check for related issues:
  • Search for the same pattern elsewhere in the codebase:

`` Grep for the pattern that caused the bug ``

  • If the same bug exists in other locations, report them to the user
  • Ask via AskUserQuestion: "Fix all related instances now?" / "Fix only the reported bug" / "Create tasks for related fixes"

Phase 5: Wrap-up & Report

Goal: Document the investigation trail and capture learnings.

5.1 Bug Fix Summary

Present to the user:

markdown
## Bug Fix Summary
### Bug
[One-line description of the bug]
### Root Cause
[What was actually wrong and why]
### Fix Applied
[What was changed, with file:line references]
### Tests
-[Originally failing test]: Now passing
-[Regression test added]: [test name and location]
-[Related tests]: All passing
### Track
[Quick / Deep] [Escalated from quick: Yes/No]
5.2 Hypothesis Journal Recap

Present the complete hypothesis journal showing the investigation trail:

markdown
### Investigation Trail
#### H1: [Title]
-Status: Confirmed / Rejected
-[Key evidence summary]
#### H2: [Title] (if applicable)
-Status: Confirmed / Rejected
-[Key evidence summary]
[... additional hypotheses ...]
5.3 Project Learnings

Load the project-learnings skill to evaluate whether this bug reveals project-specific knowledge worth capturing:

Read ${CLAUDE_PLUGIN_ROOT}/skills/project-learnings/SKILL.md

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
43
Repository forks
7
7-day trend score
19

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 Sep 2026, 2 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sequenzia/agent-alchemy/bug-killer/badge)](https://verified-skill.com/skills/sequenzia/agent-alchemy/bug-killer)

Something wrong with this skill or its page? Tell us.