Badge that shows how well your codebase fits in an LLM's context window
Details
- External ID
- 47181471
- Source
- HN
- Company
- —
- Product
- Badge that shows how well your codebase fits in an LLM's context window
- Website domain
- github.com
- Launched
- Feb. 27, 2026
- Cohort
- —
- Upvotes
- 88
- Upvotes percentile
- 0.8800539083557951
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:25 p.m.
- Updated at
- Sept. 7, 2026, 9:25 p.m.
Description
Small codebases were always a good thing. With coding agents, there's now a huge advantage to having a codebase small enough that an agent can hold the full thing in context.Repo Tokens is a GitHub Action that counts your codebase's size in tokens (using tiktoken) and updates a badge in your README. The badge color reflects what percentage of an LLM's context window the codebase fills: green for under 30%, yellow for 50-70%, red for 70%+. Context window size is configurable and defaults to 200k (size of Claude models).It's a composite action. Installs tiktoken, runs ~60 lines of inline Python, takes about 10 seconds. The action updates the README but doesn't commit, so your workflow controls the git strategy.The idea is to make token size a visible metric, like bundle size badges for JS libraries. Hopefully a small nudge to keep codebases lean and agent-friendly.GitHub: https://github.com/qwibitai/nanoclaw/tree/main/repo-tokens
Enrichment
- Theme
- git and repository workflow tools
- Vertical
- Horizontal
- Function
- Dev tools
- Audience
- Developer
- AI stance
- AI feature
- Project type
- Hobby / open-source project
- Normalized one-liner
- measure codebase fit in llm context windows
- Manually corrected
- False
Could you build this?
Yes This is a simple GitHub Action script that reads repository files, runs the public tiktoken library to count tokens, and updates a Shields.io or custom SVG badge.
Discussion
20 comments analyzed.
Competitors mentioned: repomix for source bundling, RAG with AST transformation, uithub.com (open source alternative)
Concerns raised: Token limits hit quickly with inefficient LLM summarization, Metric doesn't reflect practical usage (not all files needed simultaneously), Rewards dynamic languages over typed languages, Penalizes comments and descriptive naming, Entire codebase context may not be necessary or useful
Feature requests: Strip comments from read file tools to reduce tokens, Measure token count for only recently-edited files, Scope AI access to relevant domain areas only, not entire codebase, Support modular design with interface/implementation separation for agents, Integrate with documentation instead of raw codebase
Competitors
Other products that read as similar to this one — 60 launches clear the similarity bar, closest 8 shown.
Attention rank: #8 of 61 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 113 days after the earliest competitor.
- REPOSIGHT · ph · 2026-09-09 · 2 upvotes · similarity 0.41
- Caveman · ph · 2026-09-26 · 3 upvotes · similarity 0.40
- Codebase Posters · hn · 2026-07-12 · 29 upvotes · similarity 0.38
- GWZ · hn · 2026-07-15 · 5 upvotes · similarity 0.38
- tokenchit · ph · 2026-09-07 · 3 upvotes · similarity 0.37
- SlideOps · hn · 2026-08-31 · 23 upvotes · similarity 0.35
- CodeZero · ph · 2026-09-23 · 1 upvotes · similarity 0.35
- A Satellite View for Python Code · hn · 2026-02-09 · 7 upvotes · similarity 0.35
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a dev tools tool for Sales yet.