rag-troubleshoot

rag-troubleshoot is a skill for Claude Code, Codex from lyonzin/knowledge-rag. It costs 78 tokens per session (1,765 once invoked), scanned C, original, MIT.

A debugging skill that searches a team’s stored documentation and incident history when someone reports an error or unexpected behavior. RAG means retrieving relevant saved information before generating an answer.

In plain words
What is it for?
Use it for error messages, stack traces, failed builds, incidents, and reports that something is broken; it searches the exact error, affected component, and similar prior incidents before applying general debugging methods.
Why use it?
It can find earlier fixes, runbooks, or incidents so the team does not investigate the same problem from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for error messages, stack traces, failed builds, incidents, and reports that something is broken; it searches the exact error, affected component, and similar prior incidents before applying general debugging methods.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lyonzin/knowledge-rag/rag-troubleshoot
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 lyonzin/knowledge-rag --skill rag-troubleshoot
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-troubleshoot

README.md
[![agentmods](https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-troubleshoot/github.svg)](https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-troubleshoot)
Your own site
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-troubleshoot"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-troubleshoot/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-troubleshoot

Your own site · 80×15
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-troubleshoot"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-troubleshoot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,765 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00078 $0.01765
Opus 5 $0.00039 $0.00882
Sonnet 5 $0.00016 $0.00353
Haiku 4.5 $0.00008 $0.00177

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

Security

Grade C, and why

rag-troubleshoot scanned grade C with 1 finding 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 9d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Try: (a) check network to huggingface.co, (b) rm -rf models_cache/ and restart,
skills/workflow/rag-troubleshoot/SKILL.md · 164 lines

How it starts

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

rag-troubleshoot — RAG-first debugging

When to use this skill

Trigger the moment the user reports:

  • A specific error message, stack trace, or exception
  • "It broke", "it fails", "not working", "returns null when it shouldn't"
  • Unexpected behavior in a component
  • Alert / incident triage
  • "Why does X do Y" where Y is wrong
  • A pasted log line
  • A failed CI/CD run

The core insight: many bugs are already solved somewhere in your corpus — runbook, postmortem, incident report, prior fix commit, ADR, chat thread indexed via add_from_url. Search first.


What this skill commits to

Before proposing a fix, the agent searches for:

  1. The error signature itself — exception name, first line of stack, unique error code
  2. The affected component / function — module name, service name, feature
  3. Prior incidents with similar symptoms — even if the error message differs

Only after those three come back empty does the agent apply general debugging techniques.


Steps

  1. Extract error signatures from the user's message:

    • Exception class name (ValueError, ConnectionError, TimeoutError, etc.)
    • Error code (ERR_INVALID_TOKEN, E42_INDEX_MISS, HTTP status)
    • First distinctive line of the stack trace
    • Unique keywords ("segfault at ...", "cannot connect to ...")
  2. First search — exact error signature:

    search_knowledge(query="<exception name> <error keyword>", max_results=5, min_score=0.15)
    

    Example: search_knowledge(query="ConnectionError refused chromadb")

  3. Second search — affected component + symptom:

    search_knowledge(query="<component name> <what happens>", max_results=5)
    

    Example: search_knowledge(query="reindex fails halfway large corpus")

  4. Third search — historical incidents / postmortems:

    search_knowledge(query="incident postmortem <component>", max_results=5)
    

    Or with a category filter if your corpus categorizes by document type:

    search_knowledge(query="<component> failure", category="incidents")
    

Read the full file on GitHub · 164 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. 9d ago First seen · 164 lines · 78 tokens per session scan C 22ae66f43b14

Subscribe to this mod's changes

rag-troubleshoot is a skill published in the GitHub repository lyonzin/knowledge-rag (273 stars, last pushed 4d ago), licensed MIT. It adds 78 tokens to every session and 1,765 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

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

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 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-eval

Filesystem RAG benchmarks: corpus/, train.json, evaluaterag.py (RAGAS quality). Not for prod monitoring, latency/throughput benchmarking (use rag-perf), or evals outside this repo layout.

NVIDIA-AI-Blueprints/rag · 48 tokens

pinecone:full-text-search

Create, ingest into, and query a Pinecone full-text-search (FTS) document index using the graduated document-schema API (Python SDK 10.0.0, API version 2026-07). Use when the user or agent asks to build a text search index on Pinecone, add dense or sparse vector fields, ingest documents, construct scoreby clauses…

pinecone-io/pinecone-claude-code-plugin · 163 tokens

pinecone:n8n

Build n8n workflows using the Pinecone Assistant node or Pinecone Vector Store node. Use when building RAG pipelines, chat-with-docs workflows, configuring Pinecone nodes in n8n, troubleshooting Pinecone n8n nodes, or asking about best practices for Pinecone in n8n.

pinecone-io/pinecone-claude-code-plugin · 67 tokens