ai-slop-cleaner
Skill6 starsChanged 4 months agoApache-2.0View on GitHub
Use when a working code path feels bloated, noisy, or over-abstracted, when asked to clean up or deslop AI-generated code, or when a reviewer-only anti-slop pass is requested.
4 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- blas1n/claude-skillstheir own version, first seen Oct 4, 2026
- Yeachan-Heo/oh-my-claudecodeedited, first seen Sep 22, 2026
- mrzhangguoguo/oh-my-workbuddyedited, first seen Jul 8, 2026
- lza6/claw-code-tingfengedited, first seen Apr 22, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- Yeachan-Heo/oh-my-claudecode★ 40k13% same
- lza6/claw-code-tingfeng★ 441% same
- mrzhangguoguo/oh-my-workbuddy★ 219% same
Wrote their own version · 1
- blas1n/claude-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository116 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/graphify/references/CLAUDE.mdCLAUDE.md
- agent-config-security-auditSkill
- agent-harness-designSkill
- agent-readable-docsSkill
- agent-runtime-patternsSkill
- agent-session-forensicsSkill
- ai-regression-testingSkill
- api-doc-reviewSkill
- architecture-decision-recordsSkill
- architecture-simplificationSkill
- ask-claudeSkill
- ask-codexSkill
- ask-geminiSkill
- autonomous-delivery-pipelineSkill
- baseline-comparison-reviewSkill
- bigquery-cost-auditSkill
- brainstormingSkill
- browser-automation-safetySkill
- bug-huntSkill
- build-fix-minimal-diffSkill
- canonical-advisor-routingSkill
- change-impact-checkSkill
- changelog-generatorSkill
- ci-failure-readoutSkill
- codebase-migration-batchesSkill
- context-compressionSkill
- context-docsSkill
- context-minimizationSkill
- context-retrieval-loopSkill
- data-qualitySkill
- dataset-split-reviewSkill
- dbt-incremental-strategy-auditSkill
- dbt-preflightSkill
- dbt-strategySkill
- dead-code-removalSkill
- defuddleSkill
- dependency-cleanupSkill
- deploy-pipeline-runbookSkill
- dispatching-parallel-agentsSkill
- doc-consistency-checkSkill
- environment-doctorSkill
- experiment-tracking-reviewSkill
- failure-triageSkill
- filesystem-mcp-guardrailsSkill
- finishing-a-development-branchSkill
- flaky-test-investigationSkill
- gh-address-commentsSkill
- github-ci-failure-triageSkill
- graphifySkill
- handoff-disciplineSkill
- hard-won-skill-extractorSkill
- hook-safety-reviewSkill
- incident-readoutSkill
- incremental-migrationSkill
- json-canvasSkill
- local-rag-mcpSkill
- log-driven-diagnosisSkill
- managed-codebase-contextSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Follow-up implementation left duplicate code, dead code, weak boundaries, or missing tests.
- Distinctive: line 29
Add or run targeted regression tests before touching cleanup candidates.
- Distinctive: line 30
If behavior is currently untested, write the narrowest test coverage needed first.
- Distinctive: line 36
Do not start coding until the cleanup plan is explicit.
- Distinctive: line 51
Do not bundle unrelated refactors into the same edit set.
- Distinctive: line 59
No new abstractions or dependencies unless explicitly required.
- Very specific: line 63
If invoked with a --review flag, operate as a reviewer-only pass:
- Distinctive: line 64
Do not start by editing files.
- Distinctive: line 66
Check specifically for leftover dead code, duplicate logic, needless wrappers, and missing tests for preserved behavior.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
--reviewmode.
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
- 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.
- 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.
- 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
- 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.
- Run quality gates
- Regression tests stay green.
- Lint passes.
- Typecheck passes.
- Relevant unit/integration tests pass.
- Diff stays minimal and scoped.
- No new abstractions or dependencies unless explicitly required.
Review Mode (--review)
If invoked with a --review flag, operate as a reviewer-only pass:
- Do not start by editing files.
- Review the cleanup plan, changed files, and regression coverage.
- Check specifically for leftover dead code, duplicate logic, needless wrappers, and missing tests for preserved behavior.
- Produce a reviewer verdict with required follow-ups.
- Hand needed changes back to a separate writer pass instead of fixing and approving in one step.
Output
AI SLOP CLEANUP REPORT
======================
Scope: [files or feature area]
Behavior Lock: [targeted regression tests added/run]
Cleanup Plan: [bounded smells and order]
Passes Completed:
1. Dead code deletion - [concise fix]
2. Duplicate removal - [concise fix]
3. Naming/error handling cleanup - [concise fix]
4. Test reinforcement - [concise fix]
Quality Gates:
- Regression tests: PASS/FAIL
- Lint: PASS/FAIL
- Typecheck: PASS/FAIL
- Tests: PASS/FAIL
Changed Files:
- [path] - [simplification]
Remaining Risks:
- [none or short deferred item]Verification
- Regression tests written or confirmed before any edits
- Cleanup plan explicit before coding started
- Each pass limited to one smell category
- Quality gates pass after each pass
- Diff is minimal and scoped — no unrelated changes
Failure Modes
- Editing before tests — Never clean up code whose behavior isn't locked by tests.
- Multi-smell passes — Bundling smell categories into one large refactor makes verification impossible.
- Scope creep — If given a file list scope, stay within it. Do not expand to adjacent files.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

