ClaudeMap

shrink-anything

Deletes dead code, files and dependencies from a repo, running your own tests after every cut — what passes stays, what breaks is put back, and undo restores byte for byte

SDKs & Toolingtoolscleanupdead-codecli

shrink-anything attacks the residue agent-driven development leaves behind: functions nothing calls, files nothing imports, packages nothing uses, images nothing shows — all of it still read by your agent, built by CI and downloaded by users. It finds candidates, deletes them, and runs your own check after every cut: what passes stays, what breaks is put back, one command, fully reversible (undo takes the last cut back byte for byte, --all for every cut). The economics are counted in the report: on the demo app the cuts left 46% fewer tokens for the agent to read on the next task. Commands: scan lists what could go without changing anything; cut -- <check> deletes what is dead and runs your check; task --agent claude hands the judgment calls (duplicates, public methods) to your agent and keeps its work only if the check agrees; weigh dist breaks a build's weight down by file kind and heaviest files; verify reruns your check against the test count from before the first cut; report emits markdown plus an SVG card for your PR. --agent takes claude, codex, or any command that reads a prompt on stdin; without it, the .shrink/TASK.md file is left for whatever agent you use.

What it does

  • scan lists what could go (uncalled functions, unimported files, unused packages, unused images) without changing anything
  • cut -- <check> deletes what is dead and runs your check: what passes stays, what breaks is put back; undo restores byte for byte (--all for every cut)
  • task --agent claude gives the judgment calls to your agent and keeps its work only if the check agrees; --agent also accepts codex or any stdin-reading command
  • weigh dist breaks build weight down by file kind, the heaviest files, and what ships twice; verify reruns your check against the pre-cut test count
  • report emits markdown plus an SVG card sized for a PR; the report counts tokens saved for the next agent task (46% fewer on the demo app)

When to use it

For repos that grew fast under agent-driven development and now carry months of dead weight: run it before a release to shrink what agents read, what CI builds and what users download, with your own test suite as the only judge.

Getting started

npm i -g @el4cteo/shrink-anything
shrink-anything go --agent claude -- npm test

Things to know

The install line offers npm (@el4cteo/shrink-anything) and cargo (shrink-anything) as alternatives. The check after each cut is yours to choose — npm test, pytest, cargo test, go test ./... or anything that fails when the app is broken — so the safety of a cut is exactly the strength of that check. Without --agent, judgment-call tasks land in .shrink/TASK.md for whatever agent you use.

Repository

EL4CTEO/shrink-anything

Charted

Related on the map

  • The open Agent Skills standard — SKILL.md folders any agent can load, governed by the Agentic AI Foundation since 2026-10-22.

    • official
    • spec
    • agent-skills
    • standard
  • Harness Bridge

    SDK / Tool

    A local launcher that points Claude Code and seven other coding harnesses at any OpenAI-, Anthropic- or Responses-compatible endpoint — without editing a single config file.

    • launcher
    • local-models
    • cli
    • menu-bar
  • Claude for Siri

    SDK / Tool

    Answers macOS Spotlight and Siri prompts with your signed-in Claude Code account — an experimental macOS 27 model-delegation provider.

    • macos
    • siri
    • spotlight
    • model-delegation
  • A local privacy gateway for AI coding assistants — masks credentials, connection strings and PII into structured placeholders on the way out, restores them mid-stream on the way back.

    • privacy
    • gateway
    • pii
    • proxy
  • agent-memory

    SDK / Tool

    A long-term memory runtime for AI agents: a markdown store with local ranked retrieval, shared by Claude Code and Codex CLI, no API keys.

    • memory
    • retrieval
    • markdown
    • local-first
  • Codenotch

    SDK / Tool

    A macOS notch app that shows how much of each coding assistant's usage limit you've burned — Claude Code, Cursor, Codex, and more at a glance.

    • macos
    • usage-tracking
    • monitoring
    • desktop-app