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.
npx skills add h4vzz/awesome-ai-agent-skills --skill context-retrievalgit clone --depth 1 https://github.com/h4vzz/awesome-ai-agent-skillsWrote 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.
[](https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/context-retrieval)<a href="https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/context-retrieval"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/context-retrieval/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.
<a href="https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/context-retrieval"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/context-retrieval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00029 | $0.01762 |
| Opus 5 | $0.00015 | $0.00881 |
| Sonnet 5 | $0.00006 | $0.00352 |
| Haiku 4.5 | $0.00003 | $0.00176 |
Grade A, and why
context-retrieval 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.
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.
This is a copy
95% identical to context-retrieval — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Retrieval
Context retrieval is the process of finding and assembling the most relevant pieces of information from a knowledge base to ground an AI agent's responses in factual, up-to-date data. It is the backbone of Retrieval Augmented Generation (RAG) and ensures that generated outputs are accurate and verifiable rather than hallucinated.
Workflow
-
Embed the Query: Convert the user's natural-language query into a dense vector representation using an embedding model (e.g., OpenAI
text-embedding-3-small, Cohereembed-v3, or an open-source model likebge-large). The embedding captures the semantic meaning of the query so it can be compared against stored documents. -
Search the Vector Store: Send the query embedding to a vector database (Pinecone, Weaviate, Qdrant, Chroma, etc.) and perform an approximate nearest-neighbor (ANN) search. Request the top-k candidate chunks, typically k = 10–20 to give the reranker enough material to work with.
-
Rerank the Results: Pass the candidate chunks through a cross-encoder reranker (e.g., Cohere Rerank,
bge-reranker-large, or a ColBERT model). The reranker scores each chunk against the original query with full attention, producing much more accurate relevance scores than cosine similarity alone. Keep the top-n results (typically n = 3–5). -
Assemble the Context Window: Concatenate the selected chunks into a single context block, ordered by relevance score descending. Prepend source metadata (file path, URL, page number) to each chunk so the agent can cite its sources. Ensure the total token count fits the model's budget for the context section of the prompt.
-
Generate the Response: Feed the assembled context into the LLM prompt alongside the original query and a system instruction that tells the model to answer only from the provided context. This grounds the response in retrieved facts and reduces hallucination.
-
Validate and Cite: After generation, verify that the answer references information actually present in the retrieved chunks. Attach inline citations or a references section so the user can trace each claim back to a source document.
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.
- 11d ago First seen · 92 lines · 29 tokens per session scan A 280ff8a93872
context-retrieval is a skill published in the GitHub repository h4vzz/awesome-ai-agent-skills (34 stars, last pushed 2d ago), licensed MIT. It adds 29 tokens to every session and 1,762 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to context-retrieval, differing in 2 lines, and is treated as a copy.
Other skills, from other repositories
llamaindex
Skill "llamaindex" from ashish7802/awesome-api-skills, covering llamaindex skill, ecosystem graph preview, recommended next skills, quick start and production patterns.
pinecone
Pinecone stores vector embeddings for fast similarity search, serving as the memory layer for RAG (Retrieval-Augmented Generation) applications.
cohere
Cohere provides industry-leading semantic search embeddings (Embed v3), document reranking (Rerank v3), and conversational reasoning with citations (Command R+).
qdrant
Qdrant is a production-grade vector similarity search engine with extended payload-based filtering, hybrid search (dense + sparse vectors), and multi-tenant collection partitioning.
mistral
Mistral AI provides frontier open and commercial AI models, featuring mistral-large-latest, mistral-small-latest, codestral-latest for coding, and mistral-embed for semantic search.
weaviate
Weaviate is an open-source AI vector search engine designed for scalable semantic search, multi-modal embeddings, and Retrieval-Augmented Generation (RAG).