# AI Slop Cleaner

Post-implementation cleanup that removes AI-generated bloat while preserving...

- Repository: https://github.com/vibeeval/vibecosystem (541 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-08-08
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add vibeeval/vibecosystem --skill ai-slop-cleaner -g -a claude-code -y`
Codex: `npx skills add vibeeval/vibecosystem --skill ai-slop-cleaner -g -a codex -y`
Cursor: `npx skills add vibeeval/vibecosystem --skill ai-slop-cleaner -g -a cursor -y`
Gemini CLI: `npx skills add vibeeval/vibecosystem --skill ai-slop-cleaner -g -a gemini-cli -y`

## Description

Post-implementation cleanup that removes AI-generated bloat while preserving functionality. Runs pass-by-pass with test verification after each pass. Activate after kraken/spark complete a feature, or when a codebase needs hygiene work.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# AI Slop Cleaner

AI code generation produces working code. It also produces unnecessary code alongside it. This skill removes the unnecessary parts while keeping everything that matters.

## What Is "AI Slop"?

AI slop is code that:
- Works, but shouldn't exist
- Adds complexity without adding value
- Was clearly generated to pad a response rather than solve a problem
- Suggests the author wasn't thinking, just generating

Common slop categories and their signals:

| Category | Signal |
|----------|--------|
| Dead imports | Imported but never referenced in the file |
| Unused variables | Declared, never read |
| Commented-out code | Blocks of `// old code` or `/* removed */` |
| Debug remnants | `console.log`, `print()`, `debugger`, `fmt.Println` |
| Obvious comments | `// increment counter` above `count++` |
| Redundant JSDoc | `@param name - the name` above `name: string` |
| Premature abstractions | A factory that creates exactly one thing |
| One-use helpers | Private function called exactly once, trivially inlinable |
| Overly generic types | `<T extends object>` when `T` is always `User` |
| Over-parameterized | `fn(a, b, c, d, e)` where 4 params never vary |
| Unreachable branches | `if (false)` or `if (isLoggedIn && !isLoggedIn)` |
| Speculative features | Code paths for requirements that don't exist |
| Copy-paste duplication | Two blocks identical except one variable name |
| Placeholder remnants | `TODO: implement`, lorem ipsum, example data in prod |

## The Prime Directive

**Tests are sacred. Never clean test files.**

Tests exist to protect behavior. Any cleanup that breaks a test reveals that the "slop" was actually load-bearing. That is good information. The test wins.

## Regression-Safe Workflow (Non-Negotiable)

```
BEFORE ANYTHING: Run full test suite → all tests must pass (baseline)

The rest: https://github.com/vibeeval/vibecosystem/blob/HEAD/skills/ai-slop-cleaner/SKILL.md
