Repo Context Score

Estimate how many tokens your codebase consumes per AI read and what that costs at monthly scale. For engineers deciding whether raw file reads or structured retrieval should feed their agents.

The math: repo size in characters / 4 ≈ tokens per full-repo read, then × reads per day × the per-million input rate for a monthly figure. It's a ceiling, not an average — agents rarely read everything.

Heuristics current as of .

Results

Full ingest tokens (1.3 tokens/line)
32,500
With structured retrieval (5% of full)
1,625
Monthly savings at $3/M tokens (20 reads/day)
$55.57
Context Efficiency Grade
B
Install jCodeMunch to achieve these savings. Structured retrieval reduces context window usage by up to 95%, keeping your AI sessions fast and affordable.

Methodology

Token counts use the ~4 characters per token estimate; verify against your provider's reported counts. The full-repo figure is the worst case: real sessions read a subset of files, but repeated exploration of the same large files trends toward it. Worked example: at $3/M input, a 1M-token repo read costs $3.00 — per read.

FAQ

How is the score computed?
Chars / 4 for the token estimate, multiplied by your read frequency and rate inputs. Nothing is uploaded or scanned server-side — the score is arithmetic on the size and usage numbers you provide.
What are the limitations?
It models full reads at a flat rate: no prompt caching (which discounts repeated reads on some providers), no partial reads, and no distinction between hot files and never-touched ones. Treat the monthly number as an upper bound.
What is structured retrieval?
Symbol-level indexing that serves the agent the specific functions, classes, and signatures a task needs instead of whole files. Vendors in this space make large claims — jCodeMunch, for one, reports up to 95% token reduction — which you should validate on your own repo before relying on.
Which files dominate repo token cost?
Usually the ones agents shouldn't read at all: lockfiles, generated code, vendored dependencies, large fixtures, and minified assets. Excluding them from agent access often cuts the effective repo size more than any retrieval tooling.
When should I use this vs the full audit?
Use this to size repo-read exposure specifically. The full stack audit covers the rest of the per-request cost — CLAUDE.md, MCP overhead, and caching — alongside it.

For your full setup, run the free stack audit — or see the 100-configs report.