deslop

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When 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

工作流程

  1. Set comparison base (default
    main
    ) and inspect
    git diff <base>...HEAD
    .
  2. Build a candidate list using
    rg
    over added lines (comments, catches, casts, lint ignores, placeholders, debug leftovers).
  3. Review each candidate in full file context and compare with nearby local patterns.
  4. Remove only inconsistent slop; keep behavior and domain-valid guards.
  5. Re-run project checks (
    bun check
    ,
    bun typecheck
    ) and fix regressions.
  6. Report exact files changed and what slop was removed vs intentionally kept.
  1. 设置对比基准(默认
    main
    分支),检查
    git diff <base>...HEAD
    的内容。
  2. 使用
    rg
    工具扫描新增代码行,生成候选清理列表(包含注释、异常捕获、类型转换、忽略lint标记、占位符、调试遗留代码等)。
  3. 在完整文件上下文下审查每个候选项,并与附近的本地代码模式进行对比。
  4. 仅删除不一致的冗余代码;保留代码行为和领域相关的有效防护逻辑。
  5. 重新运行项目检查(
    bun check
    bun typecheck
    )并修复回归问题。
  6. 报告具体修改的文件,以及哪些冗余代码被移除、哪些内容被有意保留。

Slop checklist

冗余代码检查清单

Read and apply:
references/slop-heuristics.md
请阅读并遵循:
references/slop-heuristics.md

Guardrails

约束规则

  • 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相关的防护)。
  • 不得用更弱的类型替换真实的类型定义。
  • 优先选择最小化修改,而非大范围重写。
  • 遵循项目约定(如钩子/查询风格、组件模式、命名规范)。