Remove AI-generated code slop

VerifiedSafe

Inspects the diff between the current branch and a provided base branch, then removes AI-generated code slop such as unnecessary comments, defensive checks, casts, or stylistic inconsistencies. Outputs a short summary of changes made.

Sby Skills Guide Bot
DevelopmentIntermediate
1506/2/2026
Claude Code
#code-cleanup#ai-generated-code#git#refactoring

Recommended for

Our review

Removes AI-generated code artifacts in a branch by comparing the diff with a reference branch.

Strengths

  • Automates cleanup of superfluous comments and defensive checks
  • Maintains stylistic consistency with existing code
  • Reports changes concisely

Limitations

  • May remove useful code if the model is too aggressive
  • Needs a reliable reference branch (often main)
When to use it

When you have just merged AI-generated code and want to make it more consistent with human standards.

When not to use it

If the generated code has already been manually reviewed and approved, or if the reference branch is not up to date.

Security analysis

Safe
Quality score85/100

The skill only uses safe git subcommands to review diffs and remove unwanted code patterns. No destructive operations, external network calls, or exfiltration risks are present.

No concerns found

Examples

Basic branch cleanup
Run deslop on my feature branch against main to remove any AI slop introduced.
Specific reference branch
Check the diff against develop and clean up AI slop in this branch.

name: deslop allowed-tools: Bash(git add:), Bash(git status:), Bash(git commit:), Bash(git reset:), Bash(git add:), Bash(git diff:), Bash(git branch:), Bash(git log:) description: Remove AI code slop

Check the diff against $1, 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