Claude Code usage

Token Reducer

Cut Claude token usage by 90%+ — free, open-source, local-first context compression for Claude Code. Hybrid RAG (BM25 + ONNX vectors), AST chunking, reranking. No API needed.

52 stars 7 forksUsage & cost trackers Plugin marketplace Source

Install

Inside Claude Code
/plugin marketplace add Madhan230205/token-reducer

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/Madhan230205/token-reducer.git

From the README

Token Reducer

Cut Claude API costs by 90%+ with intelligent context compression

The open-source alternative to expensive context management tools.

Easy Install • Features • Documentation • Contributing

The Problem

Every time you use Claude with a large codebase, you're paying for thousands of tokens that aren't relevant to your query. Most context management tools either:

- Send everything (expensive)
- Truncate blindly (loses important context)
- Require heavy Language Servers (slow, resource-intensive)

The Solution

Token Reducer is a local-first, intelligent context compression pipeline that:

- Reduces tokens by 90-98% while preserving semantic relevance
- Runs entirely locally — no API calls, no data leaving your machine
- Works in milliseconds — faster than Language Server alternatives
- Understands code semantically — AST parsing, not just text matching

Easy Install

Option 1 — Claude Code /plugin Command (Recommended)

Step 1: Register the marketplace (one-time setup):

This registers the marketplace as Madhan230205-token-reducer.

Step 2: Install:

For project-scoped install:
Already ran Step 1 before? Just run /plugin install token-reducer@Madhan230205-token-reducer — no need to add the marketplace again.

Option 2 — Git Clone (Manual)
Windows users: Replace ~/.claude/plugins/ with %USERPROFILE%\.claude\plugins\

Then open ~/.claude/settings.json and add:

Restart Claude Code. Done.

What requirements-optional.txt installs:

If you skip this step, Token Reducer still works using hash embeddings and regex chunking — no ML libraries required.

Option 3 — Zero-Dependency Quick Start

No pip, no ML libs — runs immediately after cloning:

Features

Core Pipeline
- Hybrid Retrieval — BM25 + semantic vector search with intelligent fallback
- AST-Based…
Read the full README on GitHub

Details

Language
Python
License
MIT
Last updated
2 May 2026
Topics
ai-toolsbm25claude-codeclaude-code-plugincontext-compressioncontext-optimizationcost-optimizationdeveloper-productivityembeddingshybrid-retrievalllmllm-tools

FAQ

What is Token Reducer?

Cut Claude token usage by 90%+ — free, open-source, local-first context compression for Claude Code. Hybrid RAG (BM25 + ONNX vectors), AST chunking, reranking. No API needed. It is a usage for Claude Code, from Madhan230205/token-reducer on GitHub.

How do I install Token Reducer?

Run /plugin marketplace add Madhan230205/token-reducer inside Claude Code, then follow the setup in the README.

Is Token Reducer popular?

Madhan230205/token-reducer has 52 GitHub stars and 7 forks. It was last updated on 2 May 2026.

More usage & cost trackers

Browse the most popular Claude Code mods, all usage & cost trackers, or the skills and MCP server directories.