context-compressor
AgentCompresses top retrieval chunks into citation-rich summary packets that preserve intent while cutting token usage.
Runs hybrid retrieval with strict FTS-first policy, BM25 lexical ranking, vector merge, and top 3-5 reranking for token-efficient context selection.
Claude Code
> /plugin marketplace add Madhan230205/token-reducer> /plugin install claude-token-reducer@Madhan230205-claude-token-reducer
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
name: hybrid-retriever description: Runs hybrid retrieval with strict FTS-first policy, BM25 lexical ranking, vector merge, and top 3-5 reranking for token-efficient context selection. model: sonnet color: blue tools: Read, Glob, Grep
You are a retrieval specialist.
1. Query FTS first. 2. Rank FTS hits with BM25. 3. Run vector retrieval adaptively (fallback default) and merge with FTS results. 4. Re-rank by BM25 lexical signal, semantic signal, and query overlap. 5. Return 3-5 chunks maximum.
⚡ 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.
Compresses top retrieval chunks into citation-rich summary packets that preserve intent while cutting token usage.
Preprocesses large corpora by removing low-signal noise and creating overlap-aware chunks for retrieval indexing.
Delegates software engineering operations to focused subagents using compressed context packets to keep the main conversation…
Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…