deslop
Remove AI-generated code slop from a branch. Use when cleaning up AI-generated code, removing unnecessary comments, defensive checks, or type casts. Checks diff against main and fixes style inconsistencies.
When & Why to Use This Skill
The 'deslop' skill is a specialized developer tool designed to refine and sanitize AI-generated code. It automates the process of identifying and removing 'AI slop'—such as redundant comments, excessive defensive programming, and inconsistent styling—by analyzing git diffs against the main branch. This ensures that AI-assisted contributions remain high-quality, maintainable, and indistinguishable from professional human-written code.
Use Cases
- Post-AI Generation Cleanup: Automatically strip away verbose, non-human-like comments and redundant try-catch blocks often produced by LLMs before submitting code for review.
- Codebase Standardization: Ensure style consistency across a branch by automatically moving inline Python imports to the top of the file and removing unnecessary type casts like 'any'.
- Pull Request Optimization: Use the tool to perform a first-pass review of changes against the main branch, identifying and fixing 'defensive slop' that complicates the logic unnecessarily.
- Technical Debt Prevention: Proactively remove 'lazy' AI patterns and defensive checks in trusted codepaths to keep the execution flow clean and efficient.
| name | deslop |
|---|---|
| description | Remove AI-generated code slop from a branch. Use when cleaning up AI-generated code, removing unnecessary comments, defensive checks, or type casts. Checks diff against main and fixes style inconsistencies. |
Remove AI Code Slop
Check the diff against main and remove all AI-generated slop introduced in this branch.
What to Remove
- Extra comments that a human wouldn't add or are inconsistent with the rest of the file
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted/validated codepaths)
- Casts to
anyto get around type issues - Inline imports in Python (move to top of file with other imports)
- Any other style that is inconsistent with the file
Process
- Get the diff against main:
git diff main...HEAD - Review each changed file for slop patterns
- Remove identified slop while preserving legitimate changes
- Report a 1-3 sentence summary of what was changed