ai-slop-cleaner

Remove duplication, dead code, and needless abstractions from AI-generated code.

Updated May 20, 2026
One-click install
npx skills add https://github.com/xdkp/oh-my-claudecode --skill ai-slop-cleaner-xdkp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-slop-cleaner
Source: https://github.com/xdkp/oh-my-claudecode/tree/main/skills/ai-slop-cleaner
Command: npx skills add https://github.com/xdkp/oh-my-claudecode --skill ai-slop-cleaner-xdkp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It cleans up AI-generated code “slop” (bloat, duplication, dead code, and unnecessary abstractions) while preserving intended behavior through a regression-safe workflow.

Core Features & Use Cases

  • Regression-safe deletion-first cleanup: prioritize removing dead code and redundancy before risky consolidation.
  • Anti-slop classification and ordered edits: structure work around duplication, dead code, needless abstraction, boundary violations, and missing test coverage.
  • Optional reviewer-only mode: use --review to verify the cleanup plan and evidence before any high-impact changes are finalized.

Quick Start

Run /oh-my-claudecode:ai-slop-cleaner to clean the specified files while keeping behavior locked by targeted regression tests.

Frequently Asked Questions about ai-slop-cleaner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up AI-generated code slop without breaking existing behavior?

AI slop cleanup removes duplication, dead code, and needless abstractions while locking intended behavior through regression verification gates. A protect-first workflow ensures deletion-first edits are validated by targeted regression tests before finalizing changes.

What is the best way to remove dead code and duplication from a bloated codebase?

Dead code elimination and duplication removal are structured through anti-slop classification, prioritizing safe deletion before risky consolidation. This ordered, smell-focused editing approach targets specific code smells incrementally to simplify bloated codebases without drift.

Can I review code cleanup changes before they are applied to my files?

Yes, an optional reviewer-only mode activated with the --review flag separates writer edits from reviewer approval. This allows you to verify the cleanup plan and evidence before any high-impact changes are finalized on your changed files.

How do I refactor over-abstracted code without causing regression test failures?

Refactoring over-abstracted code requires a protect-first workflow that applies ordered smell-focused edits and regression verification gates. Removing needless abstractions and boundary leaks is validated by targeted regression tests to prevent drift.

Does this code cleanup approach work for incremental file-scope refactoring?

Yes, the cleanup workflow applies to bounded file-scope and changed-files post-review passes. It supports incremental cleanup and anti-slop refactors for weakly tested or repetitive codebases, ensuring changes remain scoped and safe.

Why should I use a deletion-first approach for code refactoring?

A deletion-first approach prioritizes removing dead code and redundancy before risky consolidation to prevent behavior drift. This regression-safe strategy reduces over-abstracted code slop while maintaining locked behavior through verification gates.