rag-skills
v1.0.1
Published
Agent skills for RAG: chunking strategies, retrieval methods, vector databases, and performance optimization
Maintainers
Readme
Rag-skills
A modular collection of best-practice guides and skill definitions for building Retrieval-Augmented Generation (RAG) systems. Designed for AI coding agents, agent frameworks, and teams that want a structured way to route RAG work to the right strategy.
Overview
RAG-skills consolidates actionable skills that help AI agents and builders improve RAG performance, choose appropriate vector databases, implement effective chunking strategies, optimize retrieval quality, and orchestrate multi-step RAG workflows.
Installation
Claude Code
Add this repository as a Claude Code plugin marketplace:
/plugin marketplace add Goodnight77/rag-skillsThen install the RAG skills plugin:
/plugin install rag-skills@rag-skillsRestart Claude Code after installation.
Skills CLI
Install with the Skills CLI:
npx skills add Goodnight77/rag-skillsThis installs the root SKILL.md plus the native skill tree under
skills/. Claude Code can discover category skills such as
/chunking and specific skills such as /semantic-chunking.
Manual Usage
You can also clone the repository and reference the Markdown skills directly:
git clone https://github.com/Goodnight77/rag-skills.gitThen point your agent or coding assistant to the skills/ directory.
Note: This repository follows the Claude Code/Qdrant-style structure: category routers live at paths like
skills/chunking/SKILL.md, and specific skills live at paths likeskills/chunking/semantic-chunking/SKILL.md.
Skills by Decision Area
This repo is organized as a routing layer for RAG work. Agents can use the category and metadata in each skill file to decide which path to follow for a given problem, instead of treating the repo like a generic reference manual.
Chunking
Use these when the main problem is how to split source material into retrievable units.
- Semantic Chunking - Chunk documents based on semantic boundaries
- Hierarchical Chunking - Multi-level chunking for nested structures
- Sliding Window Chunking - Overlap-based chunking for context preservation
- Contextual Chunk Headers - Adding higher-level context to chunks
Vector Databases
Use these when the main problem is choosing or operating the storage layer for embeddings and metadata.
- Qdrant Setup for RAG - Setting up Qdrant for RAG
- Qdrant for Production RAG - Scaling RAG with Qdrant
- Choosing Vector DB by Datatype - Database selection guide
Retrieval Strategies
Use these when the main problem is search quality, ranking, recall, or combining search methods.
- Hybrid Search BM25 Dense - Combining keyword and semantic search
- Multi-Pass Retrieval with Reranking - Two-pass retrieval with cross-encoder reranking
- Query Transformation Strategies - Query rewriting, step-back prompting, sub-query decomposition
- HyDE - Hypothetical Document Embeddings - Query expansion with LLM-generated documents
- HyPE - Hypothetical Prompt Embeddings - Precomputed question embeddings at indexing time
- Self-RAG - Self-reflective retrieval with relevance evaluation
- RAPTOR - Hierarchical Retrieval - Multi-level tree of document summaries
- Context Enrichment Window - Adding surrounding chunks to retrieved results
- Adaptive Retrieval - Dynamic strategy selection based on query type
- Explainable Retrieval with Citations - Traceability and source attribution
- CRAG - Corrective RAG - Dynamic correction with web search
- Graph RAG - Knowledge graph-based retrieval
Data Type Handling
Use these when the source content is code, APIs, diagrams, tables, or mixed media.
- RAG for Code Documentation - Special handling for code and technical docs
- RAG for Multimodal Content - Images, tables, and mixed media
Performance Optimization
Use these when the problem is latency, throughput, cache behavior, or production efficiency.
- Optimize Retrieval Latency - Caching, indexing, and query optimization
RAG Agents
Use these when the problem is orchestration, delegation, or multi-step workflows.
- See Examples for multi-agent workflows
Deployment
Use these when the problem is production rollout, reliability, or operationalization.
Evaluation Metrics
Use these when the problem is measurement, regression detection, or retrieval benchmarking.
- Coming soon
Quick Start
For AI Agents
Read the frontmatter metadata, then route to the skill that best matches the user’s problem. Treat the repo as a decision tree for RAG tasks: chunking, retrieval, vector store choice, embeddings, performance, and workflow orchestration.
For Framework Integration
Build a lightweight index from the markdown frontmatter and use it to filter by category, tags, and task type. The goal is not to mirror all content in code, but to point an agent to the right skill or external implementation quickly.
Keep examples in the repo lightweight and point readers to external implementations instead of embedding long code samples.
Examples
Complete walkthroughs and reference implementations:
- Foundational RAG Pipeline Example - A guided RAG build path for agents and builders
- Multi-Agent RAG - An orchestration pattern for specialized agents
- Production RAG Setup - A deployment-oriented route for production systems
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick Contribution Steps
- Fork the repository
- Create a new skill file using templates/skill-template.md
- Ensure your skill follows the required structure
- Run validation:
python scripts/validate-skills.py - Submit a pull request
Skill File Format
Each skill follows a consistent structure with a short illustrative snippet, not a full implementation. See the template in templates/skill-template.md.
Scripts
validate-skills.py— Validate all skill files for format compliancegenerate-index.py— Generate browsable INDEX.md and SKILLS.json
Project Status
This is an active open-source project. Skills are continuously added and updated as RAG best practices evolve.
Current statistics:
- Native Skills: 28
- Guide Skills: 23
- Category Router Skills: 5
- Categories: 5
- Examples: 3
Run python scripts/generate-index.py for current statistics.
Acknowledgments
Built for the RAG community. Special thanks to contributors and the open-source RAG ecosystem.
License
MIT License — see LICENSE for details.
