shrink-anything

EL4CTEO

Finds functions nothing calls, files nothing imports, unused packages and assets in any codebase, then has your coding agent delete them, keeping each cut only if your own test suite still passes.

RustCreated

What is EL4CTEO/shrink-anything?

shrink-anything finds code that nothing uses and deletes it, then runs your own tests after every cut. The README says what passes stays and what breaks is put back, and it describes the whole process as one command that is fully reversible. It targets dead functions, unused files, unused packages and images that nothing shows, the kind of weight that coding agents tend to leave behind.

The tool installs with npm or Cargo and has commands for scanning, cutting, handing judgment calls to an agent, weighing a build, verifying, undoing and reporting. The README says that on its demo app the result is 46 percent fewer tokens for an agent to read. The report command makes a markdown and SVG card for a pull request.

It suits teams whose codebases have grown faster than anyone deletes code, and developers who want a reversible cleanup step tied to their own test suite.

ai-agentsbundle-sizeclaude-codeclicode-cleanupdead-codemcprefactoring