360 Secure SkillHub
360 安全技能中心

Deslop

核心功能:通过对比分支差异,识别并清理AI生成的冗余代码(如冗余注释、防御检查等),严格保留业务逻辑与本地规范。典型场景:清理AI生成代码风格、移除冗余防御代码、审查分支冗余内容时使用。经分支对比、冗余识别、验证修复、合规检查后,输出修改文件清单及清理详情。

brennerspear
brennerspear
热度 88.08
最近更新 2026-05-11 17:27:12
分类:开发依赖:代码执行应用场景:代码审查 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add deslop
Metadata
name
deslop
description
Remove AI-style code slop from a branch by reviewing diffs, deleting inconsistent defensive noise, and preserving behavior and local style.
allowed-tools
["Bash"]

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"

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.

Slop checklist

Read and apply: 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).