deslop
从文件或差异中移除AI生成的代码杂物。在审查AI生成的代码以清理不必要的注释、防御性代码、类型hack和风格不一致时使用此技能。触发器包括"去杂物"、"移除杂物"、"清理AI代码"、"审查杂物"。
📖 中文导读:从文件或差异中移除AI生成的代码杂物。在审查AI生成的代码以清理不必要的注释、防御性代码、类型hack和风格不一致时使用此技能。触发器包括"去杂物"、"移除杂物"、"清理AI代码"、"审查杂物"。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: deslop description: Remove AI-generated code slop from files or diffs. Use this skill when reviewing AI-generated code to clean up unnecessary comments, defensive code, type hacks, and style inconsistencies. Triggers include "deslop", "remove slop", "clean up AI code", "review for slop". metadata: short-description: Remove AI code slop
Deslop
Remove AI-generated slop from code. Check the specified files or diff and remove:
- Extra comments that a human wouldn't add or are inconsistent with the rest of the file
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted/validated codepaths)
- Casts to
anyor# type: ignoreto get around type issues - Unnecessary complexity and nesting that reduces readability
- Redundant abstractions or over-engineered solutions
- Any other style that is inconsistent with the file
Principles
- Preserve functionality: Never change what the code does - only how it does it
- Prefer clarity over brevity: Explicit readable code is better than overly compact solutions
- Avoid over-simplification: Don't create overly clever solutions that are hard to understand or debug
- Focus scope: Only refine the specified files or recently modified code, unless instructed otherwise
Report at the end with only a 1-3 sentence summary of what you changed.