npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@el4cteo/shrink-anything

v0.1.2

Published

Less code, same tests passing: delete the dead code, dead files and unused dependencies in any codebase, and keep each cut only if your own tests still pass.

Readme

shrink-anything finds dead code, files, dependencies and assets, deletes them, and runs your own tests after every cut. What passes stays, what breaks is put back. Fully reversible.

Less code also means less for your agent to read: on the demo app, 46% fewer tokens.

Install

npm i -g @el4cteo/shrink-anything      # or: cargo install shrink-anything

Use

shrink-anything go --agent claude -- npm test     # or pytest, cargo test, go test ./..., any check that fails when the app breaks

Or step by step:

| command | what it does | |---|---| | scan | lists what could go, changes nothing | | cut -- <check> | deletes what's dead, runs your check, puts back what breaks | | task --agent claude | hands judgment calls (duplicates, public methods) to your agent; keeps its work only if the check passes | | weigh dist | where a build's weight is: by file kind, heaviest files, duplicates | | verify | runs your check against the test count from before the first cut | | undo | restores the last cut byte for byte (--all for every cut) | | report | markdown + SVG card for your PR | | status · doctor | current state · installed parsers, package managers, agents |

--agent takes claude, codex, or any command that reads a prompt on stdin. Without it, hand .shrink/TASK.md to any agent.

How it stays safe

  • Your check decides. A cut stays only if the check exits 0 and at least as many tests run as before. A check that already fails is refused.
  • Bad cuts are isolated. Cuts go in batches; a failing batch is split until the one breaking cut is found and put back.
  • Parsed first. Edited files go through the language's own parser (Python, Node, Ruby, PHP, Lua, Bash) before your check runs.
  • Tests are never touched, and undo restores every file byte for byte.
  • Unprovable cuts are skipped. Public methods, library exports, framework-registered classes and convention-loaded files go to your agent, or need --aggressive.

No tests means a scan, not a cut you should trust.

What it finds

| | rule | where | |---|---|---| | dead code | every mention of the name is inside its own definition | 18 languages | | dead files | no other file names it | Python, JS/TS, PHP, Ruby, Dart, Lua/Luau | | unused dependencies | nothing imports it or runs its commands | npm, pnpm, yarn, bun, Cargo, pip, Go modules | | dead weight | images, fonts, sounds nothing names; files stored twice | any project | | duplicates | the same code twice, however it's named or laid out | 18 languages, merged by your agent |

It counts names instead of building a call graph, so it can miss dead code but never invent it.

Languages: Python, JavaScript, TypeScript, Rust, Go, Java, Kotlin, C#, C, C++, PHP, Ruby, Swift, Dart, Lua, Luau, Elixir, Shell. Other text files (HTML, Vue, Svelte, YAML, SQL, templates) are read for mentions. Adding a language is ~20 lines in src/lang.rs.

Libraries keep their public names. The mode is guessed per language and printed; override with --lib or --app.

Results

Demo projects in examples/, with planted dead code:

| project | before | after | |---|---|---| | TypeScript cart | 106 lines, 5 files, 3 deps | 58 lines, 3 files, 1 dep (−45%) | | Python shop | 142 lines, 8 files | 86 lines, 7 files (−39%) | | Go store | 89 lines | 55 lines (−38%) | | Static site (build) | 913 KB | 398 KB (−56%) |

Lighter builds

shrink-anything weigh dist
shrink-anything cut --size dist -- "npm run build && npm test"

Assets in folders served as-is (public/, static/) need --aggressive.

Agent marketplace

Primary entry: .agents/plugins/marketplace.json. Add the marketplace from this repo, then install shrink-anything@shrink-anything. Claude Code and Codex manifests are also included.

# Claude Code
claude plugin marketplace add EL4CTEO/shrink-anything
claude plugin install shrink-anything@shrink-anything
# then /shrink-anything:shrink npm test

# Codex
codex plugin marketplace add EL4CTEO/shrink-anything
codex plugin add shrink-anything@shrink-anything

MCP server (built in): claude mcp add shrink-anything -- shrink-anything mcp. Tools: shrink_scan, shrink_cut, shrink_task, shrink_verify, shrink_undo, shrink_report, shrink_weigh, shrink_status. Skill: skills/shrink-anything.

License

MIT