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.
Removes AI-generated code slop from branch diffs, eliminating redundant comments, defensive checks, type workarounds, and style inconsistencies.
/plugin marketplace add RBozydar/rbw-claude-code/plugin install core@rbw-claude-code[optional: base branch, defaults to main]Check the diff against main and remove all AI-generated slop introduced in this branch.
Get the diff against main:
git diff main...HEAD
Review each changed file for slop patterns (see below)
Remove identified slop while preserving legitimate changes
Report a 1-3 sentence summary of what was changed
Remove comments that:
x = x + 1 # increment x)Keep comments that explain WHY, not WHAT.
Remove:
Keep defensive code that matches the existing codebase style.
Remove:
any or Any that work around type issues# type: ignore comments without justificationFix the underlying type issue instead of hiding it.
Move inline imports to the top of the file with other imports:
# Bad
def process():
from utils import helper # Move this
return helper()
# Good
from utils import helper
def process():
return helper()
Remove or fix:
After making changes, provide a brief summary:
Deslop complete:
- Removed 3 redundant comments in src/api/handlers.py
- Removed unnecessary try/except in src/services/order.py
- Moved 2 inline imports to top of file in src/utils/parser.py
If no slop found:
No slop detected in the current branch diff.