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 vignesh2027/AI-AGENT-SKILLS --skill rag-system-designgit clone --depth 1 https://github.com/vignesh2027/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/vignesh2027/ai-agent-skills/rag-system-design)<a href="https://agentmods.dev/skills/vignesh2027/ai-agent-skills/rag-system-design"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/rag-system-design/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/vignesh2027/ai-agent-skills/rag-system-design"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/rag-system-design.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.00016 | $0.00945 |
| Opus 5.5 | $0.00006 | $0.00378 |
| Sonnet 5.5 | $0.00003 | $0.00189 |
| Haiku 4.5 | $0.00002 | $0.00094 |
Grade A, and why
rag-system-design 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 2mo 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 — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
RAG systems fail in ways that are hard to see: wrong chunks retrieved, context window overflows, hallucinations on retrieved content, stale knowledge base. This skill builds RAG systems with rigorous evaluation at every layer.
When to Use
- Before building any system that grounds LLM responses in external data
- When an existing RAG system is returning low-quality or inconsistent results
- Before selecting an embedding model or vector database
Process
Step 1: Define the retrieval task
What questions will users ask? What documents will answer them? What does "good retrieval" look like? Write 50+ question-answer pairs as your evaluation set before writing any code.
Step 2: Design the ingestion pipeline
- Source: what documents? In what format? How frequently updated?
- Chunking strategy: fixed-size vs semantic vs structural
- Chunk size: smaller chunks = more precise retrieval; larger = more context per chunk
- Overlap: prevent context from being cut at chunk boundaries
- Metadata: document source, date, section header — critical for filtering and attribution
Step 3: Choose and evaluate the embedding model
Test at least 2 embedding models on your retrieval evaluation set. Measure: retrieval accuracy (does the correct chunk appear in top-k?), latency, cost. Don't default to the most popular model.
Step 4: Build the vector store
- Choose an index type appropriate for scale (exact vs approximate)
- Store metadata alongside vectors
- Plan for updates and deletions (not all vector DBs handle this well)
- Test retrieval latency at your expected query volume
Step 5: Implement retrieval with evaluation
Measure:
- Recall@k: Does the correct document appear in the top k results?
- Precision@k: Of the top k results, how many are relevant?
- MRR: Mean Reciprocal Rank — how highly is the correct document ranked?
Target: Recall@5 > 0.80 on your evaluation set before moving to generation.
Step 6: Design the context assembly
How do you combine retrieved chunks into a prompt context?
- Order matters: LLMs attend more to beginning and end
- Deduplication: don't include the same content twice
- Relevance threshold: don't include low-score chunks just to fill context
- Citation tracking: which chunks supported which claims?
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.
- 2mo ago First seen · 97 lines · 16 tokens per session scan A ebf3c3a952b2
rag-system-design is a skill published in the GitHub repository vignesh2027/AI-AGENT-SKILLS (2 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 945 once invoked, about $0.0001 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-08-31.
rag-system-design compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rag-system-designvignesh2027/AI-AGENT-SKILLS | Skill | 2 | 2mo ago | MIT | A | 16 | Claude Code, Codex |
| knowledge-orgbojieli/ai-agent-book | Skill | 57k | 1mo ago | Apache-2.0 | A | 96 | Claude Code, Codex |
| rag-pipelinebojieli/ai-agent-book | Skill | 57k | 1mo ago | Apache-2.0 | A | 125 | Claude Code, Codex |
| 801-regulations-eu-ai-actjabrena/plinth | Skill | 461 | yesterday | Apache-2.0 | A | 108 | Claude Code, Codex |
| rag-assistantMerkyorLynn/Lynn | Skill | 67 | 7d ago | Apache-2.0 | A | 41 | Claude Code, Codex |
| audit-langfuse-llmkensaurus/cursor-kenji | Skill | 9 | 1mo ago | MIT | A | 73 | Claude Code |
| audit-llm-securitykensaurus/cursor-kenji | Skill | 9 | 1mo ago | MIT | B | 67 | Claude Code |