skills/ai-slop-cleaner/SKILL.md
Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode
npx skillsauth add sartoris-digital/pi-superpowers ai-slop-cleanerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Clean AI-generated code slop without drifting scope or changing intended behavior. A bounded cleanup workflow for code that works but feels bloated, repetitive, weakly tested, or over-abstracted.
--review--review)When invoked with --review, this is a reviewer-only pass — no edits:
Identify what must stay the same. Add or run the narrowest regression tests needed before editing. If tests cannot come first, record the verification plan explicitly.
Dispatch code-reviewer at standard tier to classify issues:
subagent({
agent: "code-reviewer",
tier: "standard",
task: "MODE: slop-classification\n\nAnalyze these files for AI-generated code slop. Classify each issue into one of these categories:\n\n1. **Dead code** — unused code, unreachable branches, stale flags, debug leftovers\n2. **Duplication** — repeated logic, copy-paste branches, redundant helpers\n3. **Needless abstraction** — pass-through wrappers, speculative indirection, single-use helper layers\n4. **Boundary violations** — hidden coupling, misplaced responsibilities, wrong-layer imports\n5. **Missing tests** — behavior not locked, weak regression coverage, edge-case gaps\n\nFor each issue: cite file:line, category, severity (high/medium/low), and suggested fix.\n\nFiles to analyze:\n{FILES}"
})
Run one smell-focused pass at a time, verifying after each:
Pass 1: Dead code deletion
Pass 2: Duplicate removal
Pass 3: Naming and error-handling cleanup
Pass 4: Test reinforcement
After all passes:
## Cleanup Report
### Changed Files
- file.ts: removed 3 dead functions, consolidated 2 duplicates
### Simplifications
- Removed X lines of dead code
- Consolidated N duplicate patterns into shared utility
### Verification
- All tests pass (N total)
- Typecheck clean
### Remaining Risks
- (any concerns or deferred items)
| Placeholder | Source |
|-------------|--------|
| {FILES} | Target files from arguments, or changed files from git diff |
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
data-ai
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
tools
Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions