agentleFS
AnastasiyaWAnastasiyaW/codex-claude-code-config/skills/development/deslop/SKILL.md

deslop

Skill213 starsChanged 3 days agoMITView on GitHub

Remove AI-generated code noise from the current diff while preserving behavior. Use for deslop, AI slop cleanup, unnecessary comments, defensive checks, any casts, or needless nesting after an agent-generated change. Do not use as permission for a broad rewrite or when a real bug has not been isolated.

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 106 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Remove only confirmed noise in a focused edit.

    line 27
  2. Distinctive:

    Run the narrow relevant checks and inspect the final diff.

    line 28
  3. Very specific:

    If the structure needs a real redesign, stop deslop and use refactoring-safely, architecture-quality, or thermo-nuclear-code-quality-review.

    line 29
  4. Distinctive:

    Do not delete comments that explain a non-obvious invariant, security boundary, ABI constraint, workaround with an owner, or externally …

    line 33

“Common” is measured: kept by at least 6 in 10 of the 106 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deslop

Review only the branch diff against its intended base and remove noise that does not belong in the local code style. Keep the behavior and public contract unchanged unless a clear, separately verified bug is fixed.

Review Targets

  • comments that narrate obvious code or contradict local conventions;
  • defensive checks or catch blocks abnormal for a trusted path;
  • any, unsafe casts, or optionality used only to silence a type checker;
  • deep nesting that can be made clearer with early returns or a named helper;
  • one-off wrappers, flags, and branches inconsistent with the surrounding module;
  • C++ ownership or error-handling scaffolding that is redundant with the established RAII/contract boundary.

Workflow

  1. Inspect the base, diff, local style, tests, and ownership boundaries.
  2. Classify each candidate as noise, a clear bug, or an intentional contract.
  3. Remove only confirmed noise in a focused edit.
  4. Run the narrow relevant checks and inspect the final diff.
  5. If the structure needs a real redesign, stop deslop and use refactoring-safely, architecture-quality, or thermo-nuclear-code-quality-review.

Do not delete comments that explain a non-obvious invariant, security boundary, ABI constraint, workaround with an owner, or externally required behavior.

Gotchas

  • Shorter code is not automatically clearer; preserve names and boundaries that carry domain meaning.
  • A broad formatter run can hide behavior changes and is not deslop proof.
  • Removing a defensive check without proving the trusted-path invariant can turn cleanup into a regression.
  • In C++, exception and ownership code may look repetitive while protecting an ABI or lifetime boundary; inspect callers before removing it.

Troubleshooting

SymptomLikely causeAction
Cleanup changes a test resultCandidate was behavior, not noiseRevert that candidate and isolate the real contract
Diff is too broadTool ran over the whole treeRestrict review to the branch diff and restore unrelated files
Comment seems redundant but explains a constraintContext is outside the fileRead the owning docs/tests before changing it
Code remains structurally tangledDeslop is the wrong scopeEscalate to a planned refactor with characterization tests

Source

Adapted from Cursor Team Kit's MIT-licensed deslop workflow: https://github.com/cursor/plugins/tree/main/cursor-team-kit/skills/deslop

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.