Agent skill

RAG Design Doc

by mohitagw15856 in mohitagw15856/pm-claude-skills

Design a Retrieval-Augmented Generation system end to end. An agent skill from mohitagw15856/pm-claude-skills.

MITAuto-check passedAI & LLM Engineering

Install RAG Design Doc

skills CLI
$ npx skills add mohitagw15856/pm-claude-skills --skill rag-design-doc -a claude-code

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

GitHub CLI
$ gh skill install mohitagw15856/pm-claude-skills rag-design-doc --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/mohitagw15856/pm-claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rag-design-doc .claude/skills/rag-design-doc && 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-design-doc
GitHub stars
1.4k
Token cost
~1.2k tokens
SKILL.md length
537 words
Files
1
Skills in repo
1,348
Repo updated
First seen
Licence
MIT

At a glance

Design a Retrieval-Augmented Generation system end to end. An agent skill from mohitagw15856/pm-claude-skills.

  • Asked to design a RAG pipeline
  • SKILL.md covers Required Inputs, Output Format, Quality Checks and Anti-Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • A chat with your docs feature

What it does

RAG Design Doc is an agent skill from mohitagw15856/pm-claude-skills. Design a Retrieval-Augmented Generation system end to end. Use when asked to design a RAG pipeline, a 'chat with your docs' feature, a knowledge assistant, or to debug why a RAG system gives wrong/ungrounded answers. Produces a RAG design doc — ingestion & chunking, embeddings & index, retrieval & reranking, the generation prompt, grounding/citations, evaluation, and failure modes with mitigations.

Its SKILL.md is about 1.2k 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 and Architecture decision records. The repository describes itself as: 1255 professional Agent Skills for Claude, ChatGPT, Gemini, Cursor & Codex — PRDs, postmortems, leases, medical bills, layoffs, go-bags, new countries. Plain markdown, MIT, in… The licence is MIT.

When your agent uses it

  • Asked to design a RAG pipeline
  • A chat with your docs feature
  • A knowledge assistant
  • Debug why a RAG system gives wrong/ungrounded answers

Example prompts

  • “chat with your docs”
  • “/rag-design-doc”

What it can do on your machine

Read from SKILL.md and the folder at commit 1cbf1f0. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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 Design Doc loads about 1.2k tokens when it runs. Until then it costs about 104 tokens; SKILL.md has 537 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

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 mohitagw15856/pm-claude-skills at commit 1cbf1f0, republished under its MIT licence (© mohitagw15856). 537 words, ~1,156 tokens.

Download SKILL.mdSave it as .claude/skills/rag-design-doc/SKILL.md (or your agent's skills folder).
name
rag-design-doc
description
Design a Retrieval-Augmented Generation system end to end. Use when asked to design a RAG pipeline, a 'chat with your docs' feature, a knowledge assistant, or to debug why a RAG system gives wrong/ungrounded answers. Produces a RAG design doc — ingestion & chunking, embeddings & index, retrieval & reranking, the generation prompt, grounding/citations, evaluation, and failure modes with mitigations.

RAG Design Doc Skill

Most RAG systems fail not at generation but at retrieval — the model answers confidently from the wrong chunks. This skill forces the decisions that actually determine quality (chunking, retrieval, reranking, grounding) and pairs each with how you'll evaluate it, so "it hallucinates sometimes" becomes a diagnosable, fixable pipeline.

Required Inputs

Ask for these only if they aren't already provided:

  • Corpus — what's being retrieved over (docs, tickets, code, tables), size, and update frequency.
  • Queries — the kinds of questions users ask, and how precise/recall-sensitive they are.
  • Grounding requirement — must answers cite sources? Is "I don't know" acceptable (it should be)?
  • Constraints — latency budget, cost, privacy/tenancy (per-customer isolation?), and freshness needs.

Output Format

RAG Design: [system]

1. Goal & non-goals — what questions it answers well, and what it explicitly won't do.

2. Ingestion & chunking

  • Source connectors and refresh strategy (full re-index vs. incremental).
  • Chunking: strategy (fixed, recursive, semantic, structure-aware), size + overlap, and what metadata travels with each chunk (source, section, timestamp, permissions). Chunking is the highest-leverage choice — justify it.

3. Embeddings & index — embedding model + dimension, vector store, and the index/filter strategy (incl. metadata filters and per-tenant isolation).

4. Retrieval — top-k, hybrid (dense + keyword/BM25) vs. pure vector, metadata pre-filtering, and query transformation (rewriting, decomposition, HyDE) if used.

5. Reranking — whether a cross-encoder/reranker narrows the candidate set before generation, and the final context budget.

6. Generation — the prompt template, how retrieved context is formatted, the instruction to answer only from context and say "I don't know" otherwise, and how citations are produced and verified.

7. Evaluation — retrieval metrics (recall@k, MRR) separately from answer quality (faithfulness/groundedness, correctness). Pair with an ai-eval-plan.

8. Failure modes & mitigations — a table: symptom → likely stage → fix.

SymptomLikely cause (stage)Mitigation
Confident but wrongretrieval missed the chunkhybrid search, better chunking, rerank
Right doc, wrong detailchunk too large/smalltune size+overlap, structure-aware split
Ignores retrieved contextprompt/formatstronger grounding instruction, fewer/cleaner chunks
Stale answersindex freshnessincremental re-index, timestamp filter
Show full SKILL.md (214 more words)Show less

Quality Checks

  • Retrieval quality is evaluated separately from answer quality (you can't fix what you can't isolate)
  • The system can say "I don't know" when context is insufficient — it's not forced to answer
  • Answers carry citations that are verified against the retrieved context
  • Chunking strategy and size are justified against the corpus structure, not copied from a tutorial
  • Per-tenant / permission isolation is handled in retrieval, not just at the UI
  • Hybrid (keyword + vector) retrieval is considered for queries with exact terms/IDs

Anti-Patterns

  • Do not jump to "fine-tune the model" when retrieval is the problem — fix what's retrieved first
  • Do not evaluate only the final answer — a good answer from luck and a bad answer from bad retrieval look different and need different fixes
  • Do not force an answer when nothing relevant was retrieved — an honest "I don't know" beats a confident hallucination
  • Do not ignore metadata filtering — semantic similarity will happily return the right-sounding chunk from the wrong document or wrong tenant
  • Do not pick a chunk size by default — it's the single biggest lever on retrieval quality

Based On

Retrieval-Augmented Generation practice — hybrid retrieval, reranking, grounded generation, and faithfulness evaluation.

Example Trigger Phrases

  • "Design a RAG pipeline."
  • "Build a chat-with-your-docs feature."
  • "Design a knowledge assistant."
  • "Why does our RAG system give wrong answers?"

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

Files

Just SKILL.md in skills/rag-design-doc of mohitagw15856/pm-claude-skills.

Open the folder on GitHubat commit 1cbf1f0

Compare with similar skills

RAG Design Doc 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 Design Doc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
RAG Design Doc this skillmohitagw15856/pm-claude-skills1.4k—~1.2kAutomated safety check: PassMIT
RAG Check Firstlyonzin/knowledge-rag292—~1.4kAutomated safety check: PassMIT
RAG Code Reviewlyonzin/knowledge-rag292—~1.8kAutomated safety check: PassMIT
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k7 repos~2.3kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2603 repos~1.4kAutomated safety check: PassCustom licence
MCP Local RAGshinpr/mcp-local-rag412—~4.4kAutomated safety check: PassMIT

Similar skills

  • RAG Check First

    lyonzin/knowledge-rag

    Before answering any technical question, code request, architecture decision, or factual claim, call searchknowledge to check the local corpus.

    292 GitHub stars~1.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • RAG Code Review

    lyonzin/knowledge-rag

    When performing code review on a PR, diff, snippet, or "look at this change" request, first consult the corpus for related ADRs, coding standards, prior patterns, and similar files.

    292 GitHub stars~1.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • 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 7 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 3 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • MCP Local RAG

    shinpr/mcp-local-rag

    Searches, saves, and maintains a local document index through a local RAG MCP server.

    412 GitHub stars~4.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Ms Agent Framework RAG

    shuyu-labs/WebCode

    Comprehensive guide for building Agentic RAG systems using Microsoft Agent Framework in C.

    278 GitHub stars~1.1k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed

More from mohitagw15856/pm-claude-skills

All 1,348 skills in this repo
  • Car Tco

    mohitagw15856/pm-claude-skills

    Compare the total cost of car ownership across buy-new, buy-used, lease, and keep-your-current-car — depreciation, insurance, maintenance ramp, and fuel over a real horizon, not just the monthly…

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Cs Health Scorecard

    mohitagw15856/pm-claude-skills

    Build a customer health scorecard for a specific account. An agent skill from mohitagw15856/pm-claude-skills.

    1.4k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Exit Waterfall

    mohitagw15856/pm-claude-skills

    Compute who gets what at each exit price from a cap table — liquidation preferences, conversion points, and where the founders' share collapses.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Feature Prioritisation

    mohitagw15856/pm-claude-skills

    Apply prioritisation frameworks (RICE, MoSCoW, Kano, ICE, Opportunity Scoring) to rank features and backlog items.

    1.4k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Fire Number

    mohitagw15856/pm-claude-skills

    Compute a financial-independence (FIRE) target and years-to-reach with every assumption labeled as an assumption — plus a sensitivity table instead of a single false-precision answer.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Freelance Rate

    mohitagw15856/pm-claude-skills

    Derive a freelance day/hourly rate backwards from target income, honest billable utilization, overhead, and the self-employment tax premium — the arithmetic that proves a rate is not salary÷2000.

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

Questions about RAG Design Doc

What does RAG Design Doc do?

Design a Retrieval-Augmented Generation system end to end. An agent skill from mohitagw15856/pm-claude-skills. RAG Design Doc is an agent skill from mohitagw15856/pm-claude-skills. Design a Retrieval-Augmented Generation system end to end.

When should I use RAG Design Doc?

RAG Design Doc fits situations like: asked to design a RAG pipeline; A chat with your docs feature; A knowledge assistant; debug why a RAG system gives wrong/ungrounded answers.

How do I install RAG Design Doc in Claude Code?

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

How do I install RAG Design Doc in Codex?

Run `npx skills add mohitagw15856/pm-claude-skills --skill rag-design-doc -a codex`. Or copy the skill folder (skills/rag-design-doc in mohitagw15856/pm-claude-skills) into .agents/skills/rag-design-doc in your project. Codex loads it when a task matches its description.

Can I use RAG Design Doc 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 mohitagw15856/pm-claude-skills --skill rag-design-doc -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-design-doc, .gemini/skills/rag-design-doc, .github/skills/rag-design-doc and .opencode/skills/rag-design-doc in your project.

What does RAG Design Doc need to run?

SKILL.md names no scripts, command-line tools or credentials: RAG Design Doc is instructions for the agent only.

Does RAG Design Doc 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 Design Doc 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 Design Doc use?

RAG Design Doc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does RAG Design Doc use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to RAG Design Doc?

Skills that share tags, products or a category with RAG Design Doc: RAG Check First (lyonzin/knowledge-rag, 292 stars), RAG Code Review (lyonzin/knowledge-rag, 292 stars), Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains RAG Design Doc?

mohitagw15856 (a GitHub user) maintains it in mohitagw15856/pm-claude-skills, which has 1,434 GitHub stars. The repository holds 1,348 skills in this directory. The repository was last updated on October 9, 2026.

Source: mohitagw15856/pm-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.