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

claudeworth

v0.3.0

Published

Is your Claude subscription worth it? Compares your real Claude Code usage against pay-as-you-go API rates and shows your effective discount and value-for-money.

Readme

claudeworth

Is your Claude subscription actually worth it? claudeworth compares your real Claude Code usage against pay-as-you-go API rates and tells you the effective discount you're getting.

$ npx claudeworth

That's it. It reads ~/.claude/projects/ locally, prices every message at Anthropic's published API rates, and opens a browser dashboard.

What it shows

  • Effective multiplier — your API-equivalent value ÷ your prorated subscription cost (e.g. "7.4× this week").
  • Lifetime return — total API-equivalent value extracted vs. subscription actually paid since your first session, as a net dollar figure and a multiplier. Steadier than the single-week number.
  • Last 5 hours — proxy for Claude Code's per-session cap.
  • This week — value vs. break-even, with a monthly pace projection.
  • By project — which repos are eating your subscription (named from each session's real working directory).
  • By model — Opus vs Sonnet vs Haiku split, with per-model cache hit rate.
  • Top sessions — your most expensive sessions, with the model mix that drove the cost.
  • Heatmap — day-of-week × hour-of-day, toggleable between cost and call count, with each day's total down the side. Find your peak hours.
  • All-time stats — lifetime totals, current streak, most expensive single call.
  • Methodology — the exact formula, the pricing table, and a list of any model strings that didn't match (collapsible).

Why another one?

There are already two tools in this space: codeburn and toktrack. Both are good at "here's what your usage cost." Neither answers the question subscribers actually have: am I getting my money's worth, or should I switch to API billing?

claudeworth is built around that one question. Everything on the dashboard ties back to it.

It also fixes one small but expensive bug both other tools appear to share: Opus 4.5/4.6/4.7 quietly dropped from $15/$75 per MTok to $5/$25 per MTok in late 2025. Tools that hardcoded the old rates over-report cost by ~3× on Opus-heavy users.

Privacy

Nothing leaves your machine. No network calls. No telemetry. No accounts. No "sync to cloud."

Your Claude Code session files contain every prompt and response you've ever sent. A tool that ships them anywhere is a privacy disaster. claudeworth reads them, computes locally, writes an HTML file, opens your browser. That's the entire data flow.

You can verify this by reading the source — it's small (6 files, ~1,200 lines of vanilla JS, no dependencies).

Usage

# Open the dashboard (defaults to Max 5x; switch plans with the dropdown in the page)
npx claudeworth

# Set the initial plan via CLI (you can still change it in the dropdown)
npx claudeworth --plan pro     # Claude Pro    ($20/mo)
npx claudeworth --plan max5    # Claude Max 5x ($100/mo)  [default]
npx claudeworth --plan max20   # Claude Max 20x ($200/mo)

# Just write the HTML, don't open the browser
npx claudeworth --no-open --out ./dashboard.html

The plan dropdown at the top of the page lets you compare what your same usage would be worth on each tier — useful for deciding whether to upgrade, downgrade, or stay put.

Requirements

  • Node.js ≥ 18
  • Claude Code installed and used at least once on this machine (so ~/.claude/projects/ exists)

How the value calculation works

For every assistant message in your session logs, claudeworth reads the usage block and applies Anthropic's published rates:

cost = input_tokens          × base_input_rate
     + output_tokens         × base_output_rate
     + cache_read_tokens     × base_input_rate × 0.1
     + cache_5m_write_tokens × base_input_rate × 1.25
     + cache_1h_write_tokens × base_input_rate × 2.0

Cache multipliers and per-model rates: see Anthropic's pricing docs.

Sum it all up, divide by your prorated weekly subscription cost ($23.01/wk for Max 5x), and you have your effective multiplier.

There is no "% of allowance" gauge because Anthropic doesn't publish hard token quotas for the subscription tiers — the limits are described in fuzzy terms ("~225 Sonnet msgs per 5h" for Pro, multiples for Max). claudeworth deliberately doesn't fabricate a percentage; it just shows API-equivalent value.

Known limitations

  • Heuristic 5m/1h cache split: when a message's cache_creation block lacks the 5m/1h breakdown, all cache-create tokens are treated as 5m writes (the default). Slightly under-counts 1h-cache-heavy workloads.
  • Local timezone: days are bucketed in your machine's local timezone. If you work across timezones, the daily/heatmap views may look off.
  • Session cap is a rolling 5h window, not a true Claude Code session anchored at the first message after a 5h gap. Close approximation, not exact.
  • Subscription tier limits aren't enforced — see methodology above.

Contributing / reporting issues

Open an issue or PR on the repo. Particularly useful: model strings that show up under "unknown" in the methodology section.

License

MIT