Skip to content
Skillpedia
Security8.0k · #12697

prepare-regression

What it does

This skill has the agent freeze the old and new versions of a pull request or commit range, along with its titles, messages, and review comments. It is for people starting a regression investigation.

When to use it

  • ✓When you are about to investigate a pull request and want fixed before and after copies first.
  • ✓When you have a commit range with an unclear starting point and need to pin it.
  • ✓When you want the discussion and security notes of a change saved with dates and links.

Skill link

https://github.com/trailofbits/skills/blob/main/plugins/regression-hunt/skills/prepare-regression/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/regression-hunt/skills/prepare-regression/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“I need a fixed copy of this pull request's code before and after the change, with its comments, so I can investigate it.”

5 new skills a week. 1 minute to read.

How it works

The agent works out the exact starting and ending points of the change, copies the source code for each, and saves the discussion with timestamps. It seals these records so later steps use the same material.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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.
FAQ

Why does the agent need a fixed snapshot?

So that later checks compare the same code each time, even if the branch changes after the review starts.

Does it need a live connection to the code host?

It needs access to the repository or pull request to collect the code and comments. Records of the limits it hit are saved with the results.

What happens if the commit range is ambiguous?

The skill stops and does not prepare anything, so you can fix the range first.

Details

Original description by the author

Use when pinning before/after sources and collecting PR or commit context for a regression investigation.

repo: trailofbits/skills

Popularity

GitHub stars
8.0k
Ranking position
#12697
License
CC-BY-SA-4.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills