principle-the-algorithm
它能做什么
为较大的改动提供一套五步方法:质疑需求、删除、优化、加速、自动化。适合希望设计更简单、推理更充分的工程师。
适用场景
- ✓当你准备设计一个比简单编辑更大的改动的时候。
- ✓当某项需求似乎增加了复杂度,而这种复杂度可能并非必要的时候。
- ✓当你希望在优化某个部分之前,先检查它能否被删除的时候。
技能链接
https://github.com/cursor/plugins/blob/main/dyl-stack/skills/principle-the-algorithm/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在我们设计这个功能之前,请质疑这些需求,并告诉我哪些可以删掉。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体先质疑需求,然后尽力删除部分或步骤,再优化剩下的内容,接着加速,最后才自动化。它的回复会说明质疑了什么,删除了什么。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
The Algorithm
Five steps, in order, for any change bigger than an edit you can see at a glance. The order is the principle. Each step is cheap only after the one before it, and the common failure is doing a late step on something an early step would have removed. Adapted from Elon Musk's five-step engineering process.
- Make the requirements less dumb. Assume the requirement is wrong and make it less wrong. It comes from a person, not a department. "The ticket", "the linter", "the reviewer", or "the old code did it" is a source, not a reason; find the person and their reasoning. If you do not agree with the reasoning, do not accept the requirement, however smart the person who gave it, the human included. No is a valid outcome.
- Delete the part or process step. Try hardest to delete the part, flag, layer, retry, or step entirely before touching step 3. Optimizing something that should not exist is the biggest mistake smart people make. If you never add anything back, you did not delete enough. Leaf: pstack
principle-subtract-before-you-add. - Optimize what survived. Third step, not first. Have one part do many things instead of a parallel copy per caller. Look hardest at boundaries between owners and layers, where a wrapper wraps a wrapper. Leaves: pstack
principle-laziness-protocol,principle-minimize-reader-load. - Accelerate. Be the part: walk one change through edit, build, check, and review yourself and note where you wait, crawl, or bounce. Tighten that. Leaf: pstack
principle-sequence-verifiable-units. - Automate last, or you automate something that should not exist. Volume alone does not justify it; precision and reviewability do. pstack
principle-build-the-leverstill applies. It runs on what survived.
Run it again. This is not a one-time gate. Rerun it on the result before you ship; the second pass deletes more.
The tell. A citation of this principle names the requirement you made less dumb, who owned it, and what you deleted. A citation with neither means you skipped it.
常见问题
为什么顺序很重要?
每一步只有在前一步完成之后才便宜,因此优化一个本不该存在的东西是在浪费精力。
智能体能否拒绝某项需求?
可以。如果某项需求背后的理由站不住脚,该技能认为“不”也是一个有效的结果。
这套方法来自哪里?
该技能称它改编自埃隆·马斯克的五步工程流程。
详情
作者的原始描述
Apply to any non-trivial change before designing it. Make the requirement less dumb, delete, optimize, accelerate, automate, in that order, then run it again on the result. The reply names the requirement you questioned and what you deleted.
repo: cursor/plugins
热度
- GitHub 星标
- 15k
- 排名
- #10949
- 许可证
- —
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
advisor
15k如果你开启该功能,让你的智能体在关键节点咨询一个更强的第二模型,例如在重大决定之前,或在错误上卡住时。
check-agent-compatibility
15k全面检查 AI 编程智能体能否启动、验证和记录某个代码仓库,并返回一个兼容性评分以及主要问题。
cli-for-agents
15k教你的智能体设计或审查命令行工具,使 AI 智能体无需提示即可运行,并提供清晰的帮助文字和示例。
continual-learning
15k通过把回顾过往对话的工作交给专门的记忆更新程序,使你的 AGENTS.md 笔记保持最新。