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.
git clone --depth 1 https://github.com/latestaiagents/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/commands/latestaiagents/agent-skills/build-rag)<a href="https://agentmods.dev/commands/latestaiagents/agent-skills/build-rag"><img src="https://agentmods.dev/badge/commands/latestaiagents/agent-skills/build-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/commands/latestaiagents/agent-skills/build-rag"><img src="https://agentmods.dev/badge/commands/latestaiagents/agent-skills/build-rag.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.00012 | $0.00506 |
| Opus 5.5 | $0.00005 | $0.00202 |
| Sonnet 5.5 | $0.00002 | $0.00101 |
| Haiku 4.5 | $0.00001 | $0.00051 |
Grade A, and why
build-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 27d 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 — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/build-rag
Build a complete RAG pipeline with best practices.
What I Need
Tell me:
- What documents/data will you be querying?
- What's your use case (Q&A, search, chatbot)?
- Any technology preferences (LangChain, LlamaIndex, custom)?
- Scale expectations (documents, queries/day)?
Workflow
Step 1: Document Processing
I'll help you set up:
- Document loading (PDF, web, database)
- Chunking strategy based on content type
- Metadata extraction
Step 2: Embedding & Indexing
We'll configure:
- Embedding model selection
- Vector store setup
- Index optimization
Step 3: Retrieval Pipeline
I'll implement:
- Basic vector search
- Hybrid search (if needed)
- Reranking layer
Step 4: Generation
We'll build:
- Prompt template
- Context formatting
- Citation handling
Step 5: Evaluation
I'll set up:
- Test dataset creation
- Retrieval metrics
- Quality monitoring
Architecture Options
Simple RAG:
Query → Embed → Search → Context → Generate → Answer
Production RAG:
Query → Cache Check → Hybrid Search → Rerank → Generate → Validate → Cache → Answer
Quick Start Templates
LangChain:
from langchain_chroma import Chroma # pip install langchain-chroma
from langchain_openai import OpenAIEmbeddings, ChatOpenAI
vectorstore = Chroma.from_documents(docs, OpenAIEmbeddings())
retriever = vectorstore.as_retriever(search_kwargs={"k": 5})
llm = ChatOpenAI(model=CHAT_MODEL) # CHAT_MODEL from your config
def answer(question: str) -> str:
context = "\n\n".join(d.page_content for d in retriever.invoke(question))
prompt = f"Answer using only this context. If it is not there, say so.\n\n{context}\n\nQuestion: {question}"
return llm.invoke(prompt).content
LlamaIndex:
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader("data").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
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.
- 27d ago Changed · +2 lines 87c8066782c7
- 2mo ago First seen · 89 lines · 12 tokens per session scan A e542e3b3640c
build-rag is a command published in the GitHub repository latestaiagents/agent-skills (6 stars, last pushed 27d ago), licensed MIT. It adds 12 tokens to every session and 506 once invoked, about $0.0000 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-09-03.
build-rag compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| build-raglatestaiagents/agent-skills | Command | 6 | 27d ago | MIT | A | 12 | Claude Code |
| datasetnvk/llm-wiki | Command | 1.6k | 1mo ago | MIT | A | 30 | Claude Code |
| aiolehsvyrydov/AI-development-team | Command | 18 | 11d ago | MIT | A | 29 | Claude Code |
| fdk-refactorfreshworks-developers/fw-dev-tools | Command | 6 | 2mo ago | MIT | A | 41 | Claude Code |
| checklistgithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 153k | today | MIT | A | 27 | Claude Code |
| specifygithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |