From git-tools
Pinpoints the commit introducing a bug or regression using git bisect binary search. For performance regressions, recent test failures, or issues that previously worked.
npx claudepluginhub sjungling/sjungling-claude-pluginsThis skill uses the workspace's default tool permissions.
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.
Automates git bisect to pinpoint the commit introducing a regression by running tests during binary search, showing diff and blame info, and generating analysis reports.
Traces bug introductions in git history, identifies root cause commits using fix analysis and diffs, explains causes, and generates structured post-mortem reports.
Conducts hypothesis-driven debugging: ranks hypotheses, designs git bisections, plans instrumentation, creates minimal reproductions for non-obvious bugs.
Share bugs, ideas, or general feedback.
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.
These are non-negotiable. No exceptions for time pressure, production incidents, or "simple" cases:
If tempted to skip any rule: STOP. Follow the 4-phase workflow exactly. Skipping safety checks, skipping TodoWrite, defaulting to automated, running tests in main context, or stopping after finding the commit are all violations.
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 bisect