deslop

deslop is a skill for Claude Code, Codex from agent-sh/agentsys. It costs 30 tokens per session (1,573 once invoked), scanned A, original, MIT.

A code-cleanup checker for finding likely AI-generated clutter and unused or unnecessary code. It can scan the whole codebase, changed files, or a chosen path at different depths.

In plain words
What is it for?
Use it to generate a cleanup report or apply high-confidence fixes, with optional deeper checks using available command-line tools.
Why use it?
It helps identify debug statements, ghost code, duplication, and other repository-hygiene issues before they become harder to remove.

Skill for Claude CodeCodex

Part of the agentsys plugin — 28 skills, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agent-sh/agentsys/deslop
Any agent
npx skills add agent-sh/agentsys --skill deslop
Clone the repo
git clone --depth 1 https://github.com/agent-sh/agentsys

Made for: Claude Code, Codex.

Or install agentsys, the plugin that ships this one along with the rest of its 28 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deslop

README.md
[![agentmods](https://agentmods.dev/badge/skills/agent-sh/agentsys/deslop.svg)](https://agentmods.dev/skills/agent-sh/agentsys/deslop)
Your own site
<a href="https://agentmods.dev/skills/agent-sh/agentsys/deslop"><img src="https://agentmods.dev/badge/skills/agent-sh/agentsys/deslop.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.01573
Opus 5 $0.00015 $0.00787
Sonnet 5 $0.00006 $0.00315
Haiku 4.5 $0.00003 $0.00157

Measured 5d ago against content hash 9d7e738da879, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

deslop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.kiro/skills/deslop/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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
    });
  }
}

Read the full file on GitHub · 205 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 205 lines · 30 tokens per session scan A 9d7e738da879

Subscribe to this mod's changes

deslop is a skill published in the GitHub repository agent-sh/agentsys (982 stars, last pushed yesterday), licensed MIT. It adds 30 tokens to every session and 1,573 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.