Generated banner for Prepare Regression
Generated logo for Prepare Regression

Prepare Regression

Trail of BitsOfficialPublished by Trail of Bits

  • Skill
  • Workflow
  • Software development
  • CC-BY-SA-4.0
  • No issues found

From the author

Use when pinning before/after sources and collecting PR or commit context for a regression investigation.
— the description by Trail of Bits

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The prepare-regression skill provides a standardized procedure for isolating and documenting the before and after states of a code change. It ensures that regression investigations are based on precise commit boundaries, PR context, and frozen source artifacts, facilitating consistent analysis and evidence collection.

What it does

  • Defines precise S0 and S1 commit boundaries for regression analysis.
  • Collects and freezes PR metadata, including titles, discussions, and review comments.
  • Captures repository state including dependencies, submodules, and LFS revisions.
  • Generates a sealed prepare.json file containing the investigation context.
  • Identifies and reports blockers related to ambiguous commit ranges or missing baselines.

When to use it

  • When starting an investigation into a software regression.
  • When you need to establish a clear baseline and target state for a code change.
  • When you need to collect comprehensive PR or commit context for audit purposes.

Advantages

  • Ensures consistency in how regression boundaries are defined.
  • Prevents ambiguity by requiring explicit baseline and target commit identification.
  • Creates a verifiable record of the investigation's starting conditions.
  • Standardizes the collection of PR-related metadata and discussion history.

Usage examples

“Prepare a regression investigation for PR #1234.”
The agent will identify the correct commit range, collect the PR discussion and metadata, and produce a sealed prepare.json file.
“I need to investigate a regression between commit A and commit B.”
The agent will validate the commit range, capture the source states, and generate the necessary evidence package.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/trailofbits/prepare-regression/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip prepare-regression.zip -d .agents/skills

Documentation by Trail of Bits

Prepare a change

When to Use

Input: PR URL or repository plus commit/range, and registry assignment. Follow project guidance after resolving the target commit.

When NOT to Use

The same inputs have a verified preparation record; reuse it.

Prepare

  1. Read the standard and file contract. Pin the complete change as S0/S1: commit parent or explicit range baseline; merge base to frozen head for unmerged PRs; merge first parent to merge commit, squash parent to squash, or the complete rebased series for merged PRs. Ambiguous ranges and missing root baselines block preparation.

  2. Freeze commit titles/messages or PR title, body, discussion, reviews and inline comments with URLs and collection time. Paginate APIs; record limits and lifecycle. Locate security/threat-model documents in both states; record paths or search limitations.

  3. Run snapshot.py via uv run --no-project with repository, S0, S1 and a new directory, or equivalent Git commands for special source needs. Preserve dependency/submodule/LFS revisions. Exclude later history; keep exports pristine and build in separate copies.

  4. Write and seal prepare.json with boundary explanations, frozen context and source artifacts. If blocked, preserve collected evidence and name the prerequisite.

Report Back

Keep detailed evidence in the sealed package. Return only:

  • Status: complete or blocked, matching the record.

  • Record: sealed prepare.json path, or why none was produced.

  • Result: selected S0/S1 and material collection limitations.

  • Blocker: missing prerequisite or required caller action, if blocked.

Rationalizations to Reject

  • “The PR is merged”: that does not identify the complete change boundary.

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Trail of Bits
Publisher
Trail of Bits (Official)
Source
trailofbits/skills · plugins/regression-hunt/skills/prepare-regression · commit e4dd0bb
Licence
Creative Commons Attribution-ShareAlike 4.0 International (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Trail of Bits.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download prepare-regression.zip