/engineering-advanced-skills:rag-architectfrom engineering-advanced-skills
Designs and evaluates RAG pipelines: chunking analysis, retrieval metrics on your queries, first-pass designs with costs. Use when building a RAG system, choosing chunking, embeddings or a vector store, or fixing poor retrieval.
Ships in engineering-advanced-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The agent designs, implements and tunes retrieval-augmented generation pipelines from chunking through evaluation, and makes every choice (chunking, embedding model, vector store, retrieval mode, reranking) answer to a measured retrieval score on the user's own queries.
Before designing the pipeline, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
rag_pipeline_designer.py from a requirements file; treat its picks as a starting point.chunking_optimizer.py on a sample of the real corpus.retrieval_evaluator.py. Validation checkpoint: the chosen configuration beats the TF-IDF baseline and meets the agreed target on Recall@k and MRR; read the worst queries by hand.# from engineering/rag-architect/ (the tools live at the skill root)
python3 rag_pipeline_designer.py assets/sample_requirements.json
python3 chunking_optimizer.py assets/corpus
python3 retrieval_evaluator.py assets/sample_queries.json assets/corpus assets/sample_ground_truth.json
python3 rag_pipeline_designer.py assets/flawed_requirements.json # exit 2: accuracy_priority must be a number
The evaluator's built-in TF-IDF baseline gets Precision@1 of 0.50 on the sample: two of four plain-language queries miss on wording, which is the gap dense or hybrid retrieval should close.
| Tool | Purpose | Key flags | Exit codes |
|---|---|---|---|
chunking_optimizer.py | Runs 12 chunking configurations over a document directory and recommends one with parameters | directory, --config, --extensions, --output, --verbose | 0 report; 2 missing directory or unreadable input |
retrieval_evaluator.py | Precision@K, Recall@K, MRR, NDCG and failure analysis for a query set against a corpus (TF-IDF baseline retriever) | queries corpus ground_truth, --k-values 1 5 10, --output, --verbose | 0 report; 2 unreadable input |
rag_pipeline_designer.py | Component picks, monthly cost estimate, Mermaid diagram and config templates from requirements | requirements, --output, --verbose | 0 design; 2 invalid requirements |
Requirements fields: document_types (list), document_count, avg_document_size (characters), queries_per_day (integers), query_patterns (list), latency_requirement, budget_monthly (number), accuracy_priority and cost_priority (numbers from 0 to 1), maintenance_complexity (low, medium or high). Embedding prices in the designer are OpenAI's published rates as of 2026-11 ($0.02 per 1M tokens for text-embedding-3-small, $0.13 per 1M for text-embedding-3-large); check the provider's pricing page before quoting a cost. Full flags: references/tool-cli-reference.md.
Mistake: Choosing the embedding model from a leaderboard.
Why it matters: Generic benchmark rank often does not hold on a specific corpus, and a wrong pick means re-embedding everything later.
Instead: Shortlist from the leaderboard, then decide with retrieval_evaluator.py on your own queries.
Mistake: Tuning prompts when answers are wrong, before checking retrieval. Why it matters: If the right chunk is not in the context, no prompt can recover it. Instead: Check Recall@k first; fix retrieval, then generation.
Mistake: Changing chunking or the model without re-running the evaluation. Why it matters: Retrieval quality regresses silently, and users notice before the team does. Instead: Keep the ground truth in the repo and gate pipeline changes on the evaluator's scores.
| File | Purpose |
|---|---|
chunking_optimizer.py, retrieval_evaluator.py, rag_pipeline_designer.py | Stdlib CLIs at the skill root |
assets/corpus/ | Four short help-center articles |
assets/sample_queries.json, assets/sample_ground_truth.json | Four queries and their relevant documents |
assets/sample_requirements.json | Valid requirements for a 12,000-document help center |
assets/flawed_requirements.json | accuracy_priority given as text; the designer exits 2 |
Covers: RAG architecture from chunking to evaluation; quantitative chunking analysis; IR-metric evaluation with a TF-IDF baseline; automated first-pass designs with cost estimates.
Does not cover:
engineering/prompt-engineer-toolkit).engineering/database-designer).engineering/observability-designer).engineering/agent-workflow-designer).assets/corpus/api-rate-limits.md (opens in a new tab)assets/corpus/invoice-export.md (opens in a new tab)assets/corpus/password-reset.md (opens in a new tab)assets/corpus/refund-policy.md (opens in a new tab)assets/flawed_requirements.json (opens in a new tab)assets/sample_ground_truth.json (opens in a new tab)assets/sample_queries.json (opens in a new tab)assets/sample_requirements.json (opens in a new tab)chunking_optimizer.py (opens in a new tab)rag_pipeline_designer.py (opens in a new tab)references/chunking_strategies_comparison.md (opens in a new tab)references/embedding_model_benchmark.md (opens in a new tab)references/rag-design-guide.md (opens in a new tab)references/rag_evaluation_framework.md (opens in a new tab)references/tool-cli-reference.md (opens in a new tab)retrieval_evaluator.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
rag, retrieval, chunking, vector-database, embeddings, pipeline-design
npx claudepluginhub borghei/claude-skills --plugin engineering-advanced-skills100 skills in this plugin
/a11y-auditStatic WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing templates for accessibility, checking contrast, or adding an a11y gate to CI.
/agent-designerDesigns multi-agent system architectures with orchestration patterns, tool schemas, and performance evaluation. Use when building AI agent systems, designing agent workflows, creating tool schemas, or evaluating agent performance.
/agent-harnessTest and evaluation harness for AI agents — scenario suites, deterministic replay, regression diffing, cost and latency budgets. Use when agent quality is vibe-checked, before shipping a prompt or model change, or when evals drift.
Other plugins' skills for the same job