跳到正文
Skillpedia
通用编程12k · #11529

zero-tech-debt

它能做什么

这个技能要求你的 AI 围绕预期的最终设计重建代码更改,去除兼容性遗留和未使用的路径。适合希望得到干净结果、而不是在补丁上再打补丁的开发者。

适用场景

  • ✓某项更改因为临时修复而变得混乱,你想要一个更干净版本的时候。
  • ✓你想删除不再有用户的旧模式、开关或回退方案的时候。
  • ✓你在重构某个功能,希望代码与其最终产品形态相符的时候。

技能链接

https://github.com/trycompai/crm/blob/release/.agents/skills/zero-tech-debt/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请重新设计这项更改,就像最终设计从一开始就存在一样,并删除旧版本中的任何遗留部分。”

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

工作原理

这个技能首先说明预期的最终状态,检查哪些旧路径仍有调用方,删除未使用的部分,然后测试新的行为。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Zero Tech Debt

Rework the change from the intended end state, not from the historical path that produced the current patch.

Steps

  1. State the intended end state in one or two sentences.

  2. Search for real callers before preserving compatibility. If a mode, prop, wrapper, route alias, or fallback has no current caller, delete it.

  3. Reshape around the final product surface. Prefer one clear component or flow over mode flags. Split only when it creates an obvious boundary such as state, layout, controls, or domain commands.

  4. Move shared rules to one place. Feature flags, permissions, route gating, URL state, and command naming should not be duplicated across pages or hidden in view components.

  5. Verify the intended flow. Test the new behavior and any deleted assumptions that affect navigation, permissions, or persisted state.

Rules

  • Optimize for the code that should exist, not the smallest diff from the old shape.
  • Delete dead compatibility paths instead of making them better.
  • Do not invent a generic framework for one feature.
  • Keep the refactor scoped to what makes the final shape coherent.
  • Prefer names that describe product intent over implementation history.
常见问题

AI 会删除仍在使用的代码吗?

这个技能要求先搜索真实的调用方,并且只删除当前没有调用方的部分。

它会为单个功能添加新框架吗?

不会。这个技能警告不要为单个功能构建通用框架。

它会让改动保持很小吗?

不会。这个技能说明应优化为应有的代码,而不是追求最小的差异。

详情

作者的原始描述

Rework a change as if the intended UX and architecture existed from day one, deleting compatibility cruft and accidental complexity.

repo: trycompai/crm

热度

GitHub 星标
12k
排名
#11529
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能