plugins/git-tools/skills/git-bisect-debugging/SKILL.md
This skill should be used when the user asks to "find which commit broke this", "debug a regression", "bisect to find the bug", or says "this used to work". Automatically activates for performance regressions, test failures that appeared recently, or any issue known to have worked at a previous commit. Can be invoked from systematic-debugging or used standalone. Not for general debugging without a known-good commit or regression history.
npx skillsauth add sjungling/sjungling-claude-plugins git-bisect-debuggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 bisecttesting
This skill should be used when the user asks to "start a service in tmux", "check tmux pane output", "manage background processes", or "run a server in a pane". Automatically activates when running in a TMUX session (detected by SessionStart hook). Not for one-off commands that do not need a persistent pane.
development
This skill should be used when the user asks to "write a README", "create API documentation", "draft release notes", "write a tutorial", "structure documentation", or "review docs for clarity". Automatically activates when working with .md files in docs/ directories, README files, or when discussing documentation structure, style guides, or content organization. Not for creative/marketing writing, academic papers, code comments/docstrings, or internal chat.
testing
This skill should be used when the user asks to "generate a PDF from markdown", "create a printable book", "convert documentation to PDF", or "export chapters as a PDF". Automatically activates when producing a PDF from a directory of ordered markdown chapters using pandoc and weasyprint. Not for single-file markdown-to-PDF conversion or non-documentation use cases.
documentation
This skill should be used when the user asks to "manage Obsidian vault", "create a daily note", "move notes without breaking links", "search vault content", or "organize Obsidian notes". Automatically activates when working with Obsidian vaults, markdown notes with [[wiki-links]], daily notes, templates, or tags. Not for general markdown editing outside Obsidian vaults.