rag-engineer · davila7 — Claude Code skill: RAG pipelines and vector search
A skill for designing RAG systems: document chunking, embeddings, hybrid search and reranking. Useful when answer quality is capped by retrieval quality.
npx claude-code-templates@latest --skill ai-research/rag-engineerWhat rag-engineer does
The skill frames the agent as a RAG systems architect and steers how it works with documents and search: vector embeddings, semantic search, chunking, retrieval pipeline design, hybrid keyword plus semantic search. Inside are patterns and a sharp-edges table with severity and a fix for each row.
The patterns are concrete. Semantic chunking follows sentence boundaries and topic shifts instead of a token limit. Hierarchical retrieval indexes at several chunk sizes, runs a coarse pass for candidates, then a fine-grained pass for precision. Hybrid search pairs BM25 with vector similarity and combines the scores through Reciprocal Rank Fusion.
Anti-patterns get their own section: fixed chunk size, embedding everything, skipping evaluation. The skill tells you to measure retrieval quality separately from generation, because one blended number hides where the pipeline actually breaks. Prerequisites are LLM fundamentals, a grasp of embeddings and basic NLP concepts.
What it helps with
- chunk documents by meaning instead of a token limit
- combine BM25 and vector similarity into one search
- add a reranking step after first-stage retrieval
- measure retrieval quality apart from generation quality
- refresh embeddings when source documents change
Example prompts for the agent
- help me design a retrieval pipeline for RAG over our internal docs
- chunk these documents by sentence boundaries and topic shifts
- build hybrid search with BM25 plus vector similarity and Reciprocal Rank Fusion
How to install rag-engineer
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/rag-engineer2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill rag-engineer -a claude-code3Manually: put the files in place
~/.claude/skills/rag-engineer/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rag-engineer/
Manually: put the files in place
.agents/skills/rag-engineer/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/rag-engineer/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates rag-engineer2Manually: put the files in place
.github/skills/rag-engineer/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/rag-engineerManually: put the files in place
.devin/skills/rag-engineer/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rag-engineer
How do I install rag-engineer in Claude?
Use the templates CLI: npx claude-code-templates@latest --skill ai-research/rag-engineer. Or install through skills: npx skills add davila7/claude-code-templates --skill rag-engineer -a claude-code. The skill lands at ~/.claude/skills/rag-engineer/SKILL.md.
What does rag-engineer do?
It guides the agent through RAG design: chunking, embeddings, hybrid search, reranking and retrieval evaluation. It ships patterns, anti-patterns and a table of sharp edges with fixes.
What background do I need for this skill?
LLM fundamentals, an understanding of embeddings and basic NLP concepts. Without them, patterns like hierarchical retrieval are hard to map onto your own project.
Similar skills
Everything for AI and ML →rag-engineer by other authors comes first.