deslop
Remove AI-generated code slop from files or diffs. Use this skill when reviewing AI-generated code to clean up unnecessary comments, defensive code, type hacks, and style inconsistencies. Triggers include "deslop", "remove slop", "clean up AI code", "review for slop".
When & Why to Use This Skill
The 'deslop' skill is a specialized developer tool designed to refine AI-generated code by removing 'slop'—unnecessary comments, redundant defensive checks, and inconsistent styling. It enhances code maintainability and readability by stripping away the over-engineered abstractions and type hacks often produced by LLMs, ensuring the final output aligns with human-centric coding standards and project-specific style guides.
Use Cases
- Refining AI-Generated Snippets: Automatically clean up boilerplate, excessive comments, and defensive try-catch blocks from code generated by LLMs to make it production-ready.
- Pre-Merge Code Review: Use during the pull request process to identify and remove AI-specific artifacts like 'any' casts or type ignores that bypass safety checks.
- Standardizing Codebase Style: Aligning AI-contributed code with existing project conventions by removing inconsistent formatting and redundant abstractions.
- Technical Debt Reduction: Periodically scanning files for 'AI slop' to simplify nesting and improve long-term code clarity without changing core functionality.
| name | deslop |
|---|---|
| description | Remove AI-generated code slop from files or diffs. Use this skill when reviewing AI-generated code to clean up unnecessary comments, defensive code, type hacks, and style inconsistencies. Triggers include "deslop", "remove slop", "clean up AI code", "review for slop". |
| short-description | Remove AI code slop |
Deslop
Remove AI-generated slop from code. Check the specified files or diff and 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
anyor# type: ignoreto get around type issues - Unnecessary complexity and nesting that reduces readability
- Redundant abstractions or over-engineered solutions
- Any other style that is inconsistent with the file
Principles
- Preserve functionality: Never change what the code does - only how it does it
- Prefer clarity over brevity: Explicit readable code is better than overly compact solutions
- Avoid over-simplification: Don't create overly clever solutions that are hard to understand or debug
- Focus scope: Only refine the specified files or recently modified code, unless instructed otherwise
Report at the end with only a 1-3 sentence summary of what you changed.