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.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- anti-slopSkill
- deslop-designSkill
- deslop-writingSkill
- small-slicesSkill
- verifySkill
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
- Distinctive: line 20
If the user or project has explicit style rules, follow those over this skill.
- Distinctive: line 48
Idioms: prefer the language's usual constructs (optional chaining, nullish coalescing, comprehensions) over verbose equivalents.
- Distinctive: line 50
Imports: remove unused imports; group and order per project convention if one exists.
- Distinctive: line 54
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:
- Distinctive: line 59
Keep behavior unchanged unless fixing a clear bug.
- Distinctive: line 60
Prefer minimal, focused edits over broad rewrites, and keep the final summary to 1-3 sentences.
- Distinctive: line 65
Prefer a single, coherent pass over many tiny edits.
- Distinctive: line 66
If the user asked for a specific file or selection, limit changes to that scope unless they ask to broaden it.
- Distinctive: line 74
Do: remove noise, keep intent, match project style, prefer idiomatic code.
- Distinctive: line 75
Don't: add new comments to replace removed ones, over-refactor working code, or ignore explicit project/style rules.
≈ “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.
Files
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.
userAuthenticationTokenHandlerwhereauthTokensuffices. - 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.
- Comments
- Remove comments that only repeat the code (e.g.
// Loop through itemsabove aforloop). - Remove or shorten generic docblocks that add no information.
- Keep comments that explain why, non-obvious contracts, or real gotchas.
- Remove comments that only repeat the code (e.g.
- Names
- Shorten verbose variables/functions to clear, idiomatic names.
- Use project naming conventions (camelCase vs snake_case, etc.).
- 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/.filtervs manual loops where idiomatic).
- Defensive code
- Remove try/catch that only rethrows or logs without adding value.
- Remove redundant null/undefined checks that can't occur in context.
- 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/unknownused 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.
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
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.

