Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/vasilyu1983/AI-Agents-publicnpx agentmods add skills/vasilyu1983/ai-agents-public/ai-ragWrote 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/vasilyu1983/ai-agents-public/ai-rag)<a href="https://agentmods.dev/skills/vasilyu1983/ai-agents-public/ai-rag"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/ai-rag/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/vasilyu1983/ai-agents-public/ai-rag"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/ai-rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Excessive Agency · line 175 Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00034 | $0.05369 |
| Opus 5 | $0.00017 | $0.02684 |
| Sonnet 5 | $0.00007 | $0.01074 |
| Haiku 4.5 | $0.00003 | $0.00537 |
Grade A, and why
ai-rag 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RAG & Retrieval Engineering
Build retrieval systems that are grounded, observable, and explicit about tradeoffs.
This skill covers:
- Retrieval architecture choice: long-context vs hosted file search vs tool-first/MCP vs SQL/graph vs classic vector RAG
- Corpus preparation: parsing, metadata, chunking, ACLs, freshness, invalidation
- Retrieval quality: sparse, dense, hybrid, late interaction, reranking, multimodal retrieval
- Answer quality: grounding, citation coverage, refusal on missing evidence, regression testing
July 2026 posture
- Choose the retrieval mode before tuning chunk size. A vector index is not the default answer to every knowledge problem.
- Separate retrieval quality from answer quality and evaluate both.
- Treat retrieved text, tool responses, and MCP resources as untrusted input.
- Prefer primary sources for vendor or framework recommendations; volatile facts must be verified live.
- Treat OpenTelemetry GenAI semantic conventions as useful but still evolving.
- Context-budget note (Opus 4.7 tokenizer): The Claude Opus 4.7 tokenizer encodes ~1.0–1.35× more tokens than the pre-2026 tokenizer for the same text. Chunk-size and token-budget heuristics from earlier than 2026 are invalid — re-measure on your own corpus with the current tokenizer before setting chunk sizes or context-window budgets.
- Managed retrieval is a real option: Anthropic's
web_search_20260209(andweb_search_20250305) server tools and OpenAI's file-search are API-native retrieval surfaces — evaluate them before building a self-hosted RAG stack. See references/managed-retrieval-vs-self-hosted.md. - Retrieval may not be the right answer at all: if the corpus is small and stable, CAG / long-context / fine-tune may be cheaper and more reliable than RAG. Run the decision rubric in
../ai-context-layer/references/retrieve-vs-preload-vs-finetune.mdbefore building a RAG pipeline.
Scope note: For generation-prompt structure and output contracts after retrieval, use ai-prompt-engineering.
Implementation note: This skill owns retrieval theory and evaluation concepts. For vector-brain builds with paste-ready SQL, pgvector assets, manifests, ingest scripts, and agent retrieval tool contracts, use ai-vector-brain.
What ships with it
60 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.
- agents/openai.yaml 324 B
- assets/chunking/template-basic-chunking.md 857 B
- assets/chunking/template-code-chunking.md 714 B
- assets/chunking/template-long-doc-chunking.md 661 B
- assets/context/template-context-packing.md 725 B
- assets/context/template-grounding.md 638 B
- assets/design/rag-system-design.md 3.8 KB
- assets/eval/backend-comparison-template.json 1.7 KB
- assets/eval/golden-retrieval-cases.jsonl 3.4 KB
- assets/eval/golden-retrieval-predictions.example.jsonl 654 B
- assets/eval/security-redteam-cases.jsonl 1.6 KB
- assets/eval/template-rag-eval.md 1.3 KB
- assets/eval/template-rag-testset.jsonl 326 B
- assets/eval/template-search-eval.md 768 B
- assets/eval/template-search-testset.jsonl 205 B
- assets/indexing/template-index-config.md 962 B
- assets/indexing/template-metadata-schema.md 962 B
- assets/query/template-query-rewrite.md 651 B
- assets/ranking/template-ranking-pipeline.md 888 B
- assets/ranking/template-reranker.md 584 B
- assets/retrieval/template-graph-hybrid-retrieval.md 1.1 KB
- assets/retrieval/template-hybrid-search.md 584 B
- assets/retrieval/template-multimodal-document-retrieval.md 1.0 KB
- assets/retrieval/template-multivector-retrieval.md 982 B
- assets/retrieval/template-reranking.md 609 B
- assets/retrieval/template-retrieval-pipeline.md 909 B
- assets/retrieval/template-tool-first-retrieval.md 1.2 KB
- assets/search/template-bm25-config.md 811 B
- assets/search/template-hnsw-config.md 1.4 KB
- assets/search/template-hybrid-config.md 654 B
- assets/search/template-ivf-config.md 522 B
- data/sources.json 34 KB
- learnings.consolidated.md 582 B
- learnings.md 1.3 KB
- references/abstention-recipe.md 10 KB
- references/advanced-rag-patterns.md 11 KB
- references/agentic-rag-patterns.md 9.4 KB
- references/aws-bedrock-knowledge-bases.md 15 KB
- references/backend-comparison-fixtures.md 2.1 KB
- references/bm25-tuning.md 2.0 KB
- references/chunking-patterns.md 3.5 KB
- references/chunking-strategies.md 4.0 KB
- references/click-models-and-bias-correction.md 18 KB
- references/confidence-scoring.md 13 KB
- references/contextual-retrieval-guide.md 2.3 KB
- references/distributed-search-slos.md 14 KB
- references/embedding-model-guide.md 17 KB
- references/graph-rag-patterns.md 40 KB
- references/grounding-checklists.md 5.5 KB
- references/hybrid-fusion-patterns.md 2.1 KB
- references/index-selection-guide.md 3.5 KB
- references/learning-to-rank-pipeline.md 15 KB
- references/managed-retrieval-vs-self-hosted.md 7.1 KB
- references/multilingual-domain-patterns.md 13 KB
- references/observability-tracing-contract.md 3.0 KB
- references/pdf-heavy-retrieval-playbook.md 3.9 KB
- references/pipeline-architecture.md 5.2 KB
- references/query-rewriting-patterns.md 5.9 KB
- references/quick-start-guide.md 5.8 KB
- references/rag-caching-patterns.md 15 KB
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.
- 8d ago Changed · +1 lines 5cc0e933896b
- 12d ago First seen · 260 lines · 34 tokens per session scan A 77459bf9a2ca
ai-rag is a skill published in the GitHub repository vasilyu1983/AI-Agents-public (87 stars, last pushed 9d ago), licensed MIT. It adds 34 tokens to every session and 5,369 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.
Other skills, from other repositories
continuum-recipes
Copy-pasteable Continuum patterns — RAG, plan-and-execute, ReAct, multi-tenant agents, FastAPI integration, structured output, prompt-injection scanning, custom containers. Invoke when the user asks "how do I do X with Continuum" and X is a common app pattern rather than a single API question.
context-management
Strategies for managing AI agent context windows including optimization, summarization, retrieval-augmented generation, progressive disclosure, and pruning. Use when the user is hitting context limits, building long-running agents, implementing RAG, optimizing token usage, or designing systems that need to manage…
atlas
Architect the intelligence layer for agentic systems — RAG pipelines, model selection, embeddings, evaluation, and knowledge systems. Use when the user says "atlas", "ai data", "data arc". Produces data/ML architecture blueprints.
AgentDB Performance Optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
ReasoningBank with AgentDB
Implement ReasoningBank adaptive learning with AgentDB's 150x faster vector database. Includes trajectory tracking, verdict judgment, memory distillation, and pattern recognition. Use when building self-learning agents, optimizing decision-making, or implementing experience replay systems.
AgentDB Memory Patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.