Skip to main content
Agent skill

Bisect Regression

Quickly find which commit introduced a test262 regression using git bisect with automated test.

Get started

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use Bisect Regression when an AI agent needs a reusable SKILL.md workflow for this job: Quickly find which commit introduced a test262 regression using git bisect with automated test.

When not to use it

Skip Bisect Regression when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
Claude Code folder setup
mkdir -p ~/.claude/skills/bisect-regression
# Save SKILL.md to ~/.claude/skills/bisect-regression/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/bisect-regression/SKILL.md. For a shared project, commit the folder at .claude/skills/bisect-regression/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Bisect Regression skill for this task: Use Bisect Regression when this documented workflow matches the task. Confirm any required inputs or files before making changes.

What supports this recommendation?

71/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
75/100
Practical detail
74/100
Source evidence
58/100
Source signals
72/100
Model compatibility evidence
  • claudeinferred

    The skill text mentions Claude or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# Bisect Regression

Find which commit introduced a regression using `git bisect` with an automated test script.

## Prerequisites

- Two archived test262 JSONL files: one "good" (higher pass count) and one "bad" (current/lower) - Or: a known good commit hash and the current HEAD

## Step 1: Identify the regression

```bash # Compare current vs archived results python3 -c " import json, os

current = {} with open('benchmarks/results/test262-results.jsonl') as f: for line in f: r = json.loads(line) current[r['file']] = r['status']

# Find archived files archives = sorted([f for f in os.listdir('benchmarks/results') if f.startswith('test262-results-') and f.endswith('.jsonl')]) print('Available archives:', archives)

# Compare with most recent archive if archives: prev = {} with open(f'benchmarks/results/{archives[-1]}') as f: for line in f: r = json.loads(line) prev[r['file']] = r['status']

regressions = [t for t in prev if prev[t] == 'pass' and current.get(t) != 'pass'] fixes = [t for t in current if current[t] == 'pass' and prev.get(t) != 'pass'] print(f'Regressions: {len(regressions)}, Fixes: {len(fixes)}')

# Pick a sample regression test for bisecting if regressions: print(f'Sample test for bisect: {regressions[0]}') " ```

## Step 2: Run git bisect with vitest filter

```bash GOOD="<commit-hash-where-test-passed>" # e.g., the baseline commit BAD="HEAD"

git bisect start git bisect bad $BAD git bisect good $GOOD

# vitest exits 0 on pass, 1 on fail — perfect for bisect git bisect run npx vitest run tests/test262-vitest.test.ts -t "<test-name-pattern>" ```

Example with a specific test file: ```bash git bisect run npx vitest run tests/test262-vitest.test.ts -t "S7.9.2_A1_T6" ```

This binary-searches through commits (~7 steps for 90 commits) and reports the first bad commit.

## Step 3: Analyze the result

```bash # git bisect will print: "<hash> is the first bad commit" git show <hash> --stat git show <hash> ```

## Step 4: Clean up

```bash git bisect reset ```

## For multiple regression patterns

If different tests regressed from different commits, bisect each pattern separately:

```bash # Pattern 1: SyntaxError regressions git bisect start && git bisect bad HEAD && git bisect good $GOOD git bisect run npx vitest run tests/test262-vitest.test.ts -t "S7.9.2_A1_T6" git bisect reset

# Pattern 2: null deref regressions git bisect start && git bisect bad HEAD && git bisect good $GOOD git bisect run npx vitest run tests/test262-vitest.test.ts -t "RegExp-decimal-escape" git bisect reset ```

## Tips

- Use `git bisect skip` if a commit doesn't compile at all - For large regressions (1000+ tests), pick 1 representative per pattern - Each bisect takes O(log n) steps × test time — keep the test fast - After finding the bad commit, verify with `git show` and check which files changed

Intended uses

  • Use Bisect Regression when this documented workflow matches the task.

Implementation notes

  • Use git bisect skip if a commit doesn't compile at all
  • For large regressions (1000+ tests), pick 1 representative per pattern
  • Each bisect takes O(log n) steps × test time — keep the test fast
  • After finding the bad commit, verify with git show and check which files changed

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.