rag-architect

rag-architect is a skill for Claude Code from JoaoEquer/Oficina. It costs 104 tokens per session (1,117 once invoked), scanned A, original, MIT.

A design guide for retrieval-augmented generation (RAG), where an AI system searches a document collection before answering. It covers document splitting, embedding models, vector databases, and tests of search quality.

In plain words
What is it for?
Use it to design or tune a RAG pipeline, choose a chunking approach or vector database, and measure retrieval with metrics such as precision and recall.
Why use it?
It replaces guesswork about how to prepare documents and choose a search store with measurements on the actual collection. It also requires checking whether retrieved results are accurate and complete.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the oficina plugin — 16 skills, 5 commands shipped together

Good fit Use it to design or tune a RAG pipeline, choose a chunking approach or vector database, and measure retrieval with metrics such as precision and recall.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joaoequer/oficina/rag-architect
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.

Any agent
npx skills add JoaoEquer/Oficina --skill rag-architect
Clone the repo
git clone --depth 1 https://github.com/JoaoEquer/Oficina

Made for: Claude Code.

Or install oficina, the plugin that ships this one along with the rest of its 16 skills, 5 commands.

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-architect

README.md
[![agentmods](https://agentmods.dev/badge/skills/joaoequer/oficina/rag-architect/github.svg)](https://agentmods.dev/skills/joaoequer/oficina/rag-architect)
Your own site
<a href="https://agentmods.dev/skills/joaoequer/oficina/rag-architect"><img src="https://agentmods.dev/badge/skills/joaoequer/oficina/rag-architect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rag-architect

Your own site · 80×15
<a href="https://agentmods.dev/skills/joaoequer/oficina/rag-architect"><img src="https://agentmods.dev/badge/skills/joaoequer/oficina/rag-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00104 $0.01117
Opus 5.5 $0.00042 $0.00447
Sonnet 5.5 $0.00021 $0.00223
Haiku 4.5 $0.00010 $0.00112

Measured 1mo ago against content hash 5cdf05a3ea56, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rag-architect 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 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (chunking_optimizer.py, rag_pipeline_designer.py, retrieval_evaluator.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/rag-architect/SKILL.md · 72 lines

How it starts

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

RAG Architect

Design, tune, and evaluate production RAG pipelines with three deterministic tools. Run the tools against the actual corpus and requirements — do not pick chunk sizes or databases by intuition.

Hard rules

  1. Never present model names or vendor prices as current facts. Embedding models and vector-DB pricing rot in months. Recommend a tier (see table below), name a current-generation candidate, and tell the user to verify against the provider's live pricing page.
  2. Every design ends with an evaluation run. A RAG design without retrieval_evaluator.py numbers is a hypothesis, not a deliverable.
  3. Chunking is corpus-driven. Run chunking_optimizer.py on the real documents before choosing a strategy.

Embedding model tiers (pattern, not price list)

Tier Current-generation examples (verify before use) When
Fast / self-hosted all-MiniLM-L6-v2, bge-small Cost-sensitive, small scale, real-time
Balanced open all-mpnet-base-v2, bge-large, e5-large Quality without API dependency
Quality API text-embedding-3-large, voyage-3-large Accuracy-priority general retrieval
Code voyage-code-3, CodeBERT-family Code search corpora

Pricing discipline: build the cost model with a placeholder table — columns model | $/1M tokens (verify) | dims | as-of date — and have the user fill in live numbers. Same for vector DBs (Pinecone/Weaviate/Qdrant/Chroma/pgvector): the selection criteria (managed vs self-hosted, scale, filtering, existing Postgres) are durable; the dollar figures are not.

Workflow

All paths relative to this skill folder. Outputs chain: corpus analysis → design → evaluation.

1. Analyze the corpus and pick chunking

python3 chunking_optimizer.py /path/to/docs --extensions .md .txt -o chunking.json

Emits chunking.json with corpus_info, per-strategy strategy_results, a recommendation, and sample_chunks. Use recommendation.strategy and its config; show the user 2-3 sample_chunks so they can sanity-check boundaries.

Read the full file on GitHub · 72 lines

Files

What ships with it

6 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. 1mo ago First seen · 72 lines · 104 tokens per session scan A 5cdf05a3ea56

Subscribe to this mod's changes

rag-architect is a skill published in the GitHub repository JoaoEquer/Oficina (2 stars, last pushed 11d ago), licensed MIT. It adds 104 tokens to every session and 1,117 once invoked, about $0.0004 per session on Opus 5.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-09-05.

Related

Other skills, from other repositories

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…

timescale/pg-aiguide · 162 tokens

iterative-retrieval

Pattern for progressively refining context retrieval to solve the subagent context problem.

hashgraph-online/awesome-codex-plugins · 19 tokens

building-agents

Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…

ericrisco/rsc-harness · 85 tokens

langchain-development

Expert guidance for LangChain and LangGraph development with Python, covering chain composition, agents, memory, and RAG implementations.

Mindrally/skills · 29 tokens

llm-app-development

LLM app development with RAG, prompt engineering, vector databases, and AI agents.

travisjneuman/.claude · 22 tokens