agentleFS
the-hooman-loopthe-hooman-loop/anti-slop-kit/skills/deslop-code/SKILL.md

deslop-code

Skill4 starsChanged 3 months agoMITView on GitHub

Removes AI-generated code slop (redundant comments, over-engineering, verbose names, boilerplate, dead defensive code) and normalizes style. Use when the user asks to clean up code, remove AI slop, de-slop, fix code style, refactor for readability, or make code more idiomatic.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user or project has explicit style rules, follow those over this skill.

    line 20
  2. Distinctive:

    Idioms: prefer the language's usual constructs (optional chaining, nullish coalescing, comprehensions) over verbose equivalents.

    line 48
  3. Distinctive:

    Imports: remove unused imports; group and order per project convention if one exists.

    line 50
  4. Distinctive:

    When the request is to clean up a branch or a pull request (rather than a file or selection), scope the pass to what the branch introduced:

    line 54
  5. Distinctive:

    Keep behavior unchanged unless fixing a clear bug.

    line 59
  6. Distinctive:

    Prefer minimal, focused edits over broad rewrites, and keep the final summary to 1-3 sentences.

    line 60
  7. Distinctive:

    Prefer a single, coherent pass over many tiny edits.

    line 65
  8. Distinctive:

    If the user asked for a specific file or selection, limit changes to that scope unless they ask to broaden it.

    line 66
  9. Distinctive:

    Do: remove noise, keep intent, match project style, prefer idiomatic code.

    line 74
  10. Distinctive:

    Don't: add new comments to replace removed ones, over-refactor working code, or ignore explicit project/style rules.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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 code

What counts as AI slop

  • Redundant or obvious comments — comments that restate what the code does line-by-line.
  • Overly verbose names — e.g. userAuthenticationTokenHandler where authToken suffices.
  • Unnecessary abstractions — wrappers, helpers, or interfaces used only once.
  • Excessive defensive code — try/catch or null checks that add no real safety.
  • Generic filler phrases — "Here we…", "This function is responsible for…", "Note that…".
  • Over-modularization — tiny one-use functions that hurt readability.
  • Boilerplate that doesn't help — empty docblocks, type annotations that duplicate obvious types.
  • Inconsistent style — mixed quote styles, spacing, or naming in the same file.

Respect project style (.editorconfig, ESLint, Prettier, existing patterns). If the user or project has explicit style rules, follow those over this skill.

Removal checklist

Apply in order; re-scan after edits.

  1. Comments
    • Remove comments that only repeat the code (e.g. // Loop through items above a for loop).
    • Remove or shorten generic docblocks that add no information.
    • Keep comments that explain why, non-obvious contracts, or real gotchas.
  2. Names
    • Shorten verbose variables/functions to clear, idiomatic names.
    • Use project naming conventions (camelCase vs snake_case, etc.).
  3. Structure
    • Inline one-off helpers used in a single place if it improves readability.
    • Remove unused parameters, imports, and dead code.
    • Prefer language idioms over step-by-step code (.map/.filter vs manual loops where idiomatic).
  4. Defensive code
    • Remove try/catch that only rethrows or logs without adding value.
    • Remove redundant null/undefined checks that can't occur in context.
  5. Style
    • One consistent quote style per file.
    • Consistent spacing and line length (match project or 80/100/120).
    • No trailing whitespace or unnecessary blank lines.

Style cleanup rules

  • Formatting: match existing file style. If the project has a formatter (Prettier, Black, etc.), assume it will run; focus on structural and naming cleanup.
  • Idioms: prefer the language's usual constructs (optional chaining, nullish coalescing, comprehensions) over verbose equivalents.
  • Nesting: reduce nesting (early returns, guard clauses) only when it clearly improves readability — do not refactor for its own sake.
  • Imports: remove unused imports; group and order per project convention if one exists.

Branch-diff mode

When the request is to clean up a branch or a pull request (rather than a file or selection), scope the pass to what the branch introduced:

  • Diff against the base branch (usually main) and only touch changed lines and their immediate context.
  • Focus areas: extra comments inconsistent with local style, defensive checks or try/catch abnormal for trusted paths, casts to any/unknown used only to bypass type errors, deeply nested code that should use early returns.
  • Keep behavior unchanged unless fixing a clear bug.
  • Prefer minimal, focused edits over broad rewrites, and keep the final summary to 1-3 sentences.

Output

  • Apply edits directly to the code; do not only suggest.
  • Prefer a single, coherent pass over many tiny edits.
  • If the user asked for a specific file or selection, limit changes to that scope unless they ask to broaden it.

Examples

See examples.md for before/after snippets.

Summary

Do: remove noise, keep intent, match project style, prefer idiomatic code. Don't: add new comments to replace removed ones, over-refactor working code, or ignore explicit project/style rules.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.