rag-pipeline-designer

rag-pipeline-designer is a skill for Claude Code, Codex from JayRHa/AgentSkills. It costs 121 tokens per session (2,449 once invoked), scanned A, original, MIT.

A design method for retrieval-augmented generation (RAG), where a language model first searches a document collection and uses the retrieved passages to form an answer. It covers how documents are split, indexed, found, ranked, and evaluated.

In plain words
What is it for?
Use it to plan or improve document-question-answering systems, including chunking, embeddings, vector or keyword search, reranking, prompt assembly, and offline evaluation.
Why use it?
It helps prevent the search stages from losing relevant information and provides a way to measure whether the system retrieves and uses the right material.

Skill for Claude CodeCodex

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

Good fit Use it to plan or improve document-question-answering systems, including chunking, embeddings, vector or keyword search, reranking, prompt assembly, and offline evaluation.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jayrha/agentskills/rag-pipeline-designer.svg)](https://agentmods.dev/skills/jayrha/agentskills/rag-pipeline-designer)
Your own site
<a href="https://agentmods.dev/skills/jayrha/agentskills/rag-pipeline-designer"><img src="https://agentmods.dev/badge/skills/jayrha/agentskills/rag-pipeline-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,449 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.00121 $0.02449
Opus 5 $0.00060 $0.01224
Sonnet 5 $0.00024 $0.00490
Haiku 4.5 $0.00012 $0.00245

Measured 7d ago against content hash 4fd7d32e67ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/chunk_text.py, scripts/eval_retrieval.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.

rag-pipeline-designer/SKILL.md · 124 lines

How it starts

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

RAG Pipeline Designer

Overview

Keywords: RAG, retrieval-augmented generation, chunking, embeddings, vector database, hybrid search, BM25, dense retrieval, reranking, cross-encoder, recall@k, MRR, nDCG, faithfulness, context window, query expansion, semantic search.

This skill turns a vague "we want to do RAG over our docs" into a concrete, defensible architecture with tradeoffs made explicit. A RAG pipeline is a sequence of lossy stages — each stage can silently throw away the right answer. The job is to identify which stage is failing (or will fail) and pick components that fit the corpus, query distribution, latency budget, and cost ceiling.

Treat RAG design as five decisions made in order, with evaluation wrapped around all of them:

  1. Ingestion & chunking — how documents become retrievable units.
  2. Embedding & indexing — how units become searchable vectors (and/or keyword index).
  3. Retrieval — how a query fetches candidates.
  4. Reranking & context assembly — how candidates are ordered and packed into the prompt.
  5. Generation — how the LLM is grounded and constrained.
  6. Evaluation — how you prove each stage works, offline, before shipping.

Read references/component-catalog.md for concrete component options and references/evaluation-metrics.md for the metric definitions. Use scripts/chunk_text.py to produce candidate chunkings and scripts/eval_retrieval.py to score retrieval against a labeled set. Fill in templates/rag-design-doc.md to capture the final design. See examples/support-kb-rag.md for a complete worked design.

Workflow

Follow these steps. Do not skip evaluation — a RAG system without an eval set is undebuggable.

  1. Characterize the corpus and queries. Before choosing anything, answer: How many documents and total tokens? What format (PDF, HTML, Markdown, code, tables, transcripts)? How long is a typical document? Are answers usually in one place or scattered? What do real user queries look like — keyword lookups, natural questions, multi-hop? What is the latency budget (interactive <1s vs batch) and cost ceiling? Capture answers in the design doc's "Context" section.

Read the full file on GitHub · 124 lines

Files

What ships with it

6 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. 7d ago First seen · 124 lines · 121 tokens per session scan A 4fd7d32e67ae

Subscribe to this mod's changes

rag-pipeline-designer is a skill published in the GitHub repository JayRHa/AgentSkills (5 stars, last pushed 1mo ago), licensed MIT. It adds 121 tokens to every session and 2,449 once invoked, about $0.0006 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.