rag

rag is a skill for Claude Code from giuseppe-trisciuoglio/developer-kit. It costs 44 tokens per session (1,488 once invoked), scanned A, original, MIT.

A guide to retrieval-augmented generation, a way to answer questions using information retrieved from documents or a knowledge base. It covers splitting documents, creating searchable representations, storing them, and retrieving relevant passages.

In plain words
What is it for?
Use it to build document question-answering tools, semantic search, knowledge-base assistants, or chatbots that retrieve relevant source material.
Why use it?
It helps an AI system use outside documents instead of relying only on its training or memory. This can make answers more grounded in a company's or project's own information.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the developer-kit-ai plugin — 3 skills, 1 command, 1 agent shipped together

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.

agentmods
npx agentmods add skills/giuseppe-trisciuoglio/developer-kit/rag
Any agent
npx skills add giuseppe-trisciuoglio/developer-kit --skill rag
Clone the repo
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit

Made for: Claude Code.

Or install developer-kit-ai, the plugin that ships this one along with the rest of its 3 skills, 1 command, 1 agent.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/rag.svg)](https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/rag)
Your own site
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/rag"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/rag.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,488 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00044 $0.01488
Opus 5 $0.00022 $0.00744
Sonnet 5 $0.00009 $0.00298
Haiku 4.5 $0.00004 $0.00149

Measured 6d ago against content hash 16a91ad8dc01, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rag 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 6d 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.

plugins/developer-kit-ai/skills/rag/SKILL.md · 208 lines

How it starts

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

RAG Implementation

Build Retrieval-Augmented Generation systems that extend AI capabilities with external knowledge sources.

Overview

This skill covers: document processing, embedding generation, vector storage, retrieval configuration, and RAG pipeline implementation.

When to Use

  • Building Q&A systems over proprietary documents
  • Creating chatbots with factual information from knowledge bases
  • Implementing semantic search with natural language queries
  • Reducing hallucinations with grounded, sourced responses
  • Building documentation assistants and research tools
  • Enabling AI systems to access domain-specific knowledge

Instructions

Step 1: Choose Vector Database

Select based on your requirements:

Requirement Recommended
Production scalability Pinecone, Milvus
Open-source Weaviate, Qdrant
Local development Chroma, FAISS
Hybrid search Weaviate with BM25

Step 2: Select Embedding Model

Use Case Model
General purpose text-embedding-ada-002
Fast and lightweight all-MiniLM-L6-v2
Multilingual e5-large-v2
Best performance bge-large-en-v1.5

Step 3: Implement Document Processing Pipeline

  1. Load documents from source (file system, database, API)
  2. Clean and preprocess (remove formatting, normalize text)
  3. Split documents into chunks with appropriate strategy
  4. Generate embeddings for each chunk
  5. Store embeddings in vector database with metadata

Validation: Verify embeddings were generated successfully:

List<Embedding> embeddings = embeddingModel.embedAll(segments);
if (embeddings.isEmpty() || embeddings.get(0).dimension() != expectedDim) {
    throw new IllegalStateException("Embedding generation failed");
}

Step 4: Configure Retrieval Strategy

Choose the appropriate strategy:

  • Dense Retrieval: Semantic similarity via embeddings (default for most cases)
  • Hybrid Search: Dense + sparse retrieval for better coverage
  • Metadata Filtering: Filter by document attributes
  • Reranking: Cross-encoder reranking for high-precision requirements

Read the full file on GitHub · 208 lines

Files

What ships with it

7 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. 6d ago First seen · 208 lines · 44 tokens per session scan A 16a91ad8dc01

Subscribe to this mod's changes

rag is a skill published in the GitHub repository giuseppe-trisciuoglio/developer-kit (338 stars, last pushed 18d ago), licensed MIT. It adds 44 tokens to every session and 1,488 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

unity-llm-integration

Use when adding LLM/chat/RAG features to a Unity game or tool: API keys, prompt assets, safety, latency, and server-side vs client-side calls.

rachitkumarrastogi/unity-mcp-server · 41 tokens

java-spring-ai

Use when the user asks to add AI features, integrate Spring AI or LangChain4J, build a chatbot, implement RAG (retrieval-augmented generation), use vector stores, stream LLM responses, or call AI tools/functions in a Spring Boot project.

ducpm2303/claude-java-plugins · 59 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

llamaindex

Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…

davila7/claude-code-templates · 70 tokens

langchain

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…

davila7/claude-code-templates · 79 tokens

thinking-out-loud

A contract for what the agent does when a long, messy, stream-of-consciousness ramble arrives (usually voice dictation): act on nothing until the echo brief is approved. The echo audits the entire transfer, mission, locked decisions and constraints, open questions, flips and parked tangents, with the model's…

Shubhamsaboo/awesome-llm-apps · 206 tokens