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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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
评论
- …
同一仓库的更多技能
advisor
15k如果你开启该功能,让你的智能体在关键节点咨询一个更强的第二模型,例如在重大决定之前,或在错误上卡住时。
check-agent-compatibility
15k全面检查 AI 编程智能体能否启动、验证和记录某个代码仓库,并返回一个兼容性评分以及主要问题。
cli-for-agents
15k教你的智能体设计或审查命令行工具,使 AI 智能体无需提示即可运行,并提供清晰的帮助文字和示例。
continual-learning
15k通过把回顾过往对话的工作交给专门的记忆更新程序,使你的 AGENTS.md 笔记保持最新。