mcpField
P
prepare-regression

prepare-regression

github.com/trailofbitsTesting & quality7.9k164 installsUpdated today
Repository

About prepare-regression

A change-preparation skill that pins a complete software-change range and collects its review and security context. It is for regression investigations that need a sealed, reproducible baseline before analysis.

Key features

  1. 01Select and pin the S0/S1 change boundary
  2. 02Freeze change discussion and review context
  3. 03Locate security documents in both states
  4. 04Preserve source artifacts and revisions
  5. 05Seal preparation evidence and limitations

Use cases

  1. 01Prepare a PR for regression review
  2. 02Resolve the full range of a merged change
  3. 03Record missing prerequisites or collection limits

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/trailofbits/skills --skill prepare-regression

After installing, type/prepare-regressionin Claude Code to confirm it loaded.

Details

From the project README

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.

Comments

Markdown supported