К основному содержанию
скилл CX Codex

bisect-anything — скилл для Claude Code: поиск регрессий

Скилл bisect-anything для Claude Code находит коммит, версию зависимости или значение конфигурации, вызвавшие регрессию. Запускается на запросы вроде «что сломало тест» или «когда началась проблема».

MIT ★ 541 обновлён 2026-11-09

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add dotslashsimran/simcraft --skill bisect-anything -a claude-code
Открыть на GitHub

Что делает bisect-anything

Скилл превращает симптом регрессии в проверку «хорошо/плохо», затем запускает git bisect run в отдельном worktree. Проверка сначала должна подтвердить исправное состояние на хорошем коммите и ошибку на плохом; сборка или установка, которые не проходят, помечают коммит как пропущенный.

Для тестов, изменений вывода, замедлений, сбоев, скриншотов и поведения сервера предусмотрены разные сценарии проверки. Скрипты на Python 3.9+ используют только стандартную библиотеку. Отдельный скрипт может сузить найденный коммит до конкретного набора изменений. Работа в отдельном worktree оставляет текущую копию проекта и незакоммиченные изменения нетронутыми.

Какие задачи решает

  • найти коммит, после которого падает тест
  • определить, какая версия зависимости замедлила приложение
  • сравнить вывод или скриншоты до и после регрессии
  • сузить проблемный коммит до нужного фрагмента изменений

Примеры запросов агенту

  • Найди коммит, после которого начал падать этот тест.
  • Определи, какая версия зависимости вызвала замедление.
  • Проверь, какое изменение коммита испортило скриншот.

Как установить bisect-anything

1Через Skills CLI (Vercel)

npx skills add dotslashsimran/simcraft --skill bisect-anything -a claude-code

2Вручную: положить файлы

~/.claude/skills/bisect-anything/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/bisect-anything/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о bisect-anything

Как установить bisect-anything в Claude Code?

Выполни npx skills add dotslashsimran/simcraft --skill bisect-anything -a claude-code. Файл скилла устанавливается в ~/.claude/skills/bisect-anything/SKILL.md.

Что делает bisect-anything?

Он проверяет историю проекта, чтобы найти коммит, вызвавший регрессию, а затем сужает его до изменений, связанных с проблемой.

Что нужно для работы bisect-anything?

Для скриптов нужен Python 3.9+; они используют только стандартную библиотеку. Проверка также запускает git bisect run в отдельном worktree.

Исходный текст

SKILL.md · MIT
---
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).

© dotslashsimran · MIT · dotslashsimran/simcraft

Похожие скиллы

Все скиллы по теме «Git и GitHub» →
git-bisect-helper davila7 Команда git-bisect-helper в Claude Code для git bisect. Ведёт сессию и сама помечает коммиты good/bad по коду выхода теста, чтобы найти, какой коммит сломал поведение. CX Codex +1 163установок cmux-test-bisect manaflow-ai Скилл cmux-test-bisect автоматически ищет, в каком коммите сломались тесты Swift-пакета на CI. Помогает, когда основная ветка красная, PR-тесты отфильтрованы или нужно узнать, какой PR развалил конкретный тест. CX Codex +1 635установок regression-hunt trailofbits Скилл regression-hunt для Claude Code, помогающий расследовать регрессии в PR и коммитах. Запускает кампании по поиску ошибок и возобновляет прерванную работу. CX Codex +1 685установок regression-triage davila7 Слэш-команда regression-triage разбирает регрессию: воспроизводит падающий тест, смотрит историю вокруг сломанного места и называет коммит, который всё сломал. CX Codex +1 25установок culprit noordeen123 culprit анализирует историю Git, чтобы найти коммиты, связанные с багом, и проверяет, не пропустил ли патч места использования изменённого символа. Проверка перед коммитом помогает увидеть незакрытые вызовы. CX Codex +1 ★ 6звёзд репо eval-harness affaan-m Скилл eval-harness для Claude Code, Codex, Cursor и других агентных платформ, реализующий eval-driven development: критерии успеха определяются до написания кода, результаты измеряются метриками pass@k и pass^k. CX Codex +1 6 500установок

Из того же набора24

Весь набор →
from-scratch Скилл from-scratch для Claude Code помогает понять принцип работы технологии через пошаговую сборку минимальной версии. Агент просит предсказать результат каждого шага, затем запускает код и сравнивает вывод с прогнозом. CX Codex +1 ★ 541звёзд репо video-script Скилл video-script для Claude Code пишет сценарии коротких разговорных видео, объяснений и демонстраций продукта. Включается по просьбе создать или исправить сценарий, хук либо ролик для YouTube, TikTok, Reels или LinkedIn. CX Codex +1 ★ 541звёзд репо repo-timelapse Скилл repo-timelapse для Claude Code превращает историю репозитория в видео, где карта файлов меняется вместе с кодом. Запускается по просьбе показать развитие проекта или анимировать коммиты. CX Codex +1 ★ 541звёзд репо skill-router Скилл skill-router для Claude Code выбирает навык под задачу или выстраивает цепочку из нескольких. Он включается, когда запрос расплывчатый или подходит под разные навыки. CX Codex +1 ★ 541звёзд репо scripted-screencast Скилл scripted-screencast для Claude Code превращает сценарий действий в браузере в запись демо продукта с курсором, масштабированием и подписями. Запускается по просьбе записать скринкаст или обновить ролик после изменений интерфейса. CX Codex +1 ★ 541звёзд репо security-threat-model Скилл security-threat-model для Claude Code строит модель угроз по коду приложения и проверяет найденные риски тестами. Запускается по запросу о безопасности, STRIDE или уязвимостях перед выпуском приложения. CX Codex +1 ★ 541звёзд репо vox-explainer Скилл vox-explainer для Claude Code собирает объясняющую графику или видео без ведущего в стиле Vox. Он включается по просьбе оформить озвучку как ролик, анимированные цитаты или статистику. CX Codex +1 ★ 541звёзд репо benchmark-honestly Скилл benchmark-honestly для Claude Code помогает проверять замеры производительности и сравнивать версии кода. Подключается на просьбы провести бенчмарк, нагрузочный тест или проверить заявление об ускорении. CX Codex +1 ★ 541звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой