Deslop
Skill brandhaug/skills/deslop
Claude Code skills: deslop (parallel codebase quality sweep) and write-agents-md (intent-layer AGENTS.md hierarchy).
npx -y skills add brandhaug/skills --skill deslopAssembled 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
-
Resolve scope — turn the argument into a concrete file list:
- Empty → full codebase
- All digits or
#N→gh pr view N --json files→ changed files - Branch name →
git diff --name-only <default>...<branch> - Path → use as-is (dir or glob)
-
Compute excludes — build an ignore-list and filter the file list through it:
- Every pattern in
.gitignoreand.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
- Every pattern in
-
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. -
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. -
Launch all 7 agents in parallel — a single message with 7
Agentcalls,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. -
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.mdat the repo root. -
Review with user — summarise from the report: count per category, a few top examples each, total files touched. Point at
deslop-report.mdfor the full list. Ask which categories or files to apply. -
Apply changes (branch + worktree fan-out) — when the user approves:
- Confirm clean working tree. Create branch
deslop/<yyyy-mm-dd>off the current branch. Refuse to edit onmain/master. - For each approved category, spawn an
Agentwithisolation: "worktree"and that category's findings. Each worktree edits independently — no conflicts. - 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.
- Done when the
deslop/<date>branch holds one commit per applied category anddeslop-report.mdrecords every finding as applied, deferred, or quarantined.
- Confirm clean working tree. Create branch
The 7 agents
- Deduplication
- Type consolidation
- Unused code
- Weak types
- Defensive programming
- Legacy / deprecated code
- 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.