ai-slop-cleaner

ai-slop-cleaner is a skill for Claude Code from yeaight7/agent-powerups. It costs 48 tokens per session (970 once invoked), scanned A, original, Apache-2.0.

A cleanup workflow for code that is bloated, repetitive, over-abstracted, or generated by artificial intelligence. It starts by protecting existing behavior with tests.

In plain words
What is it for?
Use it to remove duplicate code, unnecessary abstractions, dead code, weak boundaries, or other signs of low-quality generated output.
Why use it?
It helps make working code clearer without introducing unnoticed behavior changes or expanding the cleanup beyond the agreed files.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the codebase-maintenance plugin — 8 skills, 4 commands, 3 agents shipped together

Good fit Use it to remove duplicate code, unnecessary abstractions, dead code, weak boundaries, or other signs of low-quality generated output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yeaight7/agent-powerups/ai-slop-cleaner
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yeaight7/agent-powerups --skill ai-slop-cleaner
Clone the repo
git clone --depth 1 https://github.com/yeaight7/agent-powerups

Made for: Claude Code.

Or install codebase-maintenance, the plugin that ships this one along with the rest of its 8 skills, 4 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-slop-cleaner

README.md
[![agentmods](https://agentmods.dev/badge/skills/yeaight7/agent-powerups/ai-slop-cleaner/github.svg)](https://agentmods.dev/skills/yeaight7/agent-powerups/ai-slop-cleaner)
Your own site
<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/ai-slop-cleaner"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/ai-slop-cleaner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-slop-cleaner

Your own site · 80×15
<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/ai-slop-cleaner"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/ai-slop-cleaner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 970 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00970
Opus 5 $0.00024 $0.00485
Sonnet 5 $0.00010 $0.00194
Haiku 4.5 $0.00005 $0.00097

Measured 10d ago against content hash a9f9e366e3ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ai-slop-cleaner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/codebase-maintenance/skills/ai-slop-cleaner/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

Reduce AI-generated code bloat through systematic, smell-by-smell cleanup that preserves existing behavior and raises signal quality.

When to Use

  • A code path works but feels bloated, noisy, repetitive, or over-abstracted.
  • A user asks to "cleanup", "refactor", or "deslop" AI-generated output.
  • Follow-up implementation left duplicate code, dead code, weak boundaries, or missing tests.
  • A disciplined cleanup workflow is needed without broad rewrites.
  • The user wants a reviewer-only anti-slop pass via --review mode.

This skill accepts an optional file list scope. If a changed-files list is provided, keep the cleanup strictly bounded to those files. Do not silently expand a changed-file scope.

Inputs

  • Codebase or module to clean (or explicit file list scope).
  • Existing test suite (required — behavior must be locked before editing).

Workflow

  1. Lock behavior with regression tests first

    • Identify the behavior that must not change.
    • Add or run targeted regression tests before touching cleanup candidates.
    • If behavior is currently untested, write the narrowest test coverage needed first.
  2. Create a cleanup plan before code

    • List the specific smells to remove.
    • Bound the pass to the requested files/scope.
    • Order fixes from safest/highest-signal to riskiest.
    • Do not start coding until the cleanup plan is explicit.
  3. Categorize issues

    • Duplication — repeated logic, copy-paste branches, redundant helpers
    • Dead code — unused code, unreachable branches, stale flags, debug leftovers
    • Needless abstraction — pass-through wrappers, speculative indirection, single-use helper layers
    • Boundary violations — hidden coupling, leaky responsibilities, wrong-layer imports or side effects
    • Missing tests — behavior not locked, weak regression coverage, gaps around edge cases
  4. Execute passes one smell at a time

    • Pass 1: Dead code deletion
    • Pass 2: Duplicate removal
    • Pass 3: Naming and error handling cleanup
    • Pass 4: Test reinforcement
    • Re-run targeted verification after each pass.
    • Do not bundle unrelated refactors into the same edit set.

Read the full file on GitHub · 112 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 112 lines · 48 tokens per session scan A a9f9e366e3ff

Subscribe to this mod's changes

ai-slop-cleaner is a skill published in the GitHub repository yeaight7/agent-powerups (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 48 tokens to every session and 970 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.