name: deslop description: Remove AI-generated code slop and clean up code style. Use when the user asks to deslop, clean up AI-generated code, remove unnecessary comments, simplify defensive patterns, or fix style inconsistencies introduced by AI.
Remove AI Code Slop
Check the diff against main and remove AI-generated slop introduced in the branch.
Workflow
- Run
git diff main...HEADto identify all changes on the branch. - For each changed file, read the surrounding code to understand local style.
- Remove slop patterns (see Focus Areas below).
- Verify behavior is unchanged after each edit.
- Summarize what was cleaned up (1-3 sentences).
Focus Areas
- Unnecessary comments: Remove comments that restate the code, explain obvious logic, or are inconsistent with the local commenting style.
- Defensive overkill: Remove try/catch blocks, null checks, or guard clauses that are abnormal for trusted internal code paths.
anycasts: Remove casts toany(or equivalent) used only to bypass type issues. Fix the actual type instead.- Deep nesting: Flatten deeply nested conditionals with early returns or guard clauses.
- Style drift: Fix patterns that are inconsistent with the file and surrounding codebase (naming, formatting, structure).
Guardrails
- Keep behavior unchanged unless fixing a clear bug.
- Prefer minimal, focused edits over broad rewrites.
- Do not introduce new abstractions or refactor beyond slop removal.
- When uncertain whether something is slop, leave it alone.