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

principle-the-algorithm

它能做什么

为较大的改动提供一套五步方法:质疑需求、删除、优化、加速、自动化。适合希望设计更简单、推理更充分的工程师。

适用场景

  • ✓当你准备设计一个比简单编辑更大的改动的时候。
  • ✓当某项需求似乎增加了复杂度,而这种复杂度可能并非必要的时候。
  • ✓当你希望在优化某个部分之前,先检查它能否被删除的时候。

技能链接

https://github.com/cursor/plugins/blob/main/dyl-stack/skills/principle-the-algorithm/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Automate last, or you automate something that should not exist. Volume alone does not justify it; precision and reviewability do. pstack principle-build-the-lever still 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能