Repo Tokens
Dev tools
repository metrics badge
SHOW HN2026
How HN took it
2 positive, 11 neutral or asking, 1 mixed, 12 critical, out of 26 comments about the project. Thread score -0.32.
Idea: 2 for, 10 againstDesign: 0 for, 2 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Token budgets as a visible metric is a useful idea
From 2 comments
Smart idea. Token budgets are becoming the new line count metric for the LLM era.
agentica_ai on HNThis is a really interesting metric to track. I agree with the sentiment that token budgets are becoming the new 'lines of code' metric. Even though context windows are…
ai-christianson on HN
Objections
Large codebases are often useful; the badge conflates size with quality
From 1 comment
Useful and useless (or good and “less good”) aren’t easily mapped to big and small. From a purely UX perspective, showing a red badge seems you’re conflating “less good” with…
nebezb on HN
Whole codebases are rarely loaded into context; agents work on subsets
From 3 comments
For at least some codebases, I'm not sure this is a useful metric. Because you don't usually put the whole codebase in your context at the same time. For example in my current…
Doohickey-d on HNIt’s interesting but I think it’s measuring the wrong thing. Abstraction is a fundamental principle in software. As a human, I’ve worked with classes and modules far larger than…
kccqzy on HNOutside of packages I doubt few of my code bases would fit into this. But the individual domain areas would. I don't care about users in a orders context, I don't care about…
hennell on HN
Context windows are growing, so the metric may age poorly
From 2 comments
Interesting concept, but is it going to age well with context sizes of models are changing all the time (growing, mostly)?
jannniii on HNIt's a fun, in the "style of the time" thing to track, but within a year or two, context window limitations won't be a thing. Doubt me? Think back 2 years. Now compare today.
b112 on HN
Metric rewards dynamic languages and penalizes comments and descriptive names
From 1 comment
Also this rewards dynamic languages over typed languages, penalizes comments, descriptive function names, etc. Though frankly, it'd be interesting to see whether AI would work…
daxfohl on HN
Requests
Measure only files edited recently or relevant modules rather than the whole repo
From 1 comment
For at least some codebases, I'm not sure this is a useful metric. Because you don't usually put the whole codebase in your context at the same time. For example in my current…
Doohickey-d on HN
Bundle with repomix or strip comments before counting
From 2 comments
Interesting idea, but I think it might have made more sense to use something like repomix to generate the source bundle and tiktoken’d that. Practically speaking you don’t send…
t1amat on HNNever thought about the impact of comments, perhaps there is value in stripping those out of read file tools
ciaranmca on HN
Questions
How to count tokens for a plain dump file with basic shell tools
From 1 comment
This is an interesting concept. Thank you for sharing. I have an export.sh or export.ps1 script that takes the relevant files in my repository and puts them in a `dump.txt` file…
collabs on HN
Alternatives named
forgithub.badge, a badge backed by uithub that needs no GitHub Action
From 1 comment
Hi, i just open sourced my alternative at https://github.com/janwilmake/forgithub.badge, which is backed by uithub.com. The advantage is that you don't need a github action to…
janwilmake on HN
repomix for bundling source before counting tokens
From 1 comment
Interesting idea, but I think it might have made more sense to use something like repomix to generate the source bundle and tiktoken’d that. Practically speaking you don’t send…
t1amat on HN
prompttower context creator
From 1 comment
I haven't cared too much about repo tokens in a good while. But my coolest app was a better context creator. I found it hard to extend to actual agentic coding use. Agentic…
ramoz on HN