Repo Tokens: GitHub Action Adds Token Count Badge for LLM Context Window Awareness

Repo Tokens is a GitHub Action that calculates the token count of your codebase and adds a visual badge to your README indicating how much of a large language model's context window your repository occupies. The goal is to make token size a visible metric, similar to bundle size badges for JavaScript libraries, encouraging leaner codebases that are more compatible with AI coding agents.
How It Works
The action uses tiktoken for tokenization. It runs approximately 60 lines of inline Python and takes about 10 seconds to execute. It's implemented as a composite action.
Configuration and Output
The context window size is configurable, defaulting to 200,000 tokens (matching the size of Claude models). The badge color reflects the percentage of the configured context window your codebase fills:
- Green: Under 30%
- Yellow: 50-70%
- Red: 70%+
The action updates the README file but does not automatically commit the changes, allowing your workflow to control the git strategy.
This type of tool is useful for developers working with AI assistants, as keeping a codebase within an LLM's context window allows the agent to maintain full awareness of the project structure and dependencies during coding tasks.
📖 Read the full source: HN AI Agents
👀 See Also

Cull: Open-Source Dataset Curation Engine for AI Image Pipelines
Cull scrapes images from 340+ sources including Civitai, X/Twitter, Reddit, Discord, and booru sites, classifies them with a vision-language model via local LM Studio or Groq, and sorts into category folders with SD prompts and audit records.

Open Source AI Memory Storage for NodeJS Projects
Mind Palace is an open source memory storage and retrieval system for NodeJS that persists information across LLM chat sessions. It supports major LLMs and vector stores, automatically extracting and vectorizing summarized memories from interactions.

LM Studio plugins add web image analysis for vision-capable LLMs
A developer created plugins for LM Studio that enable vision-capable LLMs to fetch and analyze images from the web, with automatic image processing and tool chaining. The plugins work with models like Qwen 3.5 9b/27b and include updated Duck-Duck-Go and Visit Website functionality.

Nit: A Git Replacement in Zig Optimized for AI Agent Token Efficiency
Nit is a native Git replacement written in Zig that reduces token usage by 35-87% on common commands like status, diff, log, and show. It achieves this through compact output defaults and direct libgit2 integration, eliminating subprocess overhead.