A codebase indexing and symbol retrieval for Claude Code token optimization.
Index your project once, then let Claude retrieve precise function signatures, class outlines, and full symbol source — without dumping entire files into context.
npx token-squeeze@latestThis installs the Claude Code plugin and downloads the correct binary for your platform. Restart Claude Code after installing.
If you prefer to build from source (requires .NET 9 SDK):
git clone https://github.com/mpool/token-squeeze.git
cd token-squeeze
./plugin/build.shThen copy the plugin/ contents to ~/.claude/plugins/token-squeeze/.
TokenSqueeze gives Claude Code two interfaces:
The plugin bundles an MCP server (stdio transport) that Claude calls directly — no slash commands needed:
| Tool | Description |
|---|---|
read_file_outline |
Show symbols in a file (functions, classes, methods, types) |
read_symbol_source |
Get the full source of one or more symbols by ID |
search_symbols |
Search symbols by name, signature, or docstring |
| Skill | Description |
|---|---|
/token-squeeze:index |
Index a directory's symbols (run this first) |
/token-squeeze:explore |
Research how code works by tracing implementations |
/token-squeeze:savings |
Estimate tokens saved this session |
Python, JavaScript, TypeScript, C#, C, C++
Source files --> tree-sitter parser --> Symbol index (JSON)
|
Claude Code <-- CLI query commands <-------+
Symbols are stored in <project>/.cache/ as JSON indexes alongside raw source snapshots. Each project's index lives alongside its source code. Claude queries them through the CLI, getting just the symbols it needs instead of reading entire files.