Skip to content
Skills Library
Programming · Analysis

bisect-anything

/bisect-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 tests, changed output, slowdowns, crashes, visual changes, server behaviour, flaky checks, unbuildable commits and merge-heavy history. Use when the user says "what broke this", "find the commit that", "when did this start", "it used to work", "regression", "git bisect", "which version broke it", or "which change made it

Repository
simcraft ↗
Licence
MIT
Last repository change
09.11.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
12
Scripts
10
HTML comments
0
URLs in SKILL.md
0
Deprecation

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

Licence

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

What to check before installing
  • 10 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: examples/make_demo_repo.py, examples/selftest.py, scripts/_common.py, scripts/bisect.py, scripts/bisect_list.py, scripts/hunk_minimise.py, scripts/oracles/bench_oracle.py, scripts/oracles/golden_oracle.py, scripts/oracles/img_diff.py, scripts/oracles/serve_oracle.py

What it does and when to use it

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 tests, changed output, slowdowns, crashes, visual changes, server behaviour, flaky checks, unbuildable commits and merge-heavy history. Use when the user says "what broke this", "find the commit that", "when did this start", "it used to work", "regression", "git bisect", "which version broke it", or "which change made it

Triggers from the description

what broke thisfind the commit thatwhen did this startit used to workregressiongit bisectwhich version broke it
Original author description

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 tests, changed output, slowdowns, crashes, visual changes, server behaviour, flaky checks, unbuildable commits and merge-heavy history. Use when the user says "what broke this", "find the commit that", "when did this start", "it used to work", "regression", "git bisect", "which version broke it", or "which change made it

How it works

  1. 1. Pin down the regression
  2. 2. Write the oracle
  3. 3. Run it
  4. 4. Explain the commit
  5. Check your work
Original SKILL.md headings · 59 lines, 655 words
SKILL.md preview
---
name: bisect-anything
description: 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 tests, changed output, slowdowns, crashes, visual changes, server behaviour, flaky checks, unbuildable commits and merge-heavy history. Use when the user says "what broke this", "find the commit that", "when did this start", "it used to work", "regression", "git bisect", "which version broke it", or "which change made it slow".
---

# Bisect anything

A bisect is only as good as its oracle: the command that says "good" or "bad" for one commit. Almost every wrong bisect answer comes from an oracle that is flaky, tests the wrong thing, or calls a broken build "bad". So spend most of the effort on the oracle, prove it on both ends, and let the scripts do the rest.

Scripts are in `~/simcraft/skills/coding/bisect-anything/scripts/` (Python 3.9+, standard library only). Details, recipes and pitfalls are in `reference.md` next to this file.

## 1. Pin down the regression

Ask only for what is missing, one question at a time:
- **What is wrong**, as something a command can check (a failing test, a wrong number, a slow page, a crash, a changed screenshot).
- **A good point**: a tag, release, date or commit where it worked. If nobody knows, try an old tag; checking one old commit is cheap.
- **The bad point**: usually `HEAD`.
- **How to build and install** at an old commit.

## 2. Write the oracle

Exit `0` good, `125` cannot test this commit, any other code bad. Keep the oracle script **outside the repo** (or pass it with `--overlay`), because old commits do not have it. Pick the recipe that fits; full versions are in `reference.md`:

| Regression | Oracle |
|---|---|
| A test fails | run that one test only, with `--overlay` if the test is new |
| Output changed | `oracles/golden_oracle.py`, with `--ignore` for times, versions and ids |
| Got slower | `oracles/bench_oracle.py`: measure both ends first, threshold between the medians |
| Crash | exit 1 only for the crash signature (signal or message), 0 otherwise |
| Looks different | render a screenshot, then `oracles/img_diff.py` with a tolerance and masks |
| Server behaviour | `oracles/serve_oracle.py`: free port, wait until ready, probe, always kill |

Narrow the oracle to this one bug. "The whole test suite passes" finds the first commit that broke anything, which is rarely the one the user cares about.

## 3. Run it

```
python3 scripts/bisect.py --good v2.3.0 --bad HEAD \
  --install "npm ci" --build "npm run build" \
  --oracle "node /path/outside/repo/repro.js" --repeats 3 --timeout 120
```

It works in a separate worktree, so the user's checkout and uncommitted work are untouched. It first checks the oracle says good on `--good` and bad on `--bad`, and stops if not. Install runs only when a lockfile or manifest changes; a failed install or build marks the commit as skip (125).

Choose flags with judgement:
- Flaky oracle: `--repeats 5` (majority vote). A bug that only shows sometimes: `--repeats 10 --vote any-bad`.
- Hangs: `--timeout`; a timeout counts as bad unless `--timeout-means skip`.
- Merge-heavy history, or "which PR broke it": `--first-parent`, then bisect inside the merge it names.
- Stale build output fools you: `--clean --keep node_modules`.
- Looking for the fix instead: `--find-fix`.

For things that are not commits (package versions, nightly builds, config values, data rows), use `scripts/bisect_list.py` over an ordered list, or `--minimise` to find the smallest set of flags or inputs that still fails.

## 4. Explain the commit

1. Read the found commit with `git show`. If the report says "not conclusive", the answer is one of the listed commits next to a skipped one. Say so honestly, do not pick one.
2. Shrink it: `scripts/hunk_minimise.py --commit <sha> --oracle ... --build ...` finds the smallest set of hunks that still causes the problem.
3. Tell the user, in plain words: the commit (hash, title, author, date), the exact hunk, **why** that change causes the symptom, and how sure you are (steps, skips, repeats). Suggest a fix or a revert, and a regression test built from the oracle.

## Check your work

Run `python3 examples/selftest.py`. It builds a 40-commit demo repo with a planted bug, slowdown, visual change and unbuildable commits, and checks that every scenario finds the right commit (about one minute).
Files in this package (12)
  • SKILL.md 4 KB
  • reference.md 12 KB
  • examples/make_demo_repo.py 9 KB
  • examples/selftest.py 12 KB
  • scripts/_common.py 7 KB
  • scripts/bisect.py 16 KB
  • scripts/bisect_list.py 7 KB
  • scripts/hunk_minimise.py 10 KB
  • scripts/oracles/bench_oracle.py 5 KB
  • scripts/oracles/golden_oracle.py 3 KB
  • scripts/oracles/img_diff.py 6 KB
  • scripts/oracles/serve_oracle.py 5 KB

Versions

The database has no other skills named bisect-anything.

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

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 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.
  • 100git-bisect-hunting-regression-bugs
    Use this skill when pinpointing the exact commit introducing a software defect using automated binary search with git bisect.
  • 100regression-hunt
    Find the commit that introduced a regression by bisecting history in an isolated worktree. Use when a test, build, or behavior used to pass and now fails, when the user asks when something broke, which commit broke it, or asks to bisect. Requires a command that exits 0 on a…
  • 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-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.