zero-tech-debt
它能做什么
这个技能要求你的 AI 围绕预期的最终设计重建代码更改,去除兼容性遗留和未使用的路径。适合希望得到干净结果、而不是在补丁上再打补丁的开发者。
适用场景
- ✓某项更改因为临时修复而变得混乱,你想要一个更干净版本的时候。
- ✓你想删除不再有用户的旧模式、开关或回退方案的时候。
- ✓你在重构某个功能,希望代码与其最终产品形态相符的时候。
技能链接
https://github.com/trycompai/crm/blob/release/.agents/skills/zero-tech-debt/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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
State the intended end state in one or two sentences.
Search for real callers before preserving compatibility. If a mode, prop, wrapper, route alias, or fallback has no current caller, delete it.
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.
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.
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
评论
- …
同一仓库的更多技能
ai-elements
12k帮你的智能体用现成的组件构建 AI 聊天界面,包括对话、消息、工具显示和提示输入框。
ai-sdk
12k帮你的智能体使用 Vercel AI SDK 构建 AI 功能,包括文本生成、流式输出、工具调用和智能体。
better-accessibility
12k帮你的智能体让界面可以通过键盘和屏幕阅读器使用,涵盖焦点、标签、ARIA 和表单。
better-auth-best-practices
12k帮你的智能体按照官方文档步骤,在 TypeScript 应用中设置 Better Auth,实现登录、会话、OAuth 和插件。