rag-pipeline

rag-pipeline is a skill for Claude Code, Codex from vikasudasi/skill-vault. It costs 25 tokens per session (377 once invoked), scanned A, original, Apache-2.0.

A guide to retrieval-augmented generation, a method where an AI searches your documents before writing an answer. It covers splitting documents, indexing them for search, retrieving relevant passages, and answering from those passages.

In plain words
What is it for?
Use it to build document question-answering systems, searchable knowledge bases, and applications that cite or stay grounded in supplied text.
Why use it?
It helps answers use your current source material instead of relying only on the model’s stored knowledge or making unsupported claims.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build document question-answering systems, searchable knowledge bases, and applications that cite or stay grounded in supplied text.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vikasudasi/skill-vault/rag-pipeline
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 vikasudasi/skill-vault --skill rag-pipeline
Clone the repo
git clone --depth 1 https://github.com/vikasudasi/skill-vault

Made for: Claude Code, Codex.

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-pipeline

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/vikasudasi/skill-vault/rag-pipeline"><img src="https://agentmods.dev/badge/skills/vikasudasi/skill-vault/rag-pipeline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 377 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 original No closer match found 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.00025 $0.00377
Opus 5 $0.00013 $0.00188
Sonnet 5 $0.00005 $0.00075
Haiku 4.5 $0.00003 $0.00038

Measured 9d ago against content hash 6215b93844b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

rag-pipeline 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/minimal_rag.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skill_vault/data/skills/rag-pipeline/SKILL.md · 49 lines

What it actually says

RAG: Retrieval-Augmented Generation

Use when an LLM should answer from your documents instead of its memorized knowledge.

Pipeline

documents -> chunk -> embed -> index
                                  |
query -> embed -> retrieve top-k -> prompt(generated) -> LLM -> grounded answer

Chunking

  • Split on semantic boundaries (headings, paragraphs), not fixed N-char blobs.
  • Keep chunks ~200-500 words — enough context, not noise.
  • Overlap slightly (10-20%) so a concept spanning a boundary isn't lost.

Retrieval

  • Retrieve top-k (5-10) by similarity, then re-rank if the corpus is large.
  • Filter by metadata (scope, tenant, trust) before final ranking (Skill Vault filters scopes + trust tiers after similarity).

Grounded generation prompt

Give the LLM only the retrieved passages + the question, and instruct it to answer from the passages, citing them — and to say it doesn't know rather than hallucinate.

Pitfalls

  • If retrieval returns irrelevant chunks, no prompt fixes it — fix chunking/index first.
  • Don't stuff the entire source into context; that's not RAG, that's context-dumping.
  • Measure retrieval quality (recall@k) separately from answer quality.
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 49 lines · 25 tokens per session scan A 6215b93844b0

Subscribe to this mod's changes

rag-pipeline is a skill published in the GitHub repository vikasudasi/skill-vault (0 stars, last pushed 24d ago), licensed Apache-2.0. It adds 25 tokens to every session and 377 once invoked, about $0.0001 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-08-31.

Related

Other skills, from other repositories