Clean up AI-generated code changes by reviewing diffs against main and removing stylistic or structural artifacts (over-commenting, unnecessary defensive checks, try/catch noise, any-casts,...
SKILL.md
Deslop Code
Overview
Strip AI-generated artifacts from a branch by comparing against main and aligning edits with local conventions and surrounding code style.
Workflow
Establish baseline
Use git diff against main to identify AI-introduced changes.
Review surrounding context in each file to understand local conventions.
Remove slop patterns
Delete comments that read like explanations, narrations, or redundant restatements of code.
Remove defensive checks or try/catch blocks that are inconsistent with trusted code paths or nearby style.
Replace any-casts or similar type escapes with proper typing or remove them if unnecessary.
Normalize style to match the file (naming, ordering, error handling, control flow).
Verify consistency
Ensure behavior remains unchanged unless removal requires a small refactor to restore intended behavior.
Keep changes minimal and localized; avoid refactors not needed for cleanup.
Report
End response with a 1–3 sentence summary of what changed.