ai-slop-cleaner

ai-slop-cleaner is an agent for coding agents 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

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.

agentmods
npx agentmods add agents/random6913/claude-code-superkit/ai-slop-cleaner
Clone the repo
git clone --depth 1 https://github.com/RaNDoM6913/claude-code-superkit

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00040 $0.02039
Opus 5 $0.00020 $0.01019
Sonnet 5 $0.00008 $0.00408
Haiku 4.5 $0.00004 $0.00204

Measured yesterday against content hash e449fb6b50a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday 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 (2 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 2,039 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-09-03.

Related

Other agents, from other repositories

python-architect

Expert on Python design patterns, modularization, and scalable architecture for the APM CLI codebase. Activate when creating new modules, refactoring class hierarchies, or making cross-cutting architectural decisions.

microsoft/apm · 45 tokens

cdo

APM Chief Documentation Officer. Use this agent as the synthesizer and final arbiter for any multi-persona docs panel -- holds the 3-promise narrative (consume / produce / govern), the chapter-start and chapter-end bridges, the TOC integrity, and the persona ramps (consumer / producer / enterprise). Activate to…

microsoft/apm · 95 tokens

doc-writer

APM documentation writer. Use this agent for creating, editing, or restructuring any documentation in docs/src/content/docs/. Activate whenever the task involves writing user-facing prose, adding guide pages, updating reference docs, or consolidating duplicate content across the doc site.

microsoft/apm · 51 tokens

algorithmic-patterns

Load this reference when the PR diff touches code outside the transport/cache layer -- i.e. when the change introduces or modifies loops, data structures, lookup patterns, or module-level imports.

microsoft/apm · 0 tokens

apm-expert

Expert on APM (Agent Package Manager). Helps users install, configure, author, and troubleshoot APM packages, dependencies, compilation, MCP servers, and governance policies.

microsoft/apm · 39 tokens

test-coverage-expert

Test-coverage expert paired with the DevX UX lens. Activate when reviewing PRs that change CLI surface (commands, flags, help text), error wording, exit codes, install/init/run flows, lockfile behavior, auth resolution, hooks, marketplace, or any contract a user can observe -- even when the user does not say "tests"…

microsoft/apm · 151 tokens