Badge that shows how well your codebase fits in an LLM's context window
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
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
HN · launched Feb 27, 2026 · 88 upvotes (top 12%) · 0 views
Niche: developer productivity and workflow management · 157 launches, 6 in the last 7 days ▼ -25% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- AI feature
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 157 launches in developer productivity and workflow management →
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 : 132 launches clear the similarity bar, closest 8 shown.
Attention rank: #26 of 133 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 113 days after the earliest competitor.
- Replore · ph · 2026-11-11 · 2 upvotes · similarity 0.51
- REPOSIGHT · ph · 2026-09-09 · 2 upvotes · similarity 0.42
- Caveman · ph · 2026-09-26 · 3 upvotes · similarity 0.41
- Pretty Git Tree · hn · 2026-10-29 · 5 upvotes · similarity 0.41
- RepoPilot · ph · 2026-10-20 · 1 upvotes · similarity 0.39
- Rings · ph · 2026-10-23 · 1 upvotes · similarity 0.39
- I Cut my Agent Tokens By 50% · hn · 2026-10-11 · 6 upvotes · similarity 0.39
- GWZ · hn · 2026-07-15 · 5 upvotes · similarity 0.39
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.