Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
avifenesh avatar

Deslop

  • 64 installs
  • 931 repo stars
  • Updated July 26, 2026
  • avifenesh/agentsys

deslop is a Claude skill that scans code for AI slop, debug statements, and dead code and reports or auto-fixes findings by certainty level.

About

This skill cleans AI slop from code by scanning for debug statements, ghost code, orphaned infrastructure, and unused exports. It runs a detection script, optionally enhances findings with AST-based repo-map analysis, and ranks results by HIGH, MEDIUM, or LOW certainty. It returns structured JSON in report or apply mode so an orchestrator can auto-fix high-certainty items.

  • Detects debug statements, ghost code, orphaned infrastructure, and unused exports
  • Certainty-based findings (HIGH/MEDIUM/LOW) with auto-fix only for HIGH
  • Report or apply mode with scope of all, diff, or a specific path

Deslop by the numbers

  • 64 all-time installs (skills.sh)
  • Ranked #534 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

deslop capabilities & compatibility

Capabilities
dead code detection · code cleanup · unused export detection
Use cases
refactoring · code review
From the docs

What deslop says it does

Clean AI slop from code with certainty-based findings and auto-fixes.
SKILL.md
Use when user wants to clean AI slop from code. Use for cleanup, remove debug statements, find ghost code, repo hygiene.
SKILL.md
npx skills add https://github.com/avifenesh/agentsys --skill deslop

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs64
repo stars931
Last updatedJuly 26, 2026
Repositoryavifenesh/agentsys

What it does

Scan code for AI slop, debug statements, and dead code, then report or auto-fix findings by certainty.

Who is it for?

Removing debug statements, dead code, and unused exports before shipping

Skip if: Adding features or fixing functional bugs

When should I use this skill?

The user wants to clean AI slop, remove debug statements, find ghost code, or do repo hygiene

What you get

A certainty-ranked list of slop findings with high-certainty items auto-fixable.

  • structured JSON findings
  • list of auto-fixable slop
  • certainty and severity summary

By the numbers

  • 3 certainty levels (HIGH/MEDIUM/LOW)
  • 2 modes (report, apply)

Files

SKILL.mdMarkdownGitHub ↗

deslop

Clean AI slop from code with certainty-based findings and auto-fixes.

Parse Arguments

const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const mode = args.find(a => ['report', 'apply'].includes(a)) || 'report';
const scope = args.find(a => a.startsWith('--scope='))?.split('=')[1] || 'all';
const thoroughness = args.find(a => a.startsWith('--thoroughness='))?.split('=')[1] || 'normal';

Input

Arguments: [report|apply] [--scope=<path>|all|diff] [--thoroughness=quick|normal|deep]

  • Mode: report (default) or apply
  • Scope: What to scan
  • all (default): Entire codebase
  • diff: Only files changed in current branch
  • <path>: Specific directory or file
  • Thoroughness: Analysis depth (default: normal)
  • quick: Regex patterns only
  • normal: + multi-pass analyzers
  • deep: + CLI tools (jscpd, madge) if available

Detection Pipeline

Phase 1: Run Detection Script

The detection script is at ../../scripts/detect.js relative to this skill.

Run detection (use relative path from skill directory):

# Scripts are at plugin root: ../../scripts/ from skills/deslop/
node ../../scripts/detect.js . --thoroughness normal --compact --max 50

For diff scope (only changed files):

BASE=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' || echo "main")
# Use newline-separated list to safely handle filenames with special chars
git diff --name-only origin/${BASE}..HEAD | \
  xargs -d '\n' node ../../scripts/detect.js --thoroughness normal --compact

Note: The relative path ../../scripts/detect.js navigates from skills/deslop/ up to the plugin root where scripts/ lives.

Phase 2: Repo-Map Enhancement (Optional)

If repo-map exists, enhance detection with AST-based analysis:

// Use relative path from skill directory to plugin lib
// Path: skills/deslop/ -> ../../lib/repo-map
const repoMap = require('../../lib/repo-map');

if (repoMap.exists(basePath)) {
  const map = repoMap.load(basePath);
  const usageIndex = repoMap.buildUsageIndex(map);

  // Find orphaned infrastructure with HIGH certainty
  const orphaned = repoMap.findOrphanedInfrastructure(map, usageIndex);
  for (const item of orphaned) {
    findings.push({
      file: item.file,
      line: item.line,
      pattern: 'orphaned-infrastructure',
      message: `${item.name} (${item.type}) is never used`,
      certainty: 'HIGH',
      severity: 'high',
      autoFix: false
    });
  }

  // Find unused exports
  const unusedExports = repoMap.findUnusedExports(map, usageIndex);
  for (const item of unusedExports) {
    findings.push({
      file: item.file,
      line: item.line,
      pattern: 'unused-export',
      message: `Export '${item.name}' is never imported`,
      certainty: item.certainty,
      severity: 'medium',
      autoFix: false
    });
  }
}

Phase 3: Aggregate and Prioritize

Sort findings by: 1. Certainty: HIGH before MEDIUM before LOW 2. Severity: high before medium before low 3. Fix complexity: auto-fixable before manual

Phase 4: Return Structured Results

Skill returns structured JSON - does NOT apply fixes (orchestrator handles that).

Output Format

JSON structure between markers:

=== DESLOP_RESULT ===
{
  "mode": "report|apply",
  "scope": "all|diff|path",
  "filesScanned": N,
  "findings": [
    {
      "file": "src/api.js",
      "line": 42,
      "pattern": "debug-statement",
      "message": "console.log found",
      "certainty": "HIGH",
      "severity": "medium",
      "autoFix": true,
      "fixType": "remove-line"
    }
  ],
  "fixes": [
    {
      "file": "src/api.js",
      "line": 42,
      "fixType": "remove-line",
      "pattern": "debug-statement"
    }
  ],
  "summary": {
    "high": N,
    "medium": N,
    "low": N,
    "autoFixable": N
  }
}
=== END_RESULT ===

Certainty Levels

LevelMeaningAction
HIGHDefinitely slop, safe to auto-fixAuto-fix via simple-fixer
MEDIUMLikely slop, needs verificationReview first
LOWPossible slop, context-dependentFlag only

Pattern Categories

HIGH Certainty (Auto-Fixable)

  • debug-statement: console.log, console.debug, print, println!
  • debug-import: Unused debug/logging imports
  • placeholder-text: "Lorem ipsum", "TODO: implement"
  • empty-catch: Empty catch blocks without comment
  • trailing-whitespace: Trailing whitespace
  • mixed-indentation: Mixed tabs/spaces

MEDIUM Certainty (Review Required)

  • excessive-comments: Comment/code ratio > 2:1
  • doc-code-ratio: JSDoc > 3x function body
  • stub-function: Returns placeholder value only
  • dead-code: Unreachable after return/throw
  • infrastructure-without-impl: DB clients created but never used

LOW Certainty (Flag Only)

  • over-engineering: File/export ratio > 20x
  • buzzword-inflation: Claims without evidence
  • shotgun-surgery: Files frequently change together

Fix Types

Fix TypeActionPatterns
remove-lineDelete linedebug-statement, debug-import
add-commentAdd explanationempty-catch
remove-blockDelete code blockstub-function with TODO

Error Handling

  • Git not available: Skip git-dependent checks
  • Invalid scope: Return error in JSON
  • Parse errors: Skip file, continue scan

Integration

This skill is invoked by:

  • deslop-agent for /deslop command
  • /next-task Phase 8 (pre-review gates) with scope=diff

The orchestrator spawns simple-fixer to apply HIGH certainty fixes.

Related skills

Forks & variants (1)

Deslop has 1 known copy in the catalog totaling 2 installs. They canonicalize to this original listing.

FAQ

Does it auto-fix everything it finds?

No, only HIGH-certainty findings are auto-fixed; MEDIUM needs verification and LOW is flagged only.

What can I scope the scan to?

The entire codebase (all), only changed files (diff), or a specific path.

Code Review & Qualitytestingbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.