agentleFS
yeaight7yeaight7/agent-powerups/skills/ai-slop-cleaner/SKILL.md

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.

10 other projects use a version of this, 5 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use visual-verdict, hud and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LucasCooperBeySkill

    visual-verdict

    Structured visual QA verdict for screenshot-to-reference comparisons. Returns JSON scores driving edit iterations. Use after any UI implementation to verify visual fidelity.

    Also in 3 projects that use this

  • ibahgatSkill

    hud

    Control omi visual HUD profile and keep status output readable in normal, compact, or hidden mode.

    Also in 4 projects that use this

  • Yeachan-HeoSkill

    ultragoal

    Create and execute durable repo-native multi-goal plans over Codex goal mode artifacts.

    Also in 3 projects that use this

  • markmdevSkill

    self-improve

    Analyze Claude Code sessions to find workflow frictions, underused tools, stale instructions, documentation gaps, and opportunities for new skills or automation. Produces actionable improvement suggestions with prioritized recommendations. Use when the user says "self-improve", "analyze my workflow", "what can we improve", "find frictions", "optimize workflow", or asks about improving their Claude Code setup. Also suggest running this after long sessions, multi-session projects, or when the user seems frustrated with repetitive work.

    Also in 4 projects that use this

  • dubwoahSkill

    ask

    Answer questions about the codebase without generating or modifying any code. Use when the user wants to understand how something works, find where something is defined, or explore the project structure. Invoked with /ask.

    Also in 3 projects that use this

  • GitHubSkill

    autoresearch

    Autonomous iterative experimentation loop for any programming task. Guides the user through defining goals, measurable metrics, and scope constraints, then runs an autonomous loop of code changes, testing, measuring, and keeping/discarding results. Inspired by Karpathy''s autoresearch. USE FOR: autonomous improvement, iterative optimization, experiment loop, auto research, performance tuning, automated experimentation, hill climbing, try things automatically, optimize code, run experiments, autonomous coding loop. DO NOT USE FOR: one-shot tasks, simple bug fixes, code review, or tasks without a measurable metric.

    Also in 3 projects that use this

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 8 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
  1. Distinctive:

    Follow-up implementation left duplicate code, dead code, weak boundaries, or missing tests.

    line 14
  2. Distinctive:

    Add or run targeted regression tests before touching cleanup candidates.

    line 29
  3. Distinctive:

    If behavior is currently untested, write the narrowest test coverage needed first.

    line 30
  4. Distinctive:

    Do not start coding until the cleanup plan is explicit.

    line 36
  5. Distinctive:

    Do not bundle unrelated refactors into the same edit set.

    line 51
  6. Distinctive:

    No new abstractions or dependencies unless explicitly required.

    line 59
  7. Very specific:

    If invoked with a --review flag, operate as a reviewer-only pass:

    line 63
  8. Distinctive:

    Do not start by editing files.

    line 64
  9. Distinctive:

    Check specifically for leftover dead code, duplicate logic, needless wrappers, and missing tests for preserved behavior.

    line 66

“Common” is measured: kept by at least 6 in 10 of the 8 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.
  5. 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:

  1. Do not start by editing files.
  2. Review the cleanup plan, changed files, and regression coverage.
  3. Check specifically for leftover dead code, duplicate logic, needless wrappers, and missing tests for preserved behavior.
  4. Produce a reviewer verdict with required follow-ups.
  5. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.