ai-slop-cleaner

ai-slop-cleaner is an agent for Claude Code from RaNDoM6913/claude-code-superkit. It costs 40 tokens per session (2,039 once invoked), scanned A, original, MIT.

A code-cleanup agent that removes unnecessary comments, one-use abstractions, over-engineering, and other common patterns in AI-generated code while preserving behavior.

In plain words
What is it for?
Use it after implementation to simplify code, remove safe redundancies, and verify the result with project checks.
Why use it?
It improves readability without adding features or changing what the program does. It checks usages and runs compile or lint checks so risky cleanups are left untouched.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it after implementation to simplify code, remove safe redundancies, and verify the result with project checks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/random6913/claude-code-superkit/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.

Clone the repo
git clone --depth 1 https://github.com/RaNDoM6913/claude-code-superkit

Made for: Claude Code.

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/agents/random6913/claude-code-superkit/ai-slop-cleaner/github.svg)](https://agentmods.dev/agents/random6913/claude-code-superkit/ai-slop-cleaner)
Your own site
<a href="https://agentmods.dev/agents/random6913/claude-code-superkit/ai-slop-cleaner"><img src="https://agentmods.dev/badge/agents/random6913/claude-code-superkit/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/agents/random6913/claude-code-superkit/ai-slop-cleaner"><img src="https://agentmods.dev/badge/agents/random6913/claude-code-superkit/ai-slop-cleaner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,039 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.00040 $0.02039
Opus 5.5 $0.00016 $0.00816
Sonnet 5.5 $0.00008 $0.00408
Haiku 4.5 $0.00004 $0.00204

Measured 1mo ago against content hash e449fb6b50a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

packages/core/agents/ai-slop-cleaner.md · 188 lines

How it starts

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

AI Slop Cleaner

Detect and fix AI-generated code anti-patterns. Behavior-preserving cleanup only: readability and quality improve, logic never changes.

Hard Rules

  • NEVER change logic, add features, or alter behavior — every fix must be provably behavior-preserving.
  • Before ANY Edit: Read the full containing function AND Grep every call site of any symbol you plan to inline or delete.
  • Ambiguous usage (exported symbol, possible external caller, unclear intent) → classify BORDERLINE and do NOT edit.
  • Fix ONE category at a time to keep diffs reviewable; run compile/lint after each edited category.
  • SLOP / BORDERLINE is this agent's own output enum — do not substitute reviewer severities (CRITICAL/WARNING/SUGGESTION).
  • 0 findings is a valid result — do not manufacture slop.

Phase 0 — Load Project Context

Read if present, skip silently if absent: CLAUDE.md or AGENTS.md (conventions + Key Commands for build/lint); .editorconfig or linter configs. Use it to: distinguish project conventions from AI slop (the project MAY legitimately want verbose comments) and to find the compile/lint command for the Verify step.

When to Use

  • After the /dev Implement phase — clean AI output before review
  • Before code review — catch slop before reviewers waste time on it
  • Standalone cleanup pass on existing code

Scope

  1. Caller named files/dirs → scan exactly those.
  2. No scope given → files changed in the working tree (git diff --name-only HEAD plus untracked from git status --porcelain).
  3. Empty diff and no scope given → ask before scanning; never full-scan the project by default.

Detection Checklist

Category 1: Redundant Comments (MOST COMMON)

// This function returns the user      ← states the obvious
// Import the http package             ← describes the import
// Create a new instance               ← describes the constructor
// Check if the value is nil           ← restates the code
// TODO: implement this                ← left by AI, not real TODO

Read the full file on GitHub · 188 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. 1mo ago First seen · 188 lines · 40 tokens per session scan A e449fb6b50a3

Subscribe to this mod's changes

ai-slop-cleaner is an agent published in the GitHub repository RaNDoM6913/claude-code-superkit (3 stars, last pushed 4d ago), licensed MIT. It adds 40 tokens to every session and 2,039 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

Other agents, from other repositories

code-simplifier

Simplifies and refines code for clarity, consistency, and maintainability while preserving behavior. Focus on recently modified code unless instructed otherwise.

affaan-m/ECC · 32 tokens

changes-review

Changes review agent that verifies plan compliance, code quality, and goal achievement in a single pass. Returns structured JSON findings.

maxritter/pilot-shell · 27 tokens

spec-review

Spec review agent that verifies alignment with user requirements and challenges dangerous assumptions. Returns structured JSON findings.

maxritter/pilot-shell · 22 tokens

reviewer

Reviews a change for correctness, security, and convention adherence. Use AFTER a resolver edit and BEFORE merge. Read-only by construction — it reports findings, it does not "fix while reviewing" (which hides the bug behind a silent edit).

mycelium-hq/ai-brain-starter · 51 tokens

Vitruvius

Architecture reviewer. Evaluates system design decisions, architectural patterns, scalability, technical debt, and technology choices at the macro level. Use before committing to a system design, when something feels structurally wrong, or after a major sprint to audit what accumulated. Reports honesty ledger on…

wrg32786/aigent-os · 61 tokens

deputy

The session's stand-in, engaged through /deputy, that answers in the user's place every round, gate and closing a skill would put to them. Only the user summons it, through /deputy or by naming it for one question, which it answers in a line before waiting for the next.

toverux/cantrips · 67 tokens