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.
npx agentmods add skills/takagoto/rag-learning-academy/debug-ragnpx skills add TakaGoto/rag-learning-academy --skill debug-raggit clone --depth 1 https://github.com/TakaGoto/rag-learning-academyWrote 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.
[](https://agentmods.dev/skills/takagoto/rag-learning-academy/debug-rag)<a href="https://agentmods.dev/skills/takagoto/rag-learning-academy/debug-rag"><img src="https://agentmods.dev/badge/skills/takagoto/rag-learning-academy/debug-rag.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.01413 |
| Opus 5 | $0.00006 | $0.00707 |
| Sonnet 5 | $0.00003 | $0.00283 |
| Haiku 4.5 | $0.00001 | $0.00141 |
Grade A, and why
debug-rag 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debug RAG: Diagnose and Fix Pipeline Issues
Scope: This skill teaches debugging through guided diagnosis and explanation. For a fast fix without the teaching, use
/fix.
An interactive debugging workflow that helps learners identify and resolve common RAG failure modes. This skill builds debugging intuition alongside technical problem-solving.
Language awareness: See
.claude/LANGUAGE_AWARENESS.md.
Step 1: Identify the Symptom
Ask the learner to describe the problem they are seeing. Common symptoms include:
- Hallucination: The model generates information not in the retrieved context
- Irrelevant retrieval: The retrieved documents do not match the query
- Missing context: Relevant information exists in the corpus but is not retrieved
- Incomplete answers: The answer is partially correct but missing key details
- Contradictory answers: The answer contradicts the source documents
- Repetitive or generic responses: The model ignores context and gives generic answers
- Wrong format: The answer is correct but not in the expected format
- High latency: The pipeline is too slow
If the learner is not sure, ask them to share an example query, the expected answer, and the actual answer.
Step 2: Follow the Diagnostic Tree
Based on the symptom, walk through the appropriate diagnostic path:
For Retrieval Issues (irrelevant results, missing context)
Start by inspecting what the retriever actually returns:
Provide diagnostic code in the learner's chosen language that retrieves results and prints scores, sources, and text previews.
- Check the query: Is the query well-formed? Try rephrasing it.
- Inspect chunks: Look at the actual chunks in the vector store. Are they the right size? Do they contain the expected information?
- Test embedding similarity: Compute the similarity between the query embedding and the expected chunk embedding. Is it above the retrieval threshold?
- Check top-k: Are you retrieving enough documents? Try increasing top-k.
- Examine metadata filters: Are any filters accidentally excluding relevant results?
- Compare search methods: Try keyword search alongside vector search to see if the issue is in the embeddings.
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.
- 6d ago First seen · 114 lines · 13 tokens per session scan A 197c76bc06c6
debug-rag is a skill published in the GitHub repository TakaGoto/rag-learning-academy (18 stars, last pushed 5mo ago), licensed MIT. It adds 13 tokens to every session and 1,413 once invoked, about $0.0001 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.
Other skills, from other repositories
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…
debug-evals
Debug haiku.rag evaluation runs in Logfire. Use when asked to look at Logfire for an eval run, find failing or low-scoring eval cases, compare runs, check citation quality (citedmap) or judge pass rate (answerequivalent), or explain why an eval case failed. Drives the Logfire MCP against the evals service, or the…
debug-ingestion
Debug haiku.rag ingestion in Logfire. Use when asked to look at Logfire for ingestion, find failed or dead ingestion jobs, investigate retries or circuit-breaker events, trace a document through convert/chunk/embed/store, find which docling-serve instance served a request, spot slow conversions, or tell concurrent…
rag-index-decisions
After making a non-obvious architectural decision, solving a novel bug, agreeing on a coding standard, or reaching a conclusion worth remembering, index it back into the knowledge base so the next occurrence is one search away. Uses adddocument or addfromurl. Closes the feedback loop that makes a RAG-backed team…
rag-troubleshoot
When the user reports a bug, error message, stack trace, unexpected behavior, or "why is this broken" question, search the corpus first for prior occurrences, known fixes, or related runbooks. Prevents re-solving problems the team already solved. Trigger on any error signature, exception name, stack trace snippet, or…
retrieval-system-audit
Audit and improve stellar-raven-codemode retrieval across every exposed service operation and skill. Use for comprehensive endpoint, response-shape, catalog-description, search-ranking, execute-grounding, evaluation-coverage, golden-truth, or cross-source weighting reviews that require live probes and measured A/B…