Token Reducer: A Claude Code Plugin for Intelligent Context Compression

✍️ OpenClawRadar📅 Published: April 14, 2026🔗 Source
Token Reducer: A Claude Code Plugin for Intelligent Context Compression
Ad

Token Reducer is a Claude Code plugin that addresses the problem of excessive token consumption when working with medium-to-large repositories. The tool processes repository context locally before sending it to Claude, significantly reducing context size without losing relevant code.

How It Works

The plugin uses several techniques to intelligently compress context:

  • AST-based chunking — Parses code into meaningful units (functions, classes, blocks) instead of naive text splitting
  • Hybrid retrieval — Combines BM25 (keyword matching) with vector similarity to find the most relevant chunks
  • TextRank compression — Applies extractive summarization to keep important parts and drop noise
  • Import graph mapping — Traces dependencies so related code stays together
  • 2-hop symbol expansion — When working on function A that calls function B, it automatically pulls in B's context

Performance and Testing

In testing across Python, TypeScript, and JavaScript repositories, the developer reports 90-98% reduction in context size without losing code relevant to the task. The tool was built using Claude itself to iterate on the architecture, starting with a basic chunker and testing against real coding tasks until compression was tight but context-preserving.

Ad

Installation and Availability

Token Reducer is completely free and MIT licensed. To install:

/plugin marketplace add Madhan230205/token-reducer

The source code is available on GitHub at github.com/Madhan230205/token-reducer. The developer is seeking feedback on where compression helps workflows, cases where important context gets dropped, and which languages or repository structures need better handling.

Technical Details

The plugin runs entirely locally with no cloud APIs and no data leaving your machine. It was packaged as a Claude Code plugin after working reliably on the developer's own projects. The repository is open for contributions, with room to optimize for different languages, add smarter caching, or tune retrieval parameters.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also

APEX Testing Benchmark Results: Qwen 3.5 Performance on Real Coding Tasks
Tools

APEX Testing Benchmark Results: Qwen 3.5 Performance on Real Coding Tasks

APEX Testing benchmark results show Qwen 3.5 models' performance on 70 real GitHub coding tasks, with the 397B version dropping to 1194 ELO on master-level tasks while GLM-4.7 quantized leads local models at 1572 ELO.

OpenClawRadar
Framework for AI Teammates in Slack, Operated Entirely from Claude Code
Tools

Framework for AI Teammates in Slack, Operated Entirely from Claude Code

ginnie-agents is an open-source framework for running autonomous AI agents with Slack identities, three-tier memory, cron routines, and work hours — all configured and operated through Claude Code. Requires Claude Code Max, Docker, Node 22+, and a Slack workspace with app creation permissions.

OpenClawRadar
Moving from CLAUDE.md rules to infrastructure enforcement with Citadel
Tools

Moving from CLAUDE.md rules to infrastructure enforcement with Citadel

A developer found that adding more rules to CLAUDE.md beyond about 100 lines reduced compliance, with 40% redundancy in their file. The solution was moving enforcement from instructions to infrastructure using lifecycle hooks, skills, and campaign files, culminating in the open-source Citadel system.

OpenClawRadar
Comparing Multi-Agent AI Systems: Anthropic's Harness vs Agyn's Engineering Org Model
Tools

Comparing Multi-Agent AI Systems: Anthropic's Harness vs Agyn's Engineering Org Model

Anthropic published a harness design for long-running application development, while Agyn's multi-agent system for team-based autonomous software engineering was open-sourced last month. Both systems reject monolithic agents in favor of role separation, structured handoffs, and review loops.

OpenClawRadar