agentleFS
strikersamstrikersam/autonomous-ai-agency/.agents/skills/deslop/SKILL.md

deslop

Skill9 starsChanged 3 months agoMITView on GitHub

Remove AI code slop before committing. Review AI-generated code for unnecessary verbosity, redundant comments, over-engineering, and low-signal patterns that degrade codebase quality over time.

59 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use verify-this, thermo-nuclear-code-quality-review and 10 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.
  • AnastasiyaWSkill

    verify-this

    Prove a concrete behavior, performance, UI, CLI, API, or memory claim with fresh baseline-versus-treatment evidence and one explicit verdict. Use when asked to verify, prove, compare before and after, show evidence, or confirm that a fix works. Do not use for vague claims such as cleaner code, a full plan-based release verification, or a known bug that needs a red-to-green reproducer.

    Also in 4 projects that use this

  • AnastasiyaWSkill

    thermo-nuclear-code-quality-review

    Run an opt-in strict maintainability review for giant files, spaghetti growth, misplaced logic, weak boundaries, unnecessary abstractions, and missed structural simplifications. Use for a thermonuclear review, harsh code-quality audit, code-judo review, or a file approaching 1000 lines. Do not use as an automatic rewrite mandate or for cosmetic cleanup.

    Also in 3 projects that use this

  • maxvaegaSkill

    dream

    Self-improving memory loop — capture the user's preferences, corrections, and standing rules as project memories; periodically consolidate them (REM pass) and propose improvements to skills and CLAUDE.md. Modes - default, history, queued, rem, proposals, setup. Full loop on Claude Code; capture-only portable mode on Claude Cowork.

    Also in 3 projects that use this

  • Hugging FaceSkill

    simplify

    Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.

    Also in 4 projects that use this

  • AWSSkill

    teach

    Teach the user a new skill or concept, within this workspace.

    Also in 5 projects that use this

  • nicodianskSkill

    brainstorm

    Use when starting creative work - creating features, building components, adding functionality, or modifying behavior. Explores requirements through Socratic dialogue before any implementation.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 58 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this skill before every commit on AI-generated code.

    line 23
  2. Distinctive:

    Add excessive comments explaining obvious things

    line 24
  3. Distinctive:

    Create unnecessary abstractions "for future extensibility"

    line 25
  4. Distinctive:

    Write verbose variable names that add noise

    line 26
  5. Distinctive:

    Add defensive checks for impossible scenarios

    line 27
  6. Distinctive:

    Remove it entirely (comments, phantom helpers, unnecessary checks)

    line 155
  7. Distinctive:

    Do not refactor beyond removing slop.

    line 159

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

Skill: deslop

When to Use

Run this skill before every commit on AI-generated code. AI tends to:

  • Add excessive comments explaining obvious things
  • Create unnecessary abstractions "for future extensibility"
  • Write verbose variable names that add noise
  • Add defensive checks for impossible scenarios
  • Generate boilerplate that wasn't asked for

This skill catches and removes that slop before it becomes technical debt.


What "Slop" Looks Like

Category 1 — Obvious Comments

# BAD: comment restates the code
# Increment the counter by one
counter += 1

# BAD: docstring for a trivial getter
def get_name(self):
    """Returns the name."""  # ← remove this
    return self.name

# GOOD: comment explains the WHY, not the WHAT
# Retry once on 429 — Ollama rate limits burst requests
if response.status == 429:
    await asyncio.sleep(1)
    response = await client.post(...)

Category 2 — Phantom Abstractions

# BAD: helper function used exactly once
def _build_auth_header(token: str) -> dict:
    return {"Authorization": f"Bearer {token}"}

# ... used only here:
headers = _build_auth_header(api_key)

# GOOD: inline it — one use doesn't need extraction
headers = {"Authorization": f"Bearer {api_key}"}

Category 3 — Defensive Checks for Impossible Cases

# BAD: model is typed as str, can't be None here
if model is None:
    model = "default"

# BAD: list was just created, can't be empty by contract
if not items:
    return []

Category 4 — Speculative Generality

# BAD: added for hypothetical future use
class BaseRouter(ABC):
    @abstractmethod
    def route(self): ...

class ModelRouter(BaseRouter):
    def route(self): ...   # only one implementation, ever

# GOOD: just write ModelRouter directly
class ModelRouter:
    def route(self): ...

Category 5 — Verbose Variable Names

# BAD
current_request_model_name_string = request.model

# GOOD
model = request.model

Category 6 — Unasked-For Boilerplate

# BAD: added logging, error handling, and retry for a one-liner
async def get_health():
    log.debug("Starting health check")
    try:
        result = await check_ollama()
        log.debug("Health check completed successfully")
        return result
    except Exception as e:
        log.error(f"Health check failed: {e}")
        raise

# GOOD (if no retry logic was requested):
async def get_health():
    return await check_ollama()

Instructions

Step 1 — Read the diff

git diff --staged        # staged changes only
# or
git diff HEAD            # all changes since last commit

Step 2 — Apply the deslop checklist

For each changed file, check:

  • No comments that restate what the code does
  • No one-use helper functions (inline them)
  • No defensive None/empty checks for values that can't be None/empty by contract
  • No abstract base classes or interfaces with a single implementation
  • No verbose variable names (if the short name is unambiguous)
  • No unasked-for boilerplate (logging, retry, error handling beyond what was specified)
  • No type: ignore comments that mask real problems
  • No TODO comments added by AI (remove or file as an issue)
  • No backwards-compatibility shims for code that was just written

Step 3 — Apply fixes

For each slop item found:

  1. Remove it entirely (comments, phantom helpers, unnecessary checks)
  2. Inline it (one-use helpers)
  3. Simplify it (verbose names, over-abstracted interfaces)

Do not refactor beyond removing slop. The goal is cleaner, not different.

Step 4 — Verify nothing broke

pytest -x

The One Rule

If the code would be clearer without it, delete it.


Acceptance Checks

  • No obvious comments (restating the code)
  • No one-use helper functions
  • No phantom defensive checks
  • No speculative abstractions
  • No verbose names where short ones are unambiguous
  • No unasked-for boilerplate
  • Tests still pass after cleanup

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.