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.5 | $0.00017 | $0.00426 |
| Sonnet 5.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 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 — 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.
- 2mo 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 8mo ago), licensed MIT. It adds 42 tokens to every session and 1,066 once invoked, about $0.0002 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.
rag-engineer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rag-engineerhoangatg/ai-agent-toolkit | Skill | 1 | 8mo ago | MIT | A | 42 | Claude Code, Codex |
| pgvector-semantic-searchtimescale/pg-aiguide | Skill | 1.9k | yesterday | Apache-2.0 | A | 190 | Cursor |
| postgres-hybrid-text-searchtimescale/pg-aiguide | Skill | 1.9k | yesterday | Apache-2.0 | A | 162 | Cursor |
| iterative-retrievalhashgraph-online/awesome-codex-plugins | Skill | 1.6k | 2d ago | Apache-2.0 | A | 19 | Codex |
| building-agentsericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 85 | Claude Code, Codex |
| session-rag-evalchatboxai/chatbox | Skill | 43k | 12d ago | GPL-3.0 | A | 25 | Claude Code, Codex |
| microsoft-extensions-aimanagedcode/dotnet-skills | Skill | 527 | 16d ago | MIT | A | 128 | Claude Code, Codex |