Skip to content
Skills Library
Programming · Analysis

git-bisect-ai

/git-bisect-ai

AI-guided git bisect for finding the exact commit that introduced a bug or regression. Automates the binary search, interprets test results, and identifies the responsible code change with full context. Use when you know a bug exists now but didn't exist before, or when a performance regression appeared somewhere in git history.

Licence
MIT
Last repository change
16.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 16.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

AI-guided git bisect for finding the exact commit that introduced a bug or regression. Automates the binary search, interprets test results, and identifies the responsible code change with full context. Use when you know a bug exists now but didn't exist before, or when a performance regression appeared somewhere in git history.

Original author description

AI-guided git bisect for finding the exact commit that introduced a bug or regression. Automates the binary search, interprets test results, and identifies the responsible code change with full context. Use when you know a bug exists now but didn't exist before, or when a performance regression appeared somewhere in git history.

How it works

  1. Quick Start
  2. How It Works
  3. Workflow
  4. Bisect Script Templates
  5. After Finding Culprit
Original SKILL.md headings · 131 lines, 507 words
SKILL.md preview
---
name: git-bisect-ai
description: AI-guided git bisect for finding the exact commit that introduced a bug or regression. Automates the binary search, interprets test results, and identifies the responsible code change with full context. Use when you know a bug exists now but didn't exist before, or when a performance regression appeared somewhere in git history.
---

# Git Bisect AI

Find the commit that broke it — without reading 500 commits manually.

## Quick Start

```
/git-bisect-ai                          — interactive bisect session
/git-bisect-ai --auto "npm test"        — fully automated with test command
/git-bisect-ai --good v2.1.0 --bad HEAD — specify known good/bad points
/git-bisect-ai --perf "p99 latency"    — performance regression bisect
```

## How It Works

Binary search through commits: `O(log n)` — 1000 commits = ~10 steps.

Claude will:
1. Ask for symptom + known good commit (or tag)
2. Run `git bisect start`
3. At each step: checkout commit → run test/check → mark good/bad
4. Identify the culprit commit
5. Explain what changed and why it likely caused the regression
6. Suggest targeted fix or revert strategy

## Workflow

### Interactive Mode
```
/git-bisect-ai

Claude: What's the regression?
You: The /checkout page returns 500 after a database query

Claude: When did it last work?
You: It was fine in the v3.2.0 release

Claude will:
  git bisect start
  git bisect bad HEAD
  git bisect good v3.2.0
  → [steps through 8 commits]
  → Found: commit abc1234
     "feat: add discount coupon support"
  → Changed: src/checkout/service.ts line 142
     Added raw SQL interpolation (SQL injection + syntax error in some locales)
```

### Automated Mode (with test script)
```bash
git bisect start
git bisect bad HEAD
git bisect good v3.2.0

# Claude generates and runs:
git bisect run bash -c '
  npm run build:quiet &&
  curl -s -o /dev/null -w "%{http_code}" \
    http://localhost:3000/api/checkout | grep -q 200
'
# Exits 0 = good, non-0 = bad
```

### Performance Regression Mode
```bash
/git-bisect-ai --perf

Claude measures p95 latency at each bisect step:
  Commit abc → p95: 95ms  (good)
  Commit def → p95: 850ms (bad)
  Commit ghi → p95: 102ms (good)
  → Culprit: commit def
     "refactor: extract UserService"
     Introduced N+1 query in user.findByEmail()
```

## Bisect Script Templates

### HTTP status check
```bash
git bisect run bash -c 'npm start &>/dev/null & sleep 3 && \
  STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/api/health) && \
  kill %1 && [ "$STATUS" = "200" ]'
```

### Unit test
```bash
git bisect run npm test -- --testPathPattern="checkout.test.ts" --silent
```

### Build check
```bash
git bisect run npm run build 2>/dev/null
```

### Performance threshold
```bash
git bisect run bash -c '
  npm start &>/dev/null & sleep 3 &&
  LATENCY=$(curl -s -w "%{time_total}" -o /dev/null http://localhost:3000/api/products) &&
  kill %1 &&
  echo "$LATENCY < 0.5" | bc -l | grep -q 1
'
```

## After Finding Culprit

Claude will show:
```
BISECT RESULT
==============
Culprit commit: abc1234f
Author: Jane Doe <jane@example.com>
Date: 2026-06-10 14:32 UTC
Message: "feat: add discount coupon support"

CHANGED FILES
  src/checkout/service.ts    (+47, -12)
  src/models/coupon.ts       (+120, -0)  ← NEW FILE

ROOT CAUSE (line 142 in service.ts)
  const query = `SELECT * FROM orders WHERE code = '${couponCode}'`
  ← SQL injection + breaks on quotes in coupon codes (e.g., "MOTHER'S-DAY")

OPTIONS
  1. Fix: Parameterize query → db.query('...WHERE code = $1', [couponCode])
  2. Revert: git revert abc1234f (creates new commit, safe for main)
  3. Cherry-pick fix onto v3.2.0 patch branch
```

Versions

The database has no other skills named git-bisect-ai.

Database snapshot: 13.11.2026 · package version f7336a6aed37 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100git-bisect-hunting-regression-bugs
    Use this skill when pinpointing the exact commit introducing a software defect using automated binary search with git bisect.
  • 100bisect
    Bisect a ClickHouse regression using pre-built master binaries from CI. Use when the user wants to find the commit that introduced a bug.
  • 100git-bisect-regression
    Find which commit introduced a bug or behavior change using `git bisect`. Use this whenever the user says something "used to work", "worked last week", "stopped working", "broke at some point", asks "which commit broke this", "when did this start", "find the regression" or "who…
  • 90git-bisect
    Find the exact commit that introduced a regression by driving git bisect with an automated pass/fail script. Use when a behavior worked in an older build and you need the first bad commit out of hundreds, not a guess.
  • 100bisect-anything
    Find the exact commit (or dependency version, config value, or input) that caused a regression by turning it into an automatic pass/fail check and running git bisect run in a separate worktree, then shrink the bad commit to the hunk that matters and explain it. Handles failing…
  • 100git-bisect-debugging
    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…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.