deslop
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen to use this skill
何时使用该技能
Use when asked to:
- "remove AI slop"
- "clean up generated code style"
- "review branch diff for weird comments/defensive checks/casts"
当你被要求执行以下操作时使用:
- "清理AI冗余代码"
- "整理生成代码的风格"
- "审查分支差异,排查奇怪的注释、防御性检查或类型转换"
Workflow
工作流程
- Set comparison base (default ) and inspect
main.git diff <base>...HEAD - Build a candidate list using over added lines (comments, catches, casts, lint ignores, placeholders, debug leftovers).
rg - Review each candidate in full file context and compare with nearby local patterns.
- Remove only inconsistent slop; keep behavior and domain-valid guards.
- Re-run project checks (,
bun check) and fix regressions.bun typecheck - Report exact files changed and what slop was removed vs intentionally kept.
- 设置对比基准(默认分支),检查
main的内容。git diff <base>...HEAD - 使用工具扫描新增代码行,生成候选清理列表(包含注释、异常捕获、类型转换、忽略lint标记、占位符、调试遗留代码等)。
rg - 在完整文件上下文下审查每个候选项,并与附近的本地代码模式进行对比。
- 仅删除不一致的冗余代码;保留代码行为和领域相关的有效防护逻辑。
- 重新运行项目检查(、
bun check)并修复回归问题。bun typecheck - 报告具体修改的文件,以及哪些冗余代码被移除、哪些内容被有意保留。
Slop checklist
冗余代码检查清单
Read and apply:
references/slop-heuristics.md请阅读并遵循:
references/slop-heuristics.mdGuardrails
约束规则
- Do not remove protections at trust boundaries (user input, auth, network, db, file I/O).
- Do not replace real typing with weaker typing.
- Prefer minimal edits over broad rewrites.
- Keep project conventions (hooks/query style, component patterns, naming).
- 不得移除信任边界处的防护逻辑(如用户输入、认证、网络、数据库、文件I/O相关的防护)。
- 不得用更弱的类型替换真实的类型定义。
- 优先选择最小化修改,而非大范围重写。
- 遵循项目约定(如钩子/查询风格、组件模式、命名规范)。