deslop.it

Detect and remove AI-generated code bloat.
A Claude Code plugin for Python.

claude plugin marketplace add zaffnet/deslop.it
claude plugin install deslop@deslop
Copied!

What is AI Code Slop?

When AI assistants generate code, they tend to over-defend, over-abstract, and over-document. The result is bloated code that's harder to read, review, and maintain. We call this slop — code that compiles and works, but adds no value. It accumulates quietly and inflates your codebase.

Prevent It

Tips for keeping AI-generated code clean from the start:

The 6 Categories

deslop scans for slop across six weighted categories:

# Category Weight What it catches
1 Over-Defensive Code 1.0x Unreachable None guards, impossible except blocks, redundant isinstance, silent swallows
2 Premature Abstraction 1.5x One-caller helpers, transparent wrappers, configuration mirages, lonely enums
3 Dead Weight 1.5x Unused params, once-used constants, zero-caller functions, pre-computed state
4 Verbose Patterns 1.0x Boolean long-hand, manual list builds, concatenation chains, deep nesting
5 Structural Bloat 1.5x Delegation chains, symmetry addiction, gratuitous generics, repetitive structures
6 Doc & Logging Noise 1.0x Restating comments, signature-echoing docstrings, redundant logging

Install the Plugin

  1. Add the marketplace:

    claude plugin marketplace add zaffnet/deslop.it
    Copied!
  2. Install the plugin:

    claude plugin install deslop@deslop
    Copied!
  3. Open any Python project and run:

    /deslop
    Copied!
  4. Or target a specific directory:

    /deslop src/mypackage
    Copied!

The plugin scans all Python files, calculates a weighted slop density score, and offers to auto-fix findings — all within Claude Code.

Scoring

Each finding is weighted by category. Structural issues (Categories 2, 3, 5) carry 1.5x weight because they cause more long-term harm than surface verbosity.

Slop Density Rating
0–5%Excellent — minimal slop
5–15%Good — minor cleanup possible
15–30%Needs work — significant bloat
30%+Heavy slop — major cleanup needed