ai-slop-cleaner

A code-cleanup workflow for removing unnecessary AI-generated code while keeping the intended behaviour unchanged. It can also produce review findings without editing.

In plain words
What is it for?
Use it for deletion-first cleanup, small refactors, regression-test preparation, or a reviewer-only pass on noisy code.
Why use it?
AI-generated code can contain duplicates, dead code, excessive wrappers, and weak tests even when it works.

Skill for Claude CodeCodex

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 skills/bobbyjohnstx/tinycode/ai-slop-cleaner
Any agent
npx skills add bobbyjohnstx/tinycode --skill ai-slop-cleaner
Clone the repo
git clone --depth 1 https://github.com/bobbyjohnstx/tinycode

Made for: Claude Code, Codex.

Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,390 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.00025 $0.01390
Opus 5 $0.00013 $0.00695
Sonnet 5 $0.00005 $0.00278
Haiku 4.5 $0.00003 $0.00139

Measured 2d ago against content hash b933ae414055, 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 2d 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/tinycode/src/skill/defaults/ai-slop-cleaner/SKILL.md · 134 lines

How it starts

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

AI Slop Cleaner

Use this skill to clean AI-generated code slop without drifting scope or changing intended behavior. This is the bounded cleanup workflow for code that works but feels bloated, repetitive, weakly tested, or over-abstracted.

When to Use

Use this skill when:

  • the user explicitly says deslop, anti-slop, or AI slop
  • the request is to clean up or refactor code that feels noisy, repetitive, or overly abstract
  • follow-up implementation left duplicate logic, dead code, wrapper layers, boundary leaks, or weak regression coverage
  • the user wants a reviewer-only anti-slop pass via --review
  • the goal is simplification and cleanup, not new feature delivery

When Not to Use

Do not use this skill when:

  • the task is mainly a new feature build or product change
  • the user wants a broad redesign instead of an incremental cleanup pass
  • the request is a generic refactor with no simplification or anti-slop intent
  • behavior is too unclear to protect with tests or a concrete verification plan

Execution Posture

  • Preserve behavior unless the user explicitly asks for behavior changes.
  • Lock behavior with focused regression tests first whenever practical.
  • Write a cleanup plan before editing code.
  • Prefer deletion over addition.
  • Reuse existing utilities and patterns before introducing new ones.
  • Avoid new dependencies unless the user explicitly requests them.
  • Keep diffs small, reversible, and smell-focused.
  • Stay concise and evidence-dense: inspect, edit, verify, and report.
  • Treat new user instructions as local scope updates without dropping earlier non-conflicting constraints.

Scoped File-List Usage

This skill can be bounded to an explicit file list or changed-file scope when the caller already knows the safe cleanup surface.

  • Good fit: /ai-slop-cleaner src/auth/middleware.ts src/auth/utils.ts
  • Good fit: cleanup scoped to only the files changed in a prior session
  • Preserve the same regression-safe workflow even when the scope is a short file list
  • Do not silently expand a changed-file scope into broader cleanup work unless the user explicitly asks for it

Read the full file on GitHub · 134 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. 2d ago First seen · 134 lines · 25 tokens per session scan A b933ae414055

Subscribe to this mod's changes

ai-slop-cleaner is a skill published in the GitHub repository bobbyjohnstx/tinycode (11 stars, last pushed 5d ago), licensed MIT. It adds 25 tokens to every session and 1,390 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

archon-cli

Drive Archon through its CLI: run AI workflows on a repo, manage those runs (inspect, approve, reject, cancel, resume), set up Archon or change its config, author new workflows, and improve workflow prompts. Use when the user says "use archon", "run archon", "archon workflow", "fix issue #N with archon", "have archon…

coleam00/Archon · 165 tokens

semantic-compression

Re-encode verbose prose into a dense telegraphic register — punctuation as connectives, label frames, verbless assertions — without losing normativity or precision. Use when compressing system prompts, tool/function descriptions, skill bodies, or agent instructions; reducing token count or context bloat; making…

can1357/oh-my-pi · 77 tokens

greet

A greeting skill for testing.

can1357/oh-my-pi · 8 tokens

docker-extend

Use when: User wants to extend Docker with custom tools, personalize the Docker environment, or set up user-specific Docker customization. Triggers: 'extend docker', 'docker-extend', 'add tools to docker', 'customize docker', 'add my tools to the container', 'personalize docker setup', 'docker user setup', 'install…

coleam00/Archon · 118 tokens