deslop
brianlovin/agent-config
Remove AI-generated code slop like unnecessary comments, defensive checks, and type casts from your branch.
What is deslop?
Analyzes your current branch against main and removes common AI-generated artifacts: excessive comments, over-defensive error handling, type-safety workarounds, and style inconsistencies. Use after writing code with AI assistance to clean up and align with your codebase conventions.
- Identifies and removes unnecessary comments that don't match file style
- Removes redundant defensive checks and try/catch blocks in trusted codepaths
- Eliminates type casts and workarounds that bypass type safety
- Detects and fixes style inconsistencies introduced by AI generation
- Compares current branch against main to isolate changes
- Provides a concise summary of all modifications made
How to install deslop
npx skills add https://github.com/brianlovin/agent-config --skill deslop- Git repository with a main branch
- Current working branch with uncommitted or committed changes
How to use deslop
- 1.Run the skill on your current branch
- 2.Review the summary of changes made
- 3.Verify the diff looks correct and aligns with your codebase style
- 4.Commit the cleaned-up code
Use cases
- Clean up code after using Claude or other AI to generate initial implementations
- Remove defensive patterns that don't fit your codebase's error-handling conventions
- Strip out verbose comments added by AI that clutter your code
- Standardize type handling after AI-assisted refactoring
- Prepare AI-generated code for code review by removing obvious artifacts
- Developers using AI code generation tools
- Teams with established code style and conventions
- Engineers who want to maintain consistent defensive programming practices
- Anyone reviewing or merging AI-assisted pull requests
deslop FAQ
Excessive comments, redundant error handling, type casts to bypass type checking, and style patterns inconsistent with the rest of your file.
No, it only analyzes and modifies your current branch by comparing it against main.
Yes, all changes are made to your working directory and can be reviewed with git diff before committing.
No prerequisites beyond having a git repository with a main branch.
Full instructions (SKILL.md)
Source of truth, from brianlovin/agent-config.
name: deslop description: Remove AI-generated code slop from the current branch. Use after writing code to clean up unnecessary comments, defensive checks, and inconsistent style.
Remove AI code slop
Check the diff against main, and remove all AI generated slop introduced in this branch.
This includes:
- Extra comments that a human wouldn't add or is 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 any to get around type issues
- Any other style that is inconsistent with the file
Report at the end with only a 1-3 sentence summary of what you changed
Related skills
More from brianlovin/agent-config and the wider catalog.

favicon
Generate a complete favicon set from a source image and update HTML automatically.

fix-sentry-issues
Discover and fix production issues by analyzing Sentry errors with root-cause investigation.

grill-me
Relentlessly interview plans and designs to stress-test assumptions and reach shared understanding.

knip
Find and remove unused files, dependencies, and exports from your codebase.

playwriter
Control the user's active Chrome tab via Playwriter CLI for UI inspection, scripted actions, and frontend debugging.

rams
Expert accessibility and visual design review for UI components against WCAG 2.1 standards.