# prepare-regression

prepare-regression — a skill for Claude Code that pins source revisions and gathers commit or PR context for a regression investigation. It runs during investigation setup.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 670 installs · ★ 8341 repo stars
- Author: trailofbits
- License: CC-BY-SA-4.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/trailofbits/skills/tree/HEAD/plugins/regression-hunt/skills/prepare-regression/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/prepare-regression

## What it does

The skill records the change boundaries and gathers material for a regression investigation. It takes a PR plus a registry assignment, or a repository with a commit or range. For an open PR, it uses the merge base and frozen head; for a merged PR, the boundary depends on how it was merged. An unclear range or missing baseline blocks preparation.

It preserves PR titles and discussion, reviews, inline comments, or commit messages, with URLs and collection times. It runs `snapshot.py` through `uv run --no-project`, or uses Git commands for special source needs. Dependency, submodule, and LFS revisions are retained; builds use separate copies. The sealed package contains `prepare.json` and source artifacts. It requires `uv` and Git, along with a PR or a repository and commit range, plus a registry assignment.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prepare-regression -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/prepare-regression/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/prepare-regression/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prepare-regression -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/prepare-regression/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prepare-regression -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/prepare-regression/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install trailofbits/skills plugins/regression-hunt/skills/prepare-regression
```

2. **Manually: put the files in place**
- File: `.github/skills/prepare-regression/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prepare-regression -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/trailofbits/skills --path plugins/regression-hunt/skills/prepare-regression
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/prepare-regression/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prepare-regression -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/trailofbits/skills/tree/HEAD/plugins/regression-hunt/skills/prepare-regression/SKILL.md

## When to use it
- pin the full change boundary for a regression investigation
- collect PR discussion, reviews, and inline comments
- preserve source and dependency revisions for comparison
- record evidence and blockers in `prepare.json`

## Example prompts
- Prepare the evidence for a regression investigation from this PR and registry assignment.
- Gather regression context for this repository and commit range.
- Pin the source revisions and create the `prepare.json` package.

## Similar
- [om-prepare-test-env](https://affpapa.org/en/nevibecode/skills/om-prepare-test-env.md) — skill · 3900 installs
- [ai-regression-testing](https://affpapa.org/en/nevibecode/skills/ai-regression-testing.md) — skill · 6400 installs
- [visual-regression-testing](https://affpapa.org/en/nevibecode/skills/visual-regression-testing.md) — skill · 741 installs
- [prepare-release](https://affpapa.org/en/nevibecode/commands/qdhenry-prepare-release.md) — command · ★ 1357 repo stars
- [regression-suite](https://affpapa.org/en/nevibecode/skills/regression-suite.md) — skill · 641 installs
- [visual-regression-tester](https://affpapa.org/en/nevibecode/skills/visual-regression-tester.md) — skill · 351 installs

From the same set: [trailofbits/skills](https://affpapa.org/en/nevibecode/by/trailofbits/skills.md) — 95 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
