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

context-receipt

v0.1.0

Published

Your coding agent loads thousands of tokens before your first word. Here's the receipt.

Readme

context-receipt

Claude Code loads ~36k tokens into context before you type a single word. Memory files, instruction files, skill listings, agent listings, tool schemas — all of it spends your context window before your first prompt. This prints the itemized receipt.

npx context-receipt
 CONTEXT RECEIPT
 claude code · vault
 ──────────────────────────────────────────────
 LOADED BEFORE YOUR PROMPT             tokens*
 claude code system prompt               ~6.8k
 built-in tool schemas                   ~2.4k
 CLAUDE.md (global)                       1.5k
 rules/ (3 files, global)                  486
 CLAUDE.md (project chain)                5.5k
 MEMORY.md (auto-memory index)            3.6k
 skill listing, user (115 skills)        10.6k
 skill listing, plugins (31 skills)       2.0k
 agent listing (10 agents)                 407
 ──────────────────────────────────────────────
 TOTAL                                  ~33.5k

 DEAD WEIGHT — on disk, NOT loaded
   AGENTS.md                       17.8k chars
     not read by Claude Code unless @imported from CLAUDE.md

Why care

It's not (only) the cost — startup context is cache-priced after the first message. It's the context-window tax: every always-loaded token brings compaction closer and competes with your actual work for the model's attention. Most setups accrete this invisibly — old memory entries, skills you installed once, rules files you forgot.

And the inverse surprise: dead weight — files you think are loaded that aren't. AGENTS.md sits on disk looking authoritative; Claude Code never reads it unless you @import it from a CLAUDE.md.

Usage

npx context-receipt                  # receipt for the current directory
npx context-receipt ~/code/myproj    # receipt for another project
npx context-receipt --json           # write context-receipt.json (diffable, CI-able)
npx context-receipt --budget 30000   # exit 1 if the estimate exceeds the budget

explain — computed styles for a single file

/context tells you what's loaded now. It can't tell you which instructions apply when Claude touches a specific file:

npx context-receipt explain src/auth/login.ts
 src/auth/login.ts
 inherits 7 instruction layers (~2.0k tokens est)

 1. CLAUDE.md (global)            [1.5k]   always (startup)
 5. CLAUDE.md (project)           [15]     always (startup)
 6. @import docs/extra.md         [4]      always (startup)
 7. CLAUDE.md (src)               [17]     when Claude works in this directory

 OVERLAPPING SECTIONS — same heading in multiple layers,
 all in context at once; review for contradictions:
   "git" — CLAUDE.md, src/CLAUDE.md

It resolves the global + project CLAUDE.md chain, nested per-directory CLAUDE.md files (which load lazily), and one level of @imports — then flags headings that appear in more than one layer, since those are where contradictory rules hide. Honest semantics: Claude Code loads all applicable layers simultaneously; there is no enforced cascade, so explain reports layers and overlaps rather than pretending a precedence engine exists. --json prints the structured version.

Method, honestly

  • Static scan of the same files Claude Code reads: the global and project CLAUDE.md chain (walking up from the project directory), ~/.claude/rules/, one level of @imports, the project's auto-memory MEMORY.md, skill frontmatter (name + description are listed in context at startup), and agent frontmatter.
  • Token counts are estimates (chars ÷ 4). Reconcile against /context inside a live session — that's the ground truth this tool approximates without needing a session.
  • The Claude Code base system prompt and built-in tool schemas can't be derived statically; they're included as constants measured via /context on v2.1.212.
  • Calibration: on the author's setup the static estimate lands within ~8% of the live /context total (33.5k estimated vs 36.3k measured), on the undercount side — your real number is likely a bit worse than the receipt says.

Roadmap

  • Plugin skill counting, real tokenizer, /context auto-reconciliation
  • context-receipt diff between two receipts (did that PR add 4k always-loaded tokens?)
  • Codex CLI, Cursor, Gemini CLI receipts

MIT