Agent skill

RAG Architect

by borghei in borghei/Claude-Skills

Design RAG pipelines: chunking, retrieval evaluation, and architecture.

MITAuto-check passedAI & LLM Engineering

Install RAG Architect

skills CLI
$ npx skills add borghei/Claude-Skills --skill rag-architect -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install borghei/Claude-Skills rag-architect --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/borghei/Claude-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/rag-architect .claude/skills/rag-architect && rm -rf skills-src

Use ~/.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/

Facts

Skill name
rag-architect
GitHub stars
874
Token cost
~1.8k tokens
SKILL.md length
704 words
Files
9 (incl. references)
Skills in repo
364
Repo updated
First seen
Licence
MIT

At a glance

Design RAG pipelines: chunking, retrieval evaluation, and architecture.

  • Building a RAG system
  • SKILL.md covers Core Capabilities, When to Use, Clarify First and Tools, plus 3 more sections
  • Runs Python scripts from its folder; calls python
  • Selecting a chunking strategy

What it does

RAG Architect is an agent skill from borghei/Claude-Skills. Design RAG pipelines: chunking, retrieval evaluation, and architecture. Use when building a RAG system, selecting a chunking strategy, choosing a vector database, optimizing retrieval quality, or evaluating with RAGAS metrics.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `chunking_optimizer.py`, `rag_pipeline_designer.py` and `references/chunking_strategies_comparison.md`).

It sits in AI & LLM Engineering, covering Retrieval-augmented generation and Vector databases. The repository describes itself as: 385 AI skills, 77 expert agents, and 900 stdlib Python tools for every team: engineering, PM, marketing, C-level, compliance, business ops, research, and a LinkedIn toolkit… The licence is MIT.

When your agent uses it

  • Building a RAG system
  • Selecting a chunking strategy
  • Choosing a vector database
  • Optimizing retrieval quality

Example prompts

  • “/rag-architect”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit c9a1487. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

RAG Architect loads about 1.8k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 704 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~15k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from borghei/Claude-Skills at commit c9a1487, republished under its MIT licence (© borghei). 704 words, ~1,785 tokens.

Download SKILL.mdSave it as .claude/skills/rag-architect/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
rag-architect
description
Design RAG pipelines: chunking, retrieval evaluation, and architecture. Use when building a RAG system, selecting a chunking strategy, choosing a vector database, optimizing retrieval quality, or evaluating with RAGAS metrics.
license
MIT + Commons Clause
metadata.version
1.1.0
metadata.author
borghei
metadata.category
engineering
metadata.domain
ai-ml
metadata.tier
POWERFUL
metadata.updated
2026-06-17

RAG Architect

The agent designs, implements, and optimizes production-grade RAG pipelines, from document chunking through evaluation.

Core Capabilities

  • Chunking strategy selection — match corpus characteristics to fixed-size, sentence, paragraph, semantic, recursive, or document-aware chunking with sized parameters.
  • Embedding & vector-DB choice — pick an embedding model (local vs API) and vector store (Pinecone, Weaviate, Qdrant, Chroma, pgvector) by scale, latency, and cost.
  • Retrieval design — dense, sparse (BM25), or hybrid retrieval with Reciprocal Rank Fusion plus cross-encoder reranking when precision must exceed 0.85.
  • Query transformations — HyDE, multi-query, and step-back techniques for style mismatch and ambiguous queries.
  • Guardrails — PII detection, hallucination/NLI checks, source attribution, confidence scoring, and injection prevention.
  • Evaluation — RAGAS faithfulness/relevance plus IR metrics (Precision@K, Recall@K, MRR, NDCG) with failure analysis.
  • Production patterns — caching, streaming, fallbacks, incremental re-indexing, and cost control.

When to Use

  • Building a RAG system end to end.
  • Selecting a chunking strategy or choosing a vector database.
  • Optimizing retrieval quality or adding reranking.
  • Evaluating a pipeline with RAGAS or IR metrics.

Clarify First

Before designing the pipeline, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • Corpus characteristics — size, document structure, and domain (drives the chunking-strategy selection and parameters)
  • Scale / latency / cost constraints — query volume and budget (selects the embedding model and vector DB)
  • Retrieval precision target — the accuracy bar (precision >0.85 forces hybrid retrieval + cross-encoder reranking)
  • Query types — ambiguous, multi-hop, or style-mismatched (decides which query transforms: HyDE / multi-query / step-back)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Tools

Python tools live at the skill root (no scripts/ dir). Full flags/output formats: references/tool-cli-reference.md.

ToolPurposeCommand
chunking_optimizer.pyAnalyze a corpus and recommend the optimal chunking strategy with parameterspython chunking_optimizer.py ./docs --output results.json
retrieval_evaluator.pyEvaluate retrieval with Precision@K, Recall@K, MRR, NDCG + failure analysispython retrieval_evaluator.py queries.json ./corpus ground_truth.json
rag_pipeline_designer.pyGenerate a full pipeline design, cost projection, and Mermaid diagram from requirementspython rag_pipeline_designer.py requirements.json --output pipeline_design.json

References

Load the reference that matches the task — keep this file lean and pull detail on demand:

  • references/rag-design-guide.md — the 8-step workflow, every selection matrix (chunking, embedding, vector DB, retrieval, query transforms), context-window optimization, RAGAS targets, guardrails, a worked YAML pipeline example, production patterns, common pitfalls, troubleshooting table, and success criteria. Read when designing or debugging a pipeline.
  • references/tool-cli-reference.md — full flag/parameter tables, examples, and output formats for chunking_optimizer.py, retrieval_evaluator.py, and rag_pipeline_designer.py. Read before running the scripts.
  • references/chunking_strategies_comparison.md — deep comparison of the five chunking strategies with size distributions, quality metrics, and domain recommendations. Read when choosing a chunking strategy.
  • references/embedding_model_benchmark.md — benchmark of OpenAI, open-source, specialized, and domain-specific embedding models. Read when selecting an embedding model.
  • references/rag_evaluation_framework.md — full evaluation framework: retrieval/generation/end-to-end dimensions, offline/online/human methodologies, metric implementations. Read when building an evaluation harness.
Show full SKILL.md (245 more words)Show less

Scope & Limitations

This skill covers:

  • End-to-end RAG pipeline architecture design: chunking, embedding, vector storage, retrieval, reranking, and evaluation.
  • Quantitative chunking analysis across four strategy families (fixed-size, sentence, paragraph, semantic).
  • Retrieval quality evaluation using standard IR metrics (Precision@K, Recall@K, MRR, NDCG) with a built-in TF-IDF baseline.
  • Automated pipeline design with component selection, cost projection, and Mermaid architecture diagrams.

This skill does NOT cover:

  • LLM prompt engineering or generation-side optimization -- see engineering/prompt-engineer-toolkit.
  • Database schema design for metadata stores alongside vector databases -- see engineering/database-designer.
  • Production observability, alerting, and SLO dashboards for deployed pipelines -- see engineering/observability-designer.
  • Agent orchestration or multi-step reasoning workflows that sit on top of RAG retrieval -- see engineering/agent-workflow-designer.

Integration Points

SkillIntegrationData Flow
engineering/prompt-engineer-toolkitOptimize system prompts and few-shot examples fed alongside retrieved chunksPipeline design output --> prompt templates that reference chunk format and metadata
engineering/database-designerDesign relational metadata stores (tags, access control, source tracking) paired with the vector databaseVector DB recommendation --> metadata schema for hybrid storage
engineering/observability-designerSet up latency, throughput, and accuracy monitoring for the deployed RAG pipelineEvaluation metrics and SLO targets --> dashboards and alerting rules
engineering/agent-workflow-designerEmbed the RAG retrieval step inside multi-agent reasoning workflowsRetrieval config --> agent tool definition with top-K and threshold parameters
engineering/ci-cd-pipeline-builderAutomate embedding re-indexing, evaluation regression tests, and deployment on document changesEvaluation thresholds --> CI gate that blocks deploys when metrics regress
engineering/api-design-reviewerReview the query and ingestion API surface exposed by the RAG servicePipeline config --> OpenAPI spec review for search and ingest endpoints

© borghei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (references) in engineering/rag-architect of borghei/Claude-Skills.

  • SKILL.md
  • chunking_optimizer.py
  • rag_pipeline_designer.py
  • references/chunking_strategies_comparison.md
  • references/embedding_model_benchmark.md
  • references/rag-design-guide.md
  • references/rag_evaluation_framework.md
  • references/tool-cli-reference.md
  • retrieval_evaluator.py

Open the folder on GitHubat commit c9a1487

Compare with similar skills

RAG Architect 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.

RAG Architect compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
RAG Architect this skillborghei/Claude-Skills874—~1.8kAutomated safety check: PassMIT
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k8 repos~2.3kAutomated safety check: PassMIT
Pgvector Semantic Searchtimescale/pg-aiguide1.9k1 repos~3.8kAutomated safety check: PassApache-2.0
Postgres Hybrid Text Searchtimescale/pg-aiguide1.9k—~3.1kAutomated safety check: PassApache-2.0
RAG Implementationwshobson/agents40k9 repos~1.1kAutomated safety check: PassMIT
Hunt RAG Vectorelementalsouls/Claude-BugHunter4.8k—~2.6kAutomated safety check: PassMIT

Similar skills

  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 8 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Pgvector Semantic Search

    timescale/pg-aiguide

    A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.

    1.9k GitHub starsUsed in 1 repo~3.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Postgres Hybrid Text Search

    timescale/pg-aiguide

    A skill your agent uses to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF).

    1.9k GitHub stars~3.1k tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • RAG Implementation

    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.

    40k GitHub starsUsed in 9 repos~1.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Hunt RAG Vector

    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…

    4.8k GitHub stars~2.6k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Vector DB

    RightNow-AI/openfang

    Vector database expert for embeddings, similarity search, RAG patterns, and indexing strategies

    18k GitHub stars~1k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed

More from borghei/Claude-Skills

All 364 skills in this repo
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    874 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • AI Content Disclosure

    borghei/Claude-Skills

    Check AI-generated marketing content and reviews for required disclosures under the EU AI Act, FTC rules and platform AI-label policies.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • AI Prototyping

    borghei/Claude-Skills

    Idea to AI-generated prototype to customer validation to engineering handoff.

    874 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ansoff Matrix

    borghei/Claude-Skills

    Ansoff Matrix — 4-quadrant framework for growth options: market penetration, market/product development, and diversification.

    874 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Brainstorm Okrs

    borghei/Claude-Skills

    OKR brainstorming and validation using the Radical Focus framework — outcome objectives, measurable key results, counter-metrics.

    874 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Questions about RAG Architect

What does RAG Architect do?

Design RAG pipelines: chunking, retrieval evaluation, and architecture. RAG Architect is an agent skill from borghei/Claude-Skills. Design RAG pipelines: chunking, retrieval evaluation, and architecture.

When should I use RAG Architect?

RAG Architect fits situations like: building a RAG system; selecting a chunking strategy; choosing a vector database; optimizing retrieval quality.

How do I install RAG Architect in Claude Code?

Run `npx skills add borghei/Claude-Skills --skill rag-architect -a claude-code`. Or copy the skill folder (engineering/rag-architect in borghei/Claude-Skills) into .claude/skills/rag-architect in your project. Claude Code loads it when a task matches its description.

How do I install RAG Architect in Codex?

Run `npx skills add borghei/Claude-Skills --skill rag-architect -a codex`. Or copy the skill folder (engineering/rag-architect in borghei/Claude-Skills) into .agents/skills/rag-architect in your project. Codex loads it when a task matches its description.

Can I use RAG Architect in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add borghei/Claude-Skills --skill rag-architect -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-architect, .gemini/skills/rag-architect, .github/skills/rag-architect and .opencode/skills/rag-architect in your project.

What does RAG Architect need to run?

Going by SKILL.md and its folder, RAG Architect needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does RAG Architect access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is RAG Architect safe to install?

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.

What licence does RAG Architect use?

RAG Architect is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does RAG Architect use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to RAG Architect?

Skills that share tags, products or a category with RAG Architect: Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars), Pgvector Semantic Search (timescale/pg-aiguide, 1.9k stars), Postgres Hybrid Text Search (timescale/pg-aiguide, 1.9k stars) and RAG Implementation (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains RAG Architect?

borghei (a GitHub user) maintains it in borghei/Claude-Skills, which has 874 GitHub stars. The repository holds 364 skills in this directory. The repository was last updated on October 7, 2026.

Source: borghei/Claude-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.