About deslop
deslop is a code-cleanup skill for removing AI-generated patterns introduced in a branch. It compares changes with main and favors focused edits that preserve behavior unless a clear bug needs fixing.
Key features
- 01Compare branch changes with main
- 02Remove unnecessary or inconsistent comments
- 03Simplify abnormal defensive code
- 04Replace casts used to bypass types
- 05Keep behavior and edits focused
Use cases
- 01Cleaning up a feature branch before review
- 02Removing unnecessary comments from a diff
- 03Simplifying nested code without broad rewrites
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ michael-denyer/ pstack-claude --skill deslopAfter installing, type/deslopin Claude Code to confirm it loaded.
Details
From the project READMERemove AI code slop
Check the diff against main and remove AI-generated slop introduced in the branch.
Focus Areas
- Extra comments that are unnecessary or inconsistent with local style
- Defensive checks or try/catch blocks that are abnormal for trusted code paths
- Casts to
anyused only to bypass type issues - Deeply nested code that should be simplified with early returns
- Other patterns inconsistent with the file and surrounding codebase
Guardrails
- Keep behavior unchanged unless fixing a clear bug.
- Prefer minimal, focused edits over broad rewrites.
- Keep the final summary concise (1-3 sentences).
Comments
Markdown supported