RAG Architect
Jeffallan/claude-skills
Designs retrieval-augmented generation systems: document chunking, embeddings, vector store setup, hybrid search, reranking and retrieval evaluation, with checks at each step.
RAG: embeddings, chunking, hybrid search (BM25+vector), reranking, CRAG, multi-hop.
$ npx skills add softspark/ai-toolkit --skill rag-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install softspark/ai-toolkit rag-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/rag-patterns .claude/skills/rag-patterns && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rag-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/rag-patterns into .claude/skills/rag-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/softspark/ai-toolkit/tree/main/app/skills/rag-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add softspark/ai-toolkit --skill rag-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install softspark/ai-toolkit rag-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/app/skills/rag-patterns .agents/skills/rag-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rag-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/rag-patterns into .agents/skills/rag-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill rag-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install softspark/ai-toolkit rag-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/app/skills/rag-patterns .cursor/skills/rag-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rag-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/rag-patterns into .cursor/skills/rag-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/softspark/ai-toolkit.git --path app/skills/rag-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add softspark/ai-toolkit --skill rag-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install softspark/ai-toolkit rag-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/app/skills/rag-patterns .gemini/skills/rag-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rag-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/rag-patterns into .gemini/skills/rag-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install softspark/ai-toolkit rag-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add softspark/ai-toolkit --skill rag-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .github/skills && cp -r skills-src/app/skills/rag-patterns .github/skills/rag-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rag-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/rag-patterns into .github/skills/rag-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill rag-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install softspark/ai-toolkit rag-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/app/skills/rag-patterns .opencode/skills/rag-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rag-patterns" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/rag-patterns into .opencode/skills/rag-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rag-patternsRAG: embeddings, chunking, hybrid search (BM25+vector), reranking, CRAG, multi-hop.
RAG Patterns is an agent skill from softspark/ai-toolkit. RAG: embeddings, chunking, hybrid search (BM25+vector), reranking, CRAG, multi-hop. Triggers: RAG, embedding, pgvector, Qdrant, Pinecone, Weaviate, reranker, semantic search.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Retrieval-augmented generation, Embeddings and Vector databases. It works with pgvector, Pinecone, Qdrant and Weaviate. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dockerpythonmakeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
RAG Patterns loads about 1.8k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 603 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 603 words, ~1,812 tokens.
.claude/skills/rag-patterns/SKILL.md (or your agent's skills folder).Combine dense (vector) and sparse (BM25) retrieval with RRF fusion:
# RAG-MCP hybrid search
result = await hybrid_search_kb(
query="rate limiting configuration",
service="nginx",
limit=10
)Self-correcting retrieval with relevance validation:
result = await crag_search(
query="fuzzy query",
relevance_threshold=0.4,
max_retries=2
)
# Or via smart_query
result = await smart_query(query="...", use_crag=True)Generate hypothetical answers for better retrieval on conceptual queries:
result = await smart_query(
query="conceptual question about design patterns",
use_hyde=True
)Complex queries requiring multiple retrieval steps:
result = await multi_hop_search(
query="Compare nginx with varnish for Magento cache",
max_hops=3
)
# Or via smart_query
result = await smart_query(query="compare A vs B", use_multi_hop=True)| Aspect | Recommendation |
|---|---|
| Chunk size | 512-1024 tokens |
| Overlap | 10-20% of chunk |
| Structure | Preserve headers, sections |
| Metadata | Include title, path, date, category, tags |
| Frontmatter | YAML with standardized fields |
---
title: "Document Title"
service: {project-name}
category: reference|howto|procedures|troubleshooting|decisions|best-practices
tags: [tag1, tag2, tag3]
last_updated: "YYYY-MM-DD"
---| Tool | Use Case | Speed |
|---|---|---|
smart_query ⭐ | Default for 90% of queries | 2-4s |
hybrid_search_kb | Raw vector + text search | <1s |
get_document | Full document content | <1s |
crag_search | Vague/fuzzy queries | 1-3s |
multi_hop_search | Complex reasoning | 20-30s |
# Default - auto-routing
smart_query("specific technical question")
# Vague query - self-correcting
crag_search("jak to skonfigurować")
# Complex comparison
multi_hop_search("nginx vs varnish performance comparison")
# Known document
get_document(path="kb/reference/architecture.md")| Metric | Description | Target |
|---|---|---|
| Faithfulness | Answer based on context | >70% |
| Relevancy | Answer addresses question | >70% |
| Context Precision | Found context is accurate | >60% |
| Latency (p95) | Response time | <2s |
| Precision@k | Relevant results in top-k | >80% |
# Retrieve more, rerank to top-k
initial_results = await hybrid_search_kb(query, limit=20)
reranked = rerank_results(initial_results, query)
final_results = reranked[:5]❌ Don't:
latest for model versions✅ Do:
scripts/
├── search_core.py # Core search
├── query_enhancements.py # HyDE, query expansion
├── corrective_rag.py # CRAG
├── multi_hop.py # Multi-hop
├── unified_indexer.py # Indexing
└── rag_evaluator.py # EvaluationDirect execution:
# Index KB
make index
# Evaluate RAG
python scripts/evaluate_rag.py
# Detect gaps
python scripts/knowledge_gaps.py --detectDocker execution (if containerized):
# Index KB
docker exec {app-container} make index
# Evaluate RAG
docker exec {api-container} python3 scripts/evaluate_rag.py
# Detect gaps
docker exec {api-container} python3 scripts/knowledge_gaps.py --detecttext-embedding-ada-002) underperform on long technical docs (>8k tokens). For long-form content consider chunking before embedding, not embedding then slicing.bge-reranker) add 100-300ms per query. For real-time UX, rerank only the top-20 candidates, not the top-100./index (task skill)/evaluate (task skill)/architecture-decision for pipeline choicesmart_query() — the tool is already built; reach for this skill only when tuning the underlying index/prompt-caching-patterns or the relevant language skill© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in app/skills/rag-patterns of softspark/ai-toolkit.
Open the folder on GitHubat commit d64db2b
RAG Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| RAG Patterns this skillsoftspark/ai-toolkit | 179 | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| RAG ArchitectJeffallan/claude-skills | 12k | 1 repos | ~2k | Automated safety check: Pass | MIT | |
| RAG Implementationwshobson/agents | 40k | 10 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Hunt RAG Vectorelementalsouls/Claude-BugHunter | 4.8k | — | ~2.6k | Automated safety check: Pass | MIT | |
| Agentsop Multi Tenant RAGagentsope/SkillAlchemy | 459 | — | ~9.8k | Automated safety check: Pass | MIT | |
| Vector DBericrisco/rsc-harness | 167 | — | ~2.8k | Automated safety check: Pass | MIT |
Jeffallan/claude-skills
Designs retrieval-augmented generation systems: document chunking, embeddings, vector store setup, hybrid search, reranking and retrieval evaluation, with checks at each step.
wshobson/agents
Build retrieval-augmented generation systems: pick a vector database and embedding model, choose retrieval and reranking strategies, and start from a LangGraph pipeline.
elementalsouls/Claude-BugHunter
Hunt vector-store / embedding-layer weaknesses in RAG pipelines (OWASP LLM08 Vector and Embedding Weaknesses) — persistent corpus poisoning that survives across sessions and users (distinct from…
agentsope/SkillAlchemy
Security-first SOP for multi-tenant RAG systems. An agent skill from agentsope/SkillAlchemy.
ericrisco/rsc-harness
A skill your agent uses when operating a vector store as a data layer — choosing or migrating between Pinecone, Qdrant, Weaviate and pgvector; designing a collection or index (distance metric…
aiskillstore/marketplace
Expert in vector databases, embedding strategies, and semantic search implementation.
softspark/ai-toolkit
Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.
softspark/ai-toolkit
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Analyzes code quality, complexity, patterns across codebase.
softspark/ai-toolkit
Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.
softspark/ai-toolkit
Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).
Categories
RAG: embeddings, chunking, hybrid search (BM25+vector), reranking, CRAG, multi-hop. RAG Patterns is an agent skill from softspark/ai-toolkit. RAG: embeddings, chunking, hybrid search (BM25+vector), reranking, CRAG, multi-hop.
RAG Patterns fits situations like: tasks that involve Retrieval-augmented generation; tasks that involve Embeddings; tasks that involve Vector databases.
Run `npx skills add softspark/ai-toolkit --skill rag-patterns -a claude-code`. Or copy the skill folder (app/skills/rag-patterns in softspark/ai-toolkit) into .claude/skills/rag-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add softspark/ai-toolkit --skill rag-patterns -a codex`. Or copy the skill folder (app/skills/rag-patterns in softspark/ai-toolkit) into .agents/skills/rag-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill rag-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rag-patterns, .gemini/skills/rag-patterns, .github/skills/rag-patterns and .opencode/skills/rag-patterns in your project.
Going by SKILL.md and its folder, RAG Patterns needs the command-line tools its instructions call (docker, python and make). Our summary lists: Python 3; Docker. Its frontmatter pre-approves these tools: Read.
SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
RAG Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with RAG Patterns: RAG Architect (Jeffallan/claude-skills, 12k stars), RAG Implementation (wshobson/agents, 40k stars), Hunt RAG Vector (elementalsouls/Claude-BugHunter, 4.8k stars) and Agentsop Multi Tenant RAG (agentsope/SkillAlchemy, 459 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.
Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.