agentsclimarketplace

Deslop

Skill brandhaug/skills/deslop

Claude Code skills: deslop (parallel codebase quality sweep) and write-agents-md (intent-layer AGENTS.md hierarchy).

Install
npx -y skills add brandhaug/skills --skill deslop

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Deslop a codebase — launch 7 parallel cleanup agents that sweep the scope for slop, from duplicated and dead code to weak types and AI-generation tells, then consolidate findings and apply approved fixes. Use when the user wants to deslop, strip AI slop, run a cleanup or quality sweep, or prep a PR, branch, or directory for review.

SKILL.md

4.0 KB, 995 tokens by cl100k_base, as published. Nobody here has run it

Deslop

Quick start

/deslop                  # full codebase
/deslop src/api          # directory
/deslop 1234             # PR number (gh)
/deslop feat/new-auth    # branch (diff vs default branch)

Workflow

  1. Resolve scope — turn the argument into a concrete file list:

    • Empty → full codebase
    • All digits or #Ngh pr view N --json files → changed files
    • Branch name → git diff --name-only <default>...<branch>
    • Path → use as-is (dir or glob)
  2. Compute excludes — build an ignore-list and filter the file list through it:

    • Every pattern in .gitignore and .git/info/exclude
    • Build output: dist/, build/, out/, .next/, target/, __pycache__/
    • Vendored / generated: node_modules/, vendor/, .venv/, *.generated.*, *.gen.go, *_pb2.py, __snapshots__/, *.snap
    • Lockfiles
  3. Size check — if scope > 500 files (tunable), stop and prompt the user to narrow: by directory, by churn (git log --since='3 months' --name-only --pretty=format:), or by largest N files. Agents blow their context on huge scopes — don't push through.

  4. Detect tooling — read package.json, tsconfig*.json, pyproject.toml, go.mod, Cargo.toml. Note installed tools (knip, ts-prune, ruff, vulture, staticcheck, clippy). For polyglot repos, bucket files by language; each language gets its own set of 7 agents.

  5. Launch all 7 agents in parallel — a single message with 7 Agent calls, subagent_type: "general-purpose". Each agent's prompt is its section of AGENTS.md with {scope}, {excludes}, {tools} filled in, plus the shared output format. This pass is analysis-only — no file edits, so parallel agents can't conflict. Print [N/7 done: <category>] as each agent returns.

  6. Consolidate findings — merge the reports so every finding from all 7 appears exactly once: deduplicate overlap (agents 1 and 2 often flag the same shared-type issue), group by file, sort by severity. Quarantine findings below 0.7 confidence in a "needs review" section — never auto-applied. Write the full report to deslop-report.md at the repo root.

  7. Review with user — summarise from the report: count per category, a few top examples each, total files touched. Point at deslop-report.md for the full list. Ask which categories or files to apply.

  8. Apply changes (branch + worktree fan-out) — when the user approves:

    1. Confirm clean working tree. Create branch deslop/<yyyy-mm-dd> off the current branch. Refuse to edit on main/master.
    2. For each approved category, spawn an Agent with isolation: "worktree" and that category's findings. Each worktree edits independently — no conflicts.
    3. Merge each worktree back to the cleanup branch in precedence order: deletion (3, 6) → simplification (5, 7) → consolidation (1, 2) → typing (4). Run build + typecheck + tests between each merge; stop and surface on regressions.
    4. Done when the deslop/<date> branch holds one commit per applied category and deslop-report.md records every finding as applied, deferred, or quarantined.

The 7 agents

  1. Deduplication
  2. Type consolidation
  3. Unused code
  4. Weak types
  5. Defensive programming
  6. Legacy / deprecated code
  7. AI slop — comments, over-nesting, style drift

Per-agent prompts: AGENTS.md.

Guardrails

  • Behavior unchanged. Cleanups are refactors, not rewrites — no semantic changes smuggled in unless fixing a clear bug.
  • PR scope stays in scope. Don't propose changes outside the diff unless the user opts in.
  • Bias to deletion over rewriting (agents 3, 5, 6, 7). Surface anything ambiguous.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.