deslop
Skill0 starsChanged 4 months agoMITView on GitHub
Strip redundant comments, dead variables/imports, and defensive try/catches wrapping trivially safe operations. Triggered by "deslop", "clean this up", "remove dead code", "clean up AI-generated code", "remove noise", "tidy this", "remove unnecessary code", "clean the output", "simplify this", "remove boilerplate".
59 other projects use a version of this.
Adopted by
Most recently taken up by
- RichieHakim/agent_skillstheir own version, first seen Oct 5, 2026
- kontourai/stationtheir own version, first seen Oct 4, 2026
- kreid415/claude-science-skillstheir own version, first seen Oct 3, 2026
- dhanji4U/skillstheir own version, first seen Oct 2, 2026
- Rvey/agent-engineering-kittheir own version, first seen Oct 1, 2026
- compozy/compozytheir own version, first seen Oct 1, 2026
Used with
Projects with it also use verify-this, thermo-nuclear-code-quality-review and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnastasiyaWSkillverify-this
Prove a concrete behavior, performance, UI, CLI, API, or memory claim with fresh baseline-versus-treatment evidence and one explicit verdict. Use when asked to verify, prove, compare before and after, show evidence, or confirm that a fix works. Do not use for vague claims such as cleaner code, a full plan-based release verification, or a known bug that needs a red-to-green reproducer.
Also in 4 projects that use this
AnastasiyaWSkillthermo-nuclear-code-quality-review
Run an opt-in strict maintainability review for giant files, spaghetti growth, misplaced logic, weak boundaries, unnecessary abstractions, and missed structural simplifications. Use for a thermonuclear review, harsh code-quality audit, code-judo review, or a file approaching 1000 lines. Do not use as an automatic rewrite mandate or for cosmetic cleanup.
Also in 3 projects that use this
maxvaegaSkilldream
Self-improving memory loop — capture the user's preferences, corrections, and standing rules as project memories; periodically consolidate them (REM pass) and propose improvements to skills and CLAUDE.md. Modes - default, history, queued, rem, proposals, setup. Full loop on Claude Code; capture-only portable mode on Claude Cowork.
Also in 3 projects that use this
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 4 projects that use this
AWSSkillteach
Teach the user a new skill or concept, within this workspace.
Also in 5 projects that use this
nicodianskSkillbrainstorm
Use when starting creative work - creating features, building components, adding functionality, or modifying behavior. Explores requirements through Socratic dialogue before any implementation.
Also in 4 projects that use this
Other versions59 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 59
- rohitg00/pro-workflow★ 2.9ksame name
- compozy/compozy★ 2.8ksame name
- Jwuthri/Tracely-ai★ 1.5ksame name
- pedronauck/skills★ 633same name
- brianlovin/agent-config★ 375same name
- automagik-dev/genie★ 345same name
- ninehills/skills★ 280same name
- AnastasiyaW/codex-claude-code-config★ 153same name
- MrZoyo/deslop-GPT★ 136same name
- jjanczur/tyran★ 81same name
49 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- ci-cd-pipelineSkill
- requirements-synthesisSkill
- security-hardeningSkill
- spec-driven-developmentSkill
- workflow-from-chatsSkill
- architecture-decision-recordsSkill
- commit-history-auditSkill
- commit-messageSkill
- document-thisSkill
- env-drift-checkSkill
- handoffSkill
- minimal-diff-reviewSkill
- onboardingSkill
- pre-commit-checkSkill
- pr-review-canvasSkill
- pr-summarySkill
- release-readinessSkill
- requirements-qaSkill
- sync-docs-after-editSkill
- write-changelogSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 58 edited versions we read keep these.
12
Distinctive
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 9
Remove low-value noise from code: comments that narrate what the code already says, unused variables and imports, and try/catch blocks that …
- Distinctive: line 23
If the user points at a file or selection, scope to that.
- Distinctive: line 24
If no scope given, ask: "Which file or directory should I deslop?"
- Distinctive: line 25
Do not deslop the entire repo unsolicited.
- Distinctive: line 42
Keep comments that explain *why* (non-obvious intent, trade-offs, constraints, workarounds).
- Distinctive: line 64
Keep try/catches that: log the error, transform the exception type, implement real recovery, or wrap genuinely unsafe I/O.
- Distinctive: line 67
Remove blocks of code that have been commented out.
- Distinctive: line 72
Do not refactor logic, rename variables, or restructure code in a deslop pass.
- Distinctive: line 73
If something is ambiguous (e.g.
- Distinctive: line 94
Never remove the only comment explaining a non-obvious algorithm or business rule.
- Distinctive: line 95
Never remove imports/variables without confirming they're unused (use static analysis or grep first).
- Distinctive: line 96
Never change logic — if a cleanup requires a logic decision, stop and ask.
“Common” is measured: kept by at least 6 in 10 of the 58 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.
Files
🧹 Skill: deslop
Purpose
Remove low-value noise from code: comments that narrate what the code already says, unused variables and imports, and try/catch blocks that add no recovery logic. Makes the codebase easier to read and maintain.
Note: "deslop" is common terminology across the AI-coding ecosystem by 2026, and Cursor's own official cursor-team-kit plugin ships a skill with this same name. This version is scoped-by-default (asks which file/directory rather than sweeping the repo) and never touches logic — see Guardrails below for the exact boundary.
Trigger phrases
- "deslop"
- "clean this up"
- "remove dead code"
- "strip unnecessary comments"
- "remove unused imports"
Steps
1. Determine scope
- If the user points at a file or selection, scope to that.
- If no scope given, ask: "Which file or directory should I deslop?"
- Do not deslop the entire repo unsolicited.
2. Scan for slop categories
A. Narrating comments
Comments that restate what the code does with no additional insight:
# Bad — obvious from the code
i = i + 1 # Increment i
# Bad — restates the function name
def get_user(id):
# Get the user by ID
return db.query(User, id)Keep comments that explain why (non-obvious intent, trade-offs, constraints, workarounds).
B. Dead variables and imports
- Variables assigned but never read.
- Imports that are never referenced.
- Function parameters that are accepted but ignored (note: may be interface-required — flag, don't auto-delete).
C. Defensive try/catches with no recovery
# Slop — try/except that only re-raises or swallows silently
try:
x = int(value)
except:
pass # no recovery, no logging
# Also slop — wraps a trivially safe operation
try:
name = obj.name
except AttributeError:
name = None # could just use: name = getattr(obj, 'name', None)Keep try/catches that: log the error, transform the exception type, implement real recovery, or wrap genuinely unsafe I/O.
D. Commented-out code blocks
- Remove blocks of code that have been commented out.
- Exception: leave a comment if the block includes a TODO or a link to an issue explaining why it's disabled.
3. Apply changes
- Make minimal edits — only remove what's clearly slop.
- Do not refactor logic, rename variables, or restructure code in a deslop pass.
- If something is ambiguous (e.g. an import that might be used dynamically), leave it and note it.
4. Report
Deslopped: <filename>
Removed:
- <count> narrating comments
- <count> unused imports: <list>
- <count> dead variables: <list>
- <count> empty/pointless try/catches
Left in place (flagged for review):
- <item> — reasonOutput
Cleaned file(s) + a brief removal summary. No behaviour changes — only noise removal.
Guardrails
- Never remove the only comment explaining a non-obvious algorithm or business rule.
- Never remove imports/variables without confirming they're unused (use static analysis or grep first).
- Never change logic — if a cleanup requires a logic decision, stop and ask.
Gotchas
- Grep-based "unused import" detection is unreliable in dynamic languages — Python re-exports via
__all__, JS/TS barrel files, and reflection-based lookups can all reference a symbol without a matching identifier appearing in a text search. Prefer the project's actual linter output when one exists; treat a plain grep as advisory only. - A parameter that looks unused may be required by an interface, protocol, or callback signature the file doesn't show — check the call site or interface definition before flagging it as dead.
- A try/except that looks like a no-op recovery may exist specifically to suppress a known third-party library quirk — if the surrounding code or a comment hints at that, ask rather than strip it.
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.

