shrink-anything
shrink-anything finds dead code, unused files, unused dependencies and unreferenced assets in a codebase, deletes them, and keeps each cut only if your own test command still passes; every cut can be undone byte for byte.
Why it matters
For teams whose repos have grown with agent-written code nobody calls anymore. Less code means smaller builds and fewer tokens for agents to read, and your tests decide what's safe to remove.
Highlights
- shrink-anything go -- npm test (or pytest, cargo test, go test) scans, cuts and re-runs your check; a cut stays only if the check passes and at least as many tests run as before.
- Cuts are applied in batches; if a batch fails it is split until the single breaking cut is found and put back. Tests are never edited.
- Finds dead code in 19 languages by counting name mentions anywhere in the repo, plus dead files, unused npm, pnpm, yarn, bun, Cargo, pip and Go dependencies, and unused or duplicate assets.
- Judgment calls such as duplicates and public methods can be handed to Claude, Codex or any stdin agent with --agent, and kept only if the check agrees.
- Ships as a Claude Code plugin, a built-in MCP server with 8 tools, and a skill file; the author's demo projects shrank 38-56%.unverified
Taken from the project's own README, docs or launch page. Claims about speed or accuracy are the maker's unless stated otherwise.
Worth knowing: Only as safe as your tests: a project without tests gets a scan, not cuts you should trust. Public library exports and convention-loaded files are left alone unless you use --aggressive.
Quick facts
| Pricing | Free |
|---|---|
| Free or paid | Free (open source) |
| License | MIT |
| Language | Rust (npm or cargo install) |
| Platform | CLI; Claude Code plugin; MCP server for Claude Code, Codex, Cursor and others |
| GitHub stars | ★ 248 (as of 2026-11-25) |
| Maker | EL4CTEO (GitHub) |
Links
- Repository: https://github.com/EL4CTEO/shrink-anything
- Release notes: https://github.com/EL4CTEO/shrink-anything/releases
Related ranking
See how established tools compare in Best AI Coding Tools for Developers. New releases aren't scored until we review them against the rubric.
What we couldn't verify
- highlights[4] (demo results are the author's planted-dead-code examples)
Checked 2026-11-25 from the tool's own pages. Prices and star counts change, so confirm on the official site. Listing here is not a ranking or an endorsement.
One email a week on AI that saves business owners time
Every Friday: one tool pick with the business use case, what changed in tools you already use, and the week's AI news in plain English. No spam.
Free. Unsubscribe any time. See our privacy policy.