# Remove AI Slops

Removes AI-generated code smells from branch changes or an explicit file list behind...

- Repository: https://github.com/code-yeongyu/oh-my-openagent (70577 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add code-yeongyu/oh-my-openagent --skill remove-ai-slops -g -a claude-code -y`
Codex: `npx skills add code-yeongyu/oh-my-openagent --skill remove-ai-slops -g -a codex -y`
Cursor: `npx skills add code-yeongyu/oh-my-openagent --skill remove-ai-slops -g -a cursor -y`
Gemini CLI: `npx skills add code-yeongyu/oh-my-openagent --skill remove-ai-slops -g -a gemini-cli -y`

## Description

Removes AI-generated code smells from branch changes or an explicit file list behind regression tests, including junk tests (prose pins, source greps, copied inventories, mock echoes), each proven by its class's rule before a cut. Use when the user asks to clean up, deslop, remove AI-slop patterns, or prune tests from recent changes.

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

# Remove AI Slops Skill

## Inputs

- **Default scope**: branch diff vs `merge-base main` (no arguments needed)
- **Optional scope**: explicit file list passed by the caller (e.g., a Ralph workflow's changed-files set)

## What this skill does

Cleans AI-generated slop from a bounded set of changed files while strictly preserving behavior. Locks behavior with regression tests first, then runs a categorized multi-pass cleanup, then verifies with quality gates and a critical review. Reverts and direct-edits when verification fails.

The core safety invariant: **behavior is locked by green tests before a single line is removed**. A checklist alone is not safety; a passing regression test is.

---

## Categories (what counts as slop)

The agent looks for these ten categories. The first three are stylistic, the next three are structural, the next two are about hidden cost, the ninth is tests, and the last is size.

### Stylistic
1. **Obvious comments**, comments restating code, trivial docstrings, section dividers, commented-out code, vague TODOs/Notes.
   - KEEP: comments explaining WHY (business logic, edge cases, workarounds), ticket links, regex/algorithm explanations.
   - KEEP: BDD markers (`# given`, `# when`, `# then`, `# when/then`).

The rest: https://github.com/code-yeongyu/oh-my-openagent/blob/HEAD/packages/shared-skills/skills/remove-ai-slops/SKILL.md
