跳到正文
Skillpedia
安全8.0k · #12697

prepare-regression

它能做什么

该技能让智能体冻结拉取请求或提交范围的旧版本和新版本,以及其标题、提交信息和审查评论。适用于开始回归调查的人。

适用场景

  • ✓你准备调查某个拉取请求,并希望先获得固定的改动前后副本的时候。
  • ✓你有一个起点不清楚的提交范围,需要先将其固定的时候。
  • ✓你希望将某项改动的讨论和安全说明连同日期和链接一起保存的时候。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/trailofbits/skills/blob/main/plugins/regression-hunt/skills/prepare-regression/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我需要这个拉取请求改动前后的代码固定副本,连同它的评论,以便进行调查。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体确定改动确切的起点和终点,为每一端复制源代码,并带时间戳保存讨论内容。它会封存这些记录,使之后的步骤使用相同的材料。

技术内容(原始 SKILL.md)

作者在 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.
常见问题

为什么智能体需要固定的快照?

这样之后的检查每次都比较相同的代码,即使审查开始后分支发生了变化。

它需要与代码托管平台保持实时连接吗?

它需要访问代码仓库或拉取请求来收集代码和评论。它遇到的限制也会与结果一起保存记录。

如果提交范围不明确怎么办?

该技能会停止,不做任何准备,以便你先修正该范围。

详情

作者的原始描述

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

repo: trailofbits/skills

热度

GitHub 星标
8.0k
排名
#12697
许可证
CC-BY-SA-4.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能