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 hoangatg/ai-agent-toolkit --skill rag-engineergit clone --depth 1 https://github.com/hoangatg/ai-agent-toolkitWrote 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/hoangatg/ai-agent-toolkit/rag-engineer)<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/rag-engineer"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/rag-engineer/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/hoangatg/ai-agent-toolkit/rag-engineer"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/rag-engineer.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.00042 | $0.01066 |
| Opus 5 | $0.00021 | $0.00533 |
| Sonnet 5 | $0.00008 | $0.00213 |
| Haiku 4.5 | $0.00004 | $0.00107 |
Grade A, and why
rag-engineer 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 — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RAG Engineer
Build AI systems that know what they don't know — and find the right answers.
1. RAG Architecture
Core Pipeline
Query → Embed → Search → Retrieve → Rerank → Augment → Generate → Evaluate
Component Decisions
| Component | Options | Decision Factor |
|---|---|---|
| Embedding | OpenAI, Cohere, local | Cost, latency, quality |
| Vector DB | Pinecone, Weaviate, Chroma, pgvector | Scale, features, cost |
| Chunking | Fixed, semantic, document-aware | Content type, quality needs |
| Retrieval | Dense, sparse, hybrid | Accuracy vs speed |
| Reranking | Cross-encoder, Cohere, ColBERT | Quality vs latency budget |
2. Chunking Strategies
Strategy Selection
| Strategy | Best For | Chunk Size |
|---|---|---|
| Fixed-size | Uniform content | 256-512 tokens |
| Sentence-based | Articles, docs | Natural boundaries |
| Semantic | Mixed content | Meaning boundaries |
| Document-aware | Structured docs | Headers, sections |
| Recursive | Code, markdown | Language-specific splits |
Chunking Principles
| Principle | Application |
|---|---|
| Overlap | 10-20% overlap between chunks |
| Context preservation | Don't split mid-sentence/thought |
| Metadata enrichment | Attach source, section, position |
| Size balance | Not too small (no context), not too large (noise) |
3. Embedding Best Practices
Model Selection
| Factor | Consideration |
|---|---|
| Dimension | Higher = more nuance, more cost |
| Task | Symmetric (search) vs asymmetric (Q&A) |
| Language | Multilingual vs single language |
| Updates | Fine-tunable vs frozen |
Optimization
- Normalize vectors for cosine similarity
- Batch embedding requests for throughput
- Cache frequently accessed embeddings
- Consider dimensionality reduction for scale
4. Retrieval Patterns
Hybrid Search
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 First seen · 165 lines · 42 tokens per session scan A 33a0778f4b03
rag-engineer is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 5mo ago), licensed MIT. It adds 42 tokens to every session and 1,066 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-09-03.
Other skills, from other repositories
pgvector-semantic-search
Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…
postgres-hybrid-text-search
Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…
iterative-retrieval
Pattern for progressively refining context retrieval to solve the subagent context problem.
session-rag-eval
Run and debug Chatbox session attachment RAG model evaluation with synthetic and real long-file fixtures.
microsoft-extensions-ai
Build provider-agnostic .NET AI integrations with Microsoft.Extensions.AI, IChatClient, embeddings, middleware, structured output, vector search, and evaluation. USE FOR: building or reviewing .NET code that uses Microsoft.Extensions.AI, Microsoft.Extensions.AI.Abstractions, IChatClient, IEmbeddingGenerator…
building-agents
Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…