🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
Local repo context tool for AI chats
AI Badger scans your repo, picks the relevant files, and turns them into prompts you can paste into an AI chat. It is designed for a local, copy-and-paste workflow, so you keep control over what leaves your machine.
Builders who want their agent chat to work with a smaller, more relevant slice of a codebase.
You can give an AI chat precise repo context without wasting tokens on unrelated files.
What it does
Map, extract, apply workflow
Builds a first prompt from your goal, then a second prompt from the files the AI asks for, so you can move from orientation to action in steps.
Local-first context handling
Keeps everything on your machine until you copy it, with no cloud upload, API keys, or telemetry.
Specialized review and design modes
Supports `review` and `design` workflows, plus `badger code`, `badger review`, and `badger design` entry points.
Agent skills
Includes `handoff` and `badger-review` skills for continuing a session or asking for an independent review.
Non-interactive API and integrations
Provides docs for API usage, editor integration, browser handoff, and clipboard support.
How to get it
- 1Run
brew install pvrlabs/tap/badger
- 2Run
curl -fsSL https://raw.githubusercontent.com/PVRLabs/aibadger/main/install.sh | sh
README

AI Badger — Local AI Coding Context Tool
Local-first codebase context extraction for any AI chat (Claude, ChatGPT, Grok, DeepSeek, etc.).
Get precise, token-efficient context on demand without uploading your entire repo or wasting tokens on irrelevant files.
No cloud • No API keys • No telemetry • Fully local
▶ Try Interactive Demo • Install
Map → Extract → Apply: Smart local context bridge that prepares focused codebase snippets for any LLM chat.
How it works
1. Map
Enter your goal. Badger builds a prompt.
↳ You copy it → paste into your AI chat
2. Extract
AI replies asking for specific files.
↳ You copy that → paste back into Badger
3. Apply
Badger fetches those files, builds a second prompt.
↳ You copy it → paste into AI → review before writing
✓ Fully local — nothing leaves your machine until you copy it
✓ You control every paste and every write
Why AI Badger?
- Universal compatibility — Works with any AI chat interface or local model
- Local-first codebase context tool — Complete privacy, no uploads
- Token & cost efficient — Send only relevant context instead of repeatedly feeding the whole repository to cloud models
- Precise & lightweight — Built in Go, fast, minimal overhead
- Specialized modes —
reviewanddesignfor common workflows
Install
Homebrew (Recommended)
brew install pvrlabs/tap/badger
Quick Curl Install
curl -fsSL https://raw.githubusercontent.com/PVRLabs/aibadger/main/install.sh | sh
See docs/install.md for Windows, source builds, and more.
Also available as an official VS Code companion (GitHub).
Agent Skills
Badger includes the handoff and badger-review skills for continuing an AI
coding session or requesting an independent review. See the Agent Skills
guide for installation, usage, and details.
Quick Start
- Run
badgerin your project root. Interactive sessions start in Design focus. - Type your goal (or leave the editor empty and press Enter to explore the project).
- Copy Prompt 1 → paste into your AI chat.
- When the AI asks for files, copy its response → paste back into Badger.
- Copy Prompt 2 → paste back to the AI.
- Paste the AI’s response into Badger → review and apply changes.
Specialized Modes
badger code— explicitly start in Code focusbadger review— Git changes and bounded supporting context for immediate findingsbadger design— explicitly start in Design focus with an empty editor
Full usage: docs/usage.md
Learn More
- Usage Examples & Walkthrough
- Browser Handoff Guide
- Configuration: User limits and external context
- API Reference — Non-interactive commands for editors and scripts
- Agent Integrations — Compact repository orientation for coding agents
- Limitations & Supported Projects
- Privacy & Safety
- Contributing
If AI Badger makes your coding workflow simpler, consider starring the repo ⭐
Files in the repo
- .github
- assets
- cmd
- docs
- internal
- pkg
- scripts
- skills
- .gitignore
- AGENTS.md
- CHANGELOG.md
- go.mod
- go.sum
- install.ps1
- install.sh
- LICENSE
- README.md
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More tools
The best-benchmarked open-source AI memory system. And it's free.
Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
