rag-pipelines

rag-pipelines is a skill for Claude Code, Codex from jnPiyush/AgentX. It costs 46 tokens per session (2,759 once invoked), scanned A, original, Apache-2.0.

A guide to building question-answering systems that first retrieve relevant source material and then ask a language model to answer from it. RAG means retrieval-augmented generation.

In plain words
What is it for?
Use it to build document search and question-answering systems, including systems for reports, research papers, code repositories, and PDFs with tables or images.
Why use it?
It helps reduce answers based only on a model's memory by grounding responses in documents, code, or other approved information. It covers how to split, index, find, rank, and use that material.

Skill for Claude CodeCodex

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

Good fit Use it to build document search and question-answering systems, including systems for reports, research papers, code repositories, and PDFs with tables or images.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnpiyush/agentx/rag-pipelines"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/rag-pipelines.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,759 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00046 $0.02759
Opus 5.5 $0.00018 $0.01104
Sonnet 5.5 $0.00009 $0.00552
Haiku 4.5 $0.00005 $0.00276

Measured 1mo ago against content hash c1d080a58f61, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rag-pipelines 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 1mo 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.

.github/skills/ai-systems/rag-pipelines/SKILL.md · 304 lines

How it starts

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

RAG Pipelines

Purpose: Build production-grade Retrieval-Augmented Generation systems that ground LLM responses in authoritative knowledge.


When to Use This Skill

  • Building document Q&A systems grounded in enterprise knowledge
  • Implementing semantic search over unstructured documents
  • Designing chunking strategies for different document types
  • Selecting and configuring vector databases for retrieval
  • Implementing hybrid search (keyword + semantic) and reranking
  • Optimizing retrieval quality (precision, recall, faithfulness)

Prerequisites

  • Document corpus to index
  • Embedding model access (OpenAI, Azure OpenAI, or open-source)
  • Vector store or search service
  • LLM for generation

Decision Tree

Building a RAG system?
+- What type of documents?
|  +- Short, structured (FAQ, KB articles)?
|     -> Small chunks (256-512 tokens), simple splitting
|  +- Long, unstructured (reports, papers)?
|     -> Semantic chunking, hierarchical retrieval
|  +- Code repositories?
|     -> AST-aware chunking, function-level
|  +- Multi-modal (PDFs with tables/images)?
|     -> Document intelligence + specialized parsers
+- What query patterns?
|  +- Exact lookups? -> Keyword search (BM25)
|  +- Semantic similarity? -> Vector search
|  +- Both? -> Hybrid search (recommended default)
+- Need high precision?
|  +- Add reranking (cross-encoder or Cohere Rerank)
|  +- Add metadata filtering (date, source, category)
+- Scale considerations?
   +- <100K docs -> Single vector store, simple pipeline
   +- 100K-10M docs -> Hybrid search + reranking + caching
   +- >10M docs -> Distributed index, tiered retrieval, pre-filtering

RAG Architecture

Standard Pipeline

[Documents] -> [Parser/Loader] -> [Chunker] -> [Embedder] -> [Vector Store]
                                                                    |
[User Query] -> [Embedder] -> [Retriever] -> [Reranker] -> [Top-K Contexts]
                                                                    |
                                    [Prompt Builder] <- [System Prompt + Template]
                                           |
                                    [LLM Generation]
                                           |
                                    [Response + Citations]

Read the full file on GitHub · 304 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. 1mo ago Changed c1d080a58f61
  2. 1mo ago First seen · 304 lines · 46 tokens per session scan A f8054efc76f8

Subscribe to this mod's changes

rag-pipelines is a skill published in the GitHub repository jnPiyush/AgentX (16 stars, last pushed 3d ago), licensed Apache-2.0. It adds 46 tokens to every session and 2,759 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.

Related

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens