| name | deslop |
| description | Remove AI code slop before committing. Review AI-generated code for unnecessary verbosity, redundant comments, over-engineering, and low-signal patterns that degrade codebase quality over time.
|
| triggers | ["deslop","clean up the code","remove AI slop","before I commit","is this over-engineered?","remove unnecessary comments","after any large AI-generated code block"] |
| references | ["CLAUDE.md"] |
Skill: deslop
When to Use
Run this skill before every commit on AI-generated code. AI tends to:
- Add excessive comments explaining obvious things
- Create unnecessary abstractions "for future extensibility"
- Write verbose variable names that add noise
- Add defensive checks for impossible scenarios
- Generate boilerplate that wasn't asked for
This skill catches and removes that slop before it becomes technical debt.
What "Slop" Looks Like
Category 1 — Obvious Comments
counter += 1
def get_name(self):
"""Returns the name."""
return self.name
if response.status == 429:
await asyncio.sleep(1)
response = await client.post(...)
Category 2 — Phantom Abstractions
def _build_auth_header(token: str) -> dict:
return {"Authorization": f"Bearer {token}"}
headers = _build_auth_header(api_key)
headers = {"Authorization": f"Bearer {api_key}"}
Category 3 — Defensive Checks for Impossible Cases
if model is None:
model = "default"
if not items:
return []
Category 4 — Speculative Generality
class BaseRouter(ABC):
@abstractmethod
def route(self): ...
class ModelRouter(BaseRouter):
def route(self): ...
class ModelRouter:
def route(self): ...
Category 5 — Verbose Variable Names
current_request_model_name_string = request.model
model = request.model
Category 6 — Unasked-For Boilerplate
async def get_health():
log.debug("Starting health check")
try:
result = await check_ollama()
log.debug("Health check completed successfully")
return result
except Exception as e:
log.error(f"Health check failed: {e}")
raise
async def get_health():
return await check_ollama()
Instructions
Step 1 — Read the diff
git diff --staged
git diff HEAD
Step 2 — Apply the deslop checklist
For each changed file, check:
Step 3 — Apply fixes
For each slop item found:
- Remove it entirely (comments, phantom helpers, unnecessary checks)
- Inline it (one-use helpers)
- Simplify it (verbose names, over-abstracted interfaces)
Do not refactor beyond removing slop. The goal is cleaner, not different.
Step 4 — Verify nothing broke
pytest -x
The One Rule
If the code would be clearer without it, delete it.
Acceptance Checks