# rag-architect

rag-architect — a skill for Claude Code and Cursor designs RAG pipelines and tunes chunking configurations. It benchmarks retrieval quality using Recall@K and MRR on real queries.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 137 installs · ★ 1183 repo stars
- Author: borghei
- License: LicenseRef-MIT-Commons-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/borghei/Claude-Skills/tree/HEAD/engineering/rag-architect/SKILL.md
- Updated: 2026-11-08
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/borghei-rag-architect

## What it does

The skill architectures retrieval-augmented generation setups and inspects why existing systems fail to return relevant context. Three bundled CLI scripts drive the workflow: `rag_pipeline_designer.py` drafts the component layout with cost estimates, `chunking_optimizer.py` tests 12 chunking modes on corpus samples, and `retrieval_evaluator.py` scores query matches against TF-IDF baselines.

Validation halts without a ground truth dataset of 50 or more real query-document pairs. Running the evaluation script also requires local Python 3 execution directly in the skill directory.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill rag-architect -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/rag-architect/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/rag-architect/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill rag-architect -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/rag-architect/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill rag-architect -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/rag-architect/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install borghei/Claude-Skills engineering/rag-architect/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/rag-architect/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill rag-architect -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/borghei/Claude-Skills --path engineering/rag-architect
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/rag-architect/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill rag-architect -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/borghei/Claude-Skills/tree/HEAD/engineering/rag-architect/SKILL.md

## When to use it
- design an end-to-end RAG architecture with cost estimates
- pick optimal chunking parameters for a specific corpus
- evaluate embedding models against a TF-IDF baseline
- diagnose retrieval failures using Recall@K and MRR metrics

## Example prompts
- Analyze the document corpus in assets/corpus and recommend chunking settings
- Draft a RAG architecture from requirements.json and calculate monthly costs
- Run retrieval evaluation on sample_queries.json against ground truth

## Similar
- [rag-implementer](https://affpapa.org/en/nevibecode/skills/oakoss-rag-implementer.md) — skill · 121 installs
- [rag](https://affpapa.org/en/nevibecode/skills/rag.md) — skill · 3900 installs
- [rag-engineer](https://affpapa.org/en/nevibecode/skills/sickn33-rag-engineer.md) — skill · 1000 installs
- [RAG Implementer](https://affpapa.org/en/nevibecode/skills/rag-implementer.md) — skill · 189 installs
- [langchain-rag](https://affpapa.org/en/nevibecode/skills/langchain-rag.md) — skill · 18600 installs
- [ai-data-engineering-rag-pipeline](https://affpapa.org/en/nevibecode/skills/ai-data-engineering-rag-pipeline.md) — skill · 165 installs

## Other versions with the same name
- [rag-architect · jeffallan](https://affpapa.org/en/nevibecode/skills/httpsgithubcomjeffallan-rag-architect.md) — 5100 installs
- [rag-architect · alirezarezvani](https://affpapa.org/en/nevibecode/skills/rag-architect.md) — 629 installs
- [rag-architect · vasallo94](https://affpapa.org/en/nevibecode/skills/vasallo94-rag-architect.md) — 1 install

From the same set: [borghei/claude-skills](https://affpapa.org/en/nevibecode/by/borghei/claude-skills.md) — 120 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
