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

usage-estimate

v0.2.0

Published

Token estimation plugin for Claude Code. Shows estimated token count before submission and optionally blocks prompts exceeding a configurable threshold.

Readme

usage-estimate

npm version license downloads

Token estimation plugin for Claude Code. Shows how many tokens your prompt will consume before it's sent.

Install

Install via the agenthub marketplace:

/plugin marketplace add nullorder/agenthub
/plugin install usage-estimate@agenthub

If you already have agenthub enabled, just run the second command.

To verify it's working, type any prompt and press Enter — you should see an estimated token count (e.g. ~142 tokens) appear as a system message.

What it does

Every prompt you submit shows an estimated token count like ~142 tokens.

If a prompt exceeds the blocking threshold (default: 10,000 tokens), it pauses and asks you to press Enter again to confirm.

Configuration

Set the threshold with a slash command:

/usage-estimate maxToken 5000
/usage-estimate maxToken off
/usage-estimate status

Note: Restart Claude Code after changing the threshold for it to take effect.

Or add to ~/.claude/settings.json manually:

{
  "usage-estimate": {
    "blockThreshold": 10000
  }
}

| Value | Behavior | | ----------------- | ----------------------------------- | | 10000 (default) | Block prompts over 10k tokens | | Any number | Block prompts over that many tokens | | 0 or null | Never block, just show the estimate |

Uninstall

/plugin uninstall usage-estimate@agenthub

How it works

Uses a UserPromptSubmit hook that intercepts prompts after you press Enter but before they're sent to Claude. Tokens are counted locally using js-tiktoken with the gpt-4o (o200k_base) encoding — no API calls, no latency. The count is an approximation (~10-15% margin vs. Claude's actual tokenizer).

License

MIT