retrieval-advisor

retrieval-advisor is a skill for Claude Code from bonigarcia/context-engineering. It costs 120 tokens per session (747 once invoked), scanned A, original, Apache-2.0.

A retrieval-pipeline reviewer for applications that give an AI model outside information. RAG, or retrieval-augmented generation, finds relevant pieces of documents and places them in the model's context before it answers.

In plain words
What is it for?
Use it to review document loading, splitting, embeddings, search, filtering, reranking, and prompt assembly, or to choose an approach for a new knowledge source.
Why use it?
It helps identify why retrieved information may be inaccurate, costly, incomplete, or exposed to the wrong users. It also compares retrieval with alternatives such as caching or putting more of the source directly into the prompt.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the context-engineering-skills plugin — 12 skills shipped together

Good fit Use it to review document loading, splitting, embeddings, search, filtering, reranking, and prompt assembly, or to choose an approach for a new knowledge source.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bonigarcia/context-engineering/retrieval-advisor
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.

Any agent
npx skills add bonigarcia/context-engineering --skill retrieval-advisor
Clone the repo
git clone --depth 1 https://github.com/bonigarcia/context-engineering

Made for: Claude Code.

Or install context-engineering-skills, the plugin that ships this one along with the rest of its 12 skills.

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 retrieval-advisor

README.md
[![agentmods](https://agentmods.dev/badge/skills/bonigarcia/context-engineering/retrieval-advisor/github.svg)](https://agentmods.dev/skills/bonigarcia/context-engineering/retrieval-advisor)
Your own site
<a href="https://agentmods.dev/skills/bonigarcia/context-engineering/retrieval-advisor"><img src="https://agentmods.dev/badge/skills/bonigarcia/context-engineering/retrieval-advisor/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 retrieval-advisor

Your own site · 80×15
<a href="https://agentmods.dev/skills/bonigarcia/context-engineering/retrieval-advisor"><img src="https://agentmods.dev/badge/skills/bonigarcia/context-engineering/retrieval-advisor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 747 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.00120 $0.00747
Opus 5.5 $0.00048 $0.00299
Sonnet 5.5 $0.00024 $0.00149
Haiku 4.5 $0.00012 $0.00075

Measured 11d ago against content hash bf6e95bd1b3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

retrieval-advisor 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (examples/small-handbook/ingest.py, examples/support-tickets/retrieve.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/retrieval-advisor/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Retrieval advisor

Decide how this system should bring external knowledge into the model's context, and point out what in the current pipeline hurts answer quality or cost.

Procedure

  1. Identify the knowledge source: its size (pages, documents, or tokens), how often it changes, its structure, and who can see which parts. If the user did not say, infer it from the code or data and state your assumption.
  2. Identify the current approach, if any: how documents are loaded, split, embedded, stored, retrieved, filtered, reranked, and placed in the prompt.
  3. Read references/checklist.md. Use its decision rules to choose a recommendation, and check the pipeline against its review rules.
  4. Write the report described below, with a ## Recommendation section after the findings that explains the choice in a few sentences, including when the recommendation would change.

Report format

Write the report in Markdown, in this order:

  1. ## Summary: two to four sentences on the overall state and the most important change.
  2. ## Findings: one bullet per finding, most severe first, in the form - [severity] location: problem. Fix: suggested fix. (book section). Severity is high when the problem causes wrong or unsafe behavior, medium when it makes results unreliable or costly, and low for clarity or maintenance issues. If there are no problems, write No findings.
  3. Any skill-specific section named in the procedure.
  4. A final fenced json block with the same content, as in this example. Set recommendation to one of these values. rag: retrieve chunks per query. cag: load the whole source once into a cached prefix. context-stuffing: place the whole source in every prompt. hybrid: part of the source in the context and RAG for the rest. Hybrid keyword and vector search is still rag.
{
  "skill": "retrieval-advisor",
  "summary": "...",
  "recommendation": "rag",
  "findings": [
    {
      "severity": "high",
      "location": "ingest.py, chunking",
      "problem": "...",
      "fix": "...",
      "book_section": "Chapter 3, Chunking strategies"
    }
  ]
}

Read the full file on GitHub · 52 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 52 lines · 120 tokens per session scan A bf6e95bd1b3a

Subscribe to this mod's changes

retrieval-advisor is a skill published in the GitHub repository bonigarcia/context-engineering (196 stars, last pushed 2d ago), licensed Apache-2.0. It adds 120 tokens to every session and 747 once invoked, about $0.0005 per session on Opus 5.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-11-19.

Related

retrieval-advisor compared with skills from other repositories

retrieval-advisor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
retrieval-advisorbonigarcia/context-engineeringSkill1962d agoApache-2.0A120Claude Code
documentation-searchcaipe-io/ai-platform-engineeringSkill453todayApache-2.0A46Claude Code, Codex
agent-v3-memory-specialistruvnet/rufloSkill83ktodayMITA25Claude Code
embeddingsruvnet/rufloSkill83ktodayMITA62Claude Code
knowledge-orgbojieli/ai-agent-bookSkill60kyesterdayApache-2.0A96Claude Code, Codex
rag-pipelinebojieli/ai-agent-bookSkill60kyesterdayApache-2.0A125Claude Code, Codex
cdf-curation-and-retrievalNVIDIA/skillsSkill4.2k2d agoApache-2.0A117Claude Code, Codex