hybrid-retriever

hybrid-retriever is an agent for Claude Code from Madhan230205/token-reducer. It costs 38 tokens per session (130 once invoked), scanned A, original, MIT.

A retrieval workflow that combines exact text search with meaning-based search, ranks the matches, and returns only a few relevant pieces of context. FTS means full-text search, and BM25 is a text-ranking method.

In plain words
What is it for?
Use it to search a knowledge base, combine keyword and vector results, rerank matches, and select three to five context chunks.
Why use it?
It reduces the amount of information passed to the agent while keeping the most relevant results near the top.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the claude-token-reducer plugin — 1 skill, 1 command, 4 agents, 1 hook shipped together

Good fit Use it to search a knowledge base, combine keyword and vector results, rerank matches, and select three to five context chunks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/madhan230205/token-reducer/hybrid-retriever
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Madhan230205/token-reducer

Made for: Claude Code.

Or install claude-token-reducer, the plugin that ships this one along with the rest of its 1 skill, 1 command, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hybrid-retriever

README.md
[![agentmods](https://agentmods.dev/badge/agents/madhan230205/token-reducer/hybrid-retriever/github.svg)](https://agentmods.dev/agents/madhan230205/token-reducer/hybrid-retriever)
Your own site
<a href="https://agentmods.dev/agents/madhan230205/token-reducer/hybrid-retriever"><img src="https://agentmods.dev/badge/agents/madhan230205/token-reducer/hybrid-retriever/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hybrid-retriever

Your own site · 80×15
<a href="https://agentmods.dev/agents/madhan230205/token-reducer/hybrid-retriever"><img src="https://agentmods.dev/badge/agents/madhan230205/token-reducer/hybrid-retriever.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 130 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00130
Opus 5 $0.00019 $0.00065
Sonnet 5 $0.00008 $0.00026
Haiku 4.5 $0.00004 $0.00013

Measured 9d ago against content hash 9cbc960056c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

hybrid-retriever scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/hybrid-retriever.md · 16 lines

What it actually says

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.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 16 lines · 38 tokens per session scan A 9cbc960056c2

Subscribe to this mod's changes

hybrid-retriever is an agent published in the GitHub repository Madhan230205/token-reducer (44 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 130 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

langchain-expert

Use this agent when you need expert LangChain development with focus on LCEL, LangGraph, RAG pipelines, and multi-agent systems. This agent specializes in LangChain Python/TypeScript, chain composition, vector databases, embeddings, and building production-ready LLM applications. Examples: Context: User needs to build…

andisab/swe-marketplace · 400 tokens

data-scientist

Data analysis and pipeline specialist — EDA, feature engineering, data quality, bias auditing, and dataset documentation.

cdeust/ai-architect-mcp-codebase · 26 tokens

experiment-runner

ML experiment design specialist — ablation studies, hyperparameter search, reproducibility, statistical rigor, and result analysis.

cdeust/ai-architect-mcp-codebase · 26 tokens

mlops

ML infrastructure specialist — training pipelines, model serving, GPU optimization, distributed training, and reproducible environments.

cdeust/ai-architect-mcp-codebase · 23 tokens

ai-engineer

Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.

HermeticOrmus/claude-code-game-development · 58 tokens

koshi-librarian

Use proactively when the user wants to index code or documentation and search it with Koshi's BM25 retrieval. Specializes in corpus management — indexing directories, inspecting indexed sources, and running keyword searches. Does NOT manage memories, compile context windows, or score teams.

jsharma1105/Koshi · 59 tokens