/git-tools:git-bisect-debuggingfrom git-tools
Uses git bisect to binary-search commit history and find which commit introduced a bug or regression. Activates when user asks to find what broke something or debug a regression.
Ships in git-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Systematically identify which commit introduced a bug or regression using git bisect. Binary search through commit history to find the exact commit that introduced the issue. Main agent orchestrates, subagents execute verification at each step.
Announce at start: "I'm using git-bisect-debugging to find which commit introduced this issue."
| Phase | Key Activities | Output |
|---|---|---|
| 1. Setup & Verification | Identify good/bad commits, verify clean state | Confirmed commit range |
| 2. Strategy Selection | Choose automated/manual/hybrid approach | Test script or verification steps |
| 3. Execution | Run bisect with subagents | First bad commit hash |
| 4. Analysis & Handoff | Show commit details, analyze root cause | Root cause understanding |
This skill focuses on straightforward scenarios. It does NOT handle:
--first-parent)For these scenarios, manual git bisect with user guidance is recommended.
Announce the skill and track the four phases in a checklist. Then:
Copy this checklist to track progress:
Git Bisect Progress:
- [ ] Phase 1: Setup & Verification (good/bad commits identified)
- [ ] Phase 2: Strategy Selection (approach chosen, script ready)
- [ ] Phase 3: Execution (first bad commit found)
- [ ] Phase 4: Analysis & Handoff (root cause investigation complete)
Purpose: Ensure git bisect is appropriate and safe to run.
Steps:
Verify prerequisites:
git status)Identify commit range:
git log --oneline, git tag, git log --since="last week"HEAD or a specific commit where issue is confirmedVerify the range:
Safety checks:
Output: Confirmed good commit hash, bad commit hash, estimated steps
Purpose: Choose the most efficient bisect approach.
Assessment: Determine whether an automated test script can deterministically identify good vs bad.
MANDATORY: Use AskUserQuestion to present three approaches:
If automated or hybrid selected:
Write a test script following the template at ./scripts/bisect-test-template.sh. Key guidelines:
If manual selected:
Write specific verification steps for the subagent with concrete actions and expected outcomes. Avoid vague instructions like "see if it works."
Output: Selected approach, test script or verification steps
Architecture: Main agent orchestrates bisect, subagents verify each commit in isolated context.
For detailed subagent prompt templates and error handling patterns, see ./references/execution-patterns.md.
Execution summary:
git bisect start <bad> <good>git bisect good|bad|skip -> update progressgit bisect reset to cleanupOutput: First bad commit hash, bisect log showing the path taken
Purpose: Present findings and analyze root cause.
Present the identified commit:
Found first bad commit: <hash>
Author: <author>
Date: <date>
<commit message>
Files changed: <list from git show --stat>
Show how to view details:
View full diff: git show <hash>
View file at that commit: git show <hash>:<file>
Handoff to root cause analysis:
<hash>, using systematic-debugging to analyze why this change caused the issue."Output: Root cause understanding of why the commit broke functionality
./references/execution-patterns.md -- Subagent prompt templates and error handling./references/troubleshooting.md -- Common patterns, troubleshooting, and example workflows./scripts/bisect-test-template.sh -- Test script template for automated bisectWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sjungling/sjungling-claude-plugins --plugin git-toolsOther plugins' skills for the same job