rag-engineer

rag-engineer is a skill for Claude Code from tranhieutt/software_development_department. It costs 51 tokens per session (674 once invoked), scanned A, a copy of rag-engineer, MIT.

A guide to Retrieval-Augmented Generation, a method where an AI retrieves relevant information before generating an answer. It covers document splitting, embeddings, vector databases, and search design.

In plain words
What is it for?
Use it when building semantic search, document-question answering, embedding pipelines, or other RAG systems.
Why use it?
It helps build retrieval systems that give the AI useful context instead of relying only on its built-in knowledge.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when building semantic search, document-question answering, embedding pipelines, or other RAG systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tranhieutt/software_development_department/rag-engineer
Install

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.

Any agent
npx skills add tranhieutt/software_development_department --skill rag-engineer
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

Made for: Claude Code.

Wrote 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.

agentmods badge for rag-engineer

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/rag-engineer/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/rag-engineer)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/rag-engineer"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/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.

agentmods 80×15 button for rag-engineer

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/rag-engineer"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/rag-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00674
Opus 5 $0.00026 $0.00337
Sonnet 5 $0.00010 $0.00135
Haiku 4.5 $0.00005 $0.00067

Measured 5d ago against content hash 79f1efdaec6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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 5d 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.

Origin

This is a copy

89% identical to rag-engineer — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/rag-engineer/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RAG Engineer

Role: RAG Systems Architect

I bridge the gap between raw documents and LLM understanding. I know that retrieval quality determines generation quality - garbage in, garbage out. I obsess over chunking boundaries, embedding dimensions, and similarity metrics because they make the difference between helpful and hallucinating.

Capabilities

  • Vector embeddings and similarity search
  • Document chunking and preprocessing
  • Retrieval pipeline design
  • Semantic search implementation
  • Context window optimization
  • Hybrid search (keyword + semantic)

Requirements

  • LLM fundamentals
  • Understanding of embeddings
  • Basic NLP concepts

Patterns

Semantic Chunking

Chunk by meaning, not arbitrary token counts

- Use sentence boundaries, not token limits
- Detect topic shifts with embedding similarity
- Preserve document structure (headers, paragraphs)
- Include overlap for context continuity
- Add metadata for filtering

Hierarchical Retrieval

Multi-level retrieval for better precision

- Index at multiple chunk sizes (paragraph, section, document)
- First pass: coarse retrieval for candidates
- Second pass: fine-grained retrieval for precision
- Use parent-child relationships for context

Hybrid Search

Combine semantic and keyword search

- BM25/TF-IDF for keyword matching
- Vector similarity for semantic matching
- Reciprocal Rank Fusion for combining scores
- Weight tuning based on query type

Anti-Patterns

❌ Fixed Chunk Size

❌ Embedding Everything

❌ Ignoring Evaluation

⚠️ Sharp Edges

Issue Severity Solution
Fixed-size chunking breaks sentences and context high Use semantic chunking that respects document structure:
Pure semantic search without metadata pre-filtering medium Implement hybrid filtering:
Using same embedding model for different content types medium Evaluate embeddings per content type:
Using first-stage retrieval results directly medium Add reranking step:
Cramming maximum context into LLM prompt medium Use relevance thresholds:
Not measuring retrieval quality separately from generation high Separate retrieval evaluation:
Not updating embeddings when source documents change medium Implement embedding refresh:
Same retrieval strategy for all query types medium Implement hybrid search:

Read the full file on GitHub · 99 lines

Changes

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.

  1. 5d ago First seen · 99 lines · 51 tokens per session scan A 79f1efdaec6d

Subscribe to this mod's changes

rag-engineer is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 3mo ago), licensed MIT. It adds 51 tokens to every session and 674 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to rag-engineer, differing in 12 lines, and is treated as a copy.

Related

Other skills, from other repositories

cm-deep-search

Optional power-up — detects oversized codebases/docs and suggests tobi/qmd for local semantic search. Bridges cm-continuity (working memory) with long-term document retrieval. Zero-config detection, non-intrusive suggestion.

tody-agent/codymaster · 50 tokens

markitdown

Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 61 tokens

rag-architect

Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines, applying reranking, and evaluating retrieval quality. Use when building RAG systems, vector databases, or knowledge-grounded AI applications requiring semantic…

Jeffallan/claude-skills · 73 tokens

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…

timescale/pg-aiguide · 190 tokens

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…

timescale/pg-aiguide · 162 tokens

bedrock

AWS Bedrock foundation models for generative AI. Use when invoking foundation models, building AI applications, creating embeddings, configuring model access, or implementing RAG patterns.

itsmostafa/aws-agent-skills · 36 tokens