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

deslop

它能做什么

让助手清理你分支中由 AI 工具编写的代码。适合希望代码与项目其他部分风格一致的开发者。

适用场景

  • ✓当 AI 工具在你的分支中留下了多余的注释或不必要的检查时。
  • ✓当你希望用提前返回来简化代码,而不是深层嵌套时。
  • ✓当你想删除仅用于掩盖类型问题的 any 类型转换时。

技能链接

https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/deslop/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请清理我分支中相对于 main 多出的 AI 生成内容,但保持行为不变。”

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

工作原理

助手会将你的分支与 main 进行比较,寻找多余注释、防御性检查和深层嵌套等杂乱内容。它会进行小而集中的编辑,使行为保持不变,然后给出简短的总结。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Remove AI code slop

Check the diff against main and remove AI-generated slop introduced in the branch.

Focus Areas

  • Extra comments that are unnecessary or inconsistent with local style
  • Defensive checks or try/catch blocks that are abnormal for trusted code paths
  • Casts to any used only to bypass type issues
  • Deeply nested code that should be simplified with early returns
  • Other patterns inconsistent with the file and surrounding codebase

Guardrails

  • Keep behavior unchanged unless fixing a clear bug.
  • Prefer minimal, focused edits over broad rewrites.
  • Keep the final summary concise (1-3 sentences).
常见问题

它会改变我代码的行为吗?

不会。除非是在修复明显的错误,否则它会保持行为不变。

它会重写整个文件吗?

不会。它更倾向于最小化、有针对性的编辑,而不是大范围重写。

总结有多长?

最终总结保持简短,大约一到三句话。

详情

作者的原始描述

Remove AI-generated code slop and clean up code style

repo: cursor/plugins

热度

GitHub 星标
15k
排名
#10933
许可证
—
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能