deslop — Claude Code plugin: clean up after a change
Scans a change for what went stale: names of deleted files and flags, dead links, copied code. A small model confirms each finding before anything is fixed.
/plugin marketplace add anthropics/claude-plugins-community
/plugin install deslop@claude-communityWhat deslop does
deslop is git-based. It diffs the current branch against its merge base and reads only the lines the change touched, so a clean change costs nothing. The checks cover a lot of ground: stale-mention catches a file, flag or env var the change removed but other files still name; missing-path and broken-anchor flag citations and heading links that resolve to nothing; changelog-missing complains about a user-visible change with no entry under Unreleased. There are also checks for tests with no assertion, added code nothing calls, settings nothing reads, and duplicates of 60 tokens and 6 lines or more.
Every finding goes to scripts/confirm.js, which sends the flagged line plus two neighbours to a small model and keeps only what comes back confirmed. The model is picked in order: --cmd, then DESLOP_SMALL_CMD, then the ladder.small rung in Tower Crane's project.json. Only files inside the repository are read — a path that escapes it or goes through a symlink gets neither context nor a fix.
duplicate-code and complexity skip tests, generated files and snapshot folders. Complexity is measured by the language's own linter: ruff for Python, the repo's eslint for JS/TS, golangci-lint for Go, clippy for Rust. No linter installed means that language lands under skipped, and the check quietly does nothing for it. Logic errors and races are left to a reviewer.
What it helps with
- find names of a file or flag the change deleted
- check that docs examples still run
- catch a test that cannot fail
- remove code copied instead of reused
- keep package versions aligned across manifests
Example prompts for the agent
- Run
/deslopon the current branch and show me the report - Apply the confirmed fixes:
/deslop apply - Check everything under
docs/:/deslop --scope=docs/
How to install deslop
Plugin marketplace
/plugin marketplace add anthropics/claude-plugins-community/plugin install deslop@claude-communityStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about deslop
How do I install deslop in Claude Code?
From the marketplace: run /plugin marketplace add anthropics/claude-plugins-community, then /plugin install deslop@claude-community.
What does deslop do?
It diffs your branch against its merge base and looks for leftovers of the change: stale mentions, dead links, duplicated code, functions grown too large. Confirmed findings can be fixed on request.
Which languages does deslop support?
The complexity check covers JavaScript, TypeScript, Python, Rust, Go and Java through each language's linter. The other checks are language-agnostic.