跳到正文
Skillpedia
通用编程15k · #10988

principle-sequence-verifiable-units

它能做什么

为智能体提供一条安全地完成大批量改动的规则。适合执行迁移、批量清理或许多相似编辑的开发者。

适用场景

  • ✓当你有一次多步骤的迁移、批量清理或一系列相似编辑的时候。
  • ✓当你希望在导致破坏的那一步就发现问题的时候。
  • ✓当你要为审阅者堆叠提交或拉取请求,供其跟随查看的时候。

技能链接

https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/principle-sequence-verifiable-units/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“我们要在整个代码库中重命名一个函数。请分成小步骤、逐步检查,并整理提交,让审阅者能够跟上。”

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

工作原理

智能体会在开始下一步之前验证每项改动,使破坏在引起它的那一步被发现。它会安排提交顺序,让整个过程自己证明自己,例如先提交一个失败的测试,再在其上提交修复。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Sequence work into verifiable units

Order work as a sequence of small units, each ending in a state you can check, and don't advance until the current one is green.

Why: A break caught at the unit that caused it is cheap to localize. A break caught after a batch is buried, and you have already built further on a broken base. Sequencing those same units into a delivery a reviewer can replay turns "trust me" into "watch it go red, then green."

Execution. In a sweep, migration, or any run of similar edits, verify each change before starting the next. Each unit is a before/after bracket: known-good state, one change, run the check, then proceed. Rebase onto clean trunk first so every check measures against the real baseline. When a lever does the edits, the per-unit check is nearly free. Run it anyway.

Delivery. Stack commits and PRs in the order that proves the work. The canonical shape is the failing test first, then the fix on top. Other story orders are a subtraction before the reshape, a baseline capture before the treatment, the scaffold before the feature. Each commit lands on its own and the sequence reads as an argument.

The sequencing complement to the prove-it-works principle skill, which keeps each check real, and the build-the-lever principle skill, which makes the per-unit check cheap.

常见问题

为什么每一步之后都要检查?

在其所属的步骤中发现的破坏很容易定位,而在一批改动之后才发现的破坏,会被后续的工作掩盖。

通常的提交顺序是什么?

先提交一个失败的测试,再在其上提交修复,使提交序列读起来像一个论证。

脚本能让这更容易吗?

能。当脚本完成编辑时,每步的检查几乎没有成本,但仍然应该运行。

详情

作者的原始描述

Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs. Break work into small units that each end in a verifiable state, check each before the next, and order delivery so the sequence proves itself to a reviewer.

repo: cursor/plugins

热度

GitHub 星标
15k
排名
#10988
许可证
—
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能