rag-deep-dive

rag-deep-dive is a skill for Claude Code, Codex from lyonzin/knowledge-rag. It costs 79 tokens per session (1,584 once invoked), scanned A, original, MIT.

A three-step knowledge-search workflow that finds relevant documents, reads the best match in full, and locates similar documents.

In plain words
What is it for?
Use it for end-to-end explanations, authentication flows, ingestion pipelines, implementation patterns across services, and other questions needing both breadth and detail.
Why use it?
It prevents shallow answers when a short search result cannot explain a system or process completely.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/lyonzin/knowledge-rag/rag-deep-dive
Any agent
npx skills add lyonzin/knowledge-rag --skill rag-deep-dive
Clone the repo
git clone --depth 1 https://github.com/lyonzin/knowledge-rag

Made for: Claude Code, Codex.

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-deep-dive

README.md
[![agentmods](https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-deep-dive.svg)](https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-deep-dive)
Your own site
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-deep-dive"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-deep-dive.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,584 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00079 $0.01584
Opus 5 $0.00039 $0.00792
Sonnet 5 $0.00016 $0.00317
Haiku 4.5 $0.00008 $0.00158

Measured 5d ago against content hash 9e3eb60e7ea6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rag-deep-dive 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 5d ago.

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/workflow/rag-deep-dive/SKILL.md · 144 lines

How it starts

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

rag-deep-dive — search + fetch + find similar

When to use this skill

Trigger this skill when the user asks something that needs breadth AND depth:

  • "How does X work end-to-end?"
  • "Walk me through the authentication flow"
  • "Explain the ingestion pipeline"
  • "Give me the full picture on X"
  • "How is X implemented across our services?"
  • Any question where a 500-char snippet is obviously not enough

Do NOT trigger for:

  • Simple factual lookups ("what port does X use") — rag-check-first alone is enough
  • User explicitly wants a short answer ("TL;DR", "one-liner")
  • Time-sensitive triage where speed matters more than depth

What this skill commits to

The agent runs a 3-tool chain in a fixed order:

  1. search_knowledge — find candidates
  2. get_document — read the top match in full
  3. search_similar — find related material

Then synthesizes an answer that pulls from all three, cites each source, and flags gaps.


Steps

  1. Search — cast a wide net:

    search_knowledge(query="<user's topic>", max_results=8, snippet_mode=true, min_score=0.15)
    

    Wider than usual (8 not 5) because we want candidate diversity for the similar-search step.

  2. Fetch — read the winner in full:

    get_document(filepath="<top_hit.source>")
    

    The full document, not just the chunk. This gives you sections that adjacent chunks did not surface.

  3. Find similar — discover the surrounding graph:

    search_similar(filepath="<top_hit.source>", max_results=5)
    

    These are documents ChromaDB considers semantically close to the top hit. Often surfaces the "obvious next document" that keyword search missed.

  4. Cross-reference the 3 result sets. Look for:

    • Consensus — do multiple docs describe the same thing? Cite them together.
    • Contradiction — flag it explicitly to the user, do not silently pick one.
    • Gap — if similar-search surfaces a doc you did not read yet, decide if it is worth a second get_document.

Read the full file on GitHub · 144 lines

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. 5d ago First seen · 144 lines · 79 tokens per session scan A 9e3eb60e7ea6

Subscribe to this mod's changes

rag-deep-dive is a skill published in the GitHub repository lyonzin/knowledge-rag (269 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 1,584 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other skills, from other repositories

pinecone-assistant

Create, manage, and chat with Pinecone Assistants for document Q&A with citations. Handles all assistant operations - create, upload, sync, chat, context retrieval, and list. Recognizes natural language like "create an assistant from my docs", "ask my assistant about X", or "upload my docs to Pinecone".

pinecone-io/skills · 71 tokens

markitdown

Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 61 tokens

llamaindex

Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…

davila7/claude-code-templates · 70 tokens

azure-ai

Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.

microsoft/skills · 76 tokens

rag-perf

Performance benchmarking for a deployed NVIDIA RAG Blueprint server: profiling pass + aiperf load test driven by a single YAML config. Not for accuracy / RAGAS scoring (use rag-eval) or for deploying / repairing services (use rag-blueprint).

NVIDIA-AI-Blueprints/rag · 56 tokens

rag-blueprint

NVIDIA RAG Blueprint — deploy, configure, troubleshoot, and manage. Handles any RAG action: deploy, install, start, enable, disable, toggle, change, configure, troubleshoot, debug, fix, shutdown, stop, or tear down any RAG feature or service (Agentic RAG, VLM, guardrails, query rewriting, models, search, ingestion…

NVIDIA-AI-Blueprints/rag · 92 tokens