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 skills add lyonzin/knowledge-rag --skill rag-web-fallbackgit clone --depth 1 https://github.com/lyonzin/knowledge-ragWrote 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/lyonzin/knowledge-rag/rag-web-fallback)<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-web-fallback"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-web-fallback/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.
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-web-fallback"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-web-fallback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00061 | $0.01470 |
| Opus 5.5 | $0.00024 | $0.00588 |
| Sonnet 5.5 | $0.00012 | $0.00294 |
| Haiku 4.5 | $0.00006 | $0.00147 |
Grade A, and why
rag-web-fallback 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 1mo 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 — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.
rag-web-fallback — local first, web only when necessary
When to use this skill
Whenever the agent is tempted to call an external tool for information (WebSearch, WebFetch, mcp__exa__*, mcp__context7__*, etc.), route through this skill's checklist first.
Applies to:
- Any request that could be answered from indexed docs before hitting the network
- Any factual claim the agent is about to look up externally
- Any "give me the latest on X" question where X might be in the corpus
Does NOT apply to:
- Deliberate freshness requests: "what happened today", "current news"
- User explicitly asks for a web search
- Live infra queries (external API calls that are the actual task, not for context)
What this skill commits to
The agent will:
- Attempt at least one
search_knowledgecall before any web call, using appropriately extracted keywords. - Attempt a second call with alternative phrasing if the first returned nothing relevant.
- Only then, if genuinely no local coverage, escalate to web search — with an explicit note to the user that RAG was checked and came back empty.
Steps
-
First-pass RAG:
search_knowledge(query="<extracted keywords>", max_results=5, min_score=0.15) -
If 0 hits (or top score < 0.3), try a paraphrase. Common variants:
- Swap synonyms ("auth" ↔ "authentication", "reindex" ↔ "rebuild", "ttl" ↔ "expiration")
- Broaden ("payment refund cancellation" → "refund process")
- Narrow ("architecture" → "authentication architecture")
-
Second-pass RAG:
search_knowledge(query="<paraphrased keywords>", max_results=5, min_score=0.10)Note: lower
min_score(0.10) to catch weaker matches. -
Decide:
Local result quality Action Solid hit (score > 0.5) Answer from RAG, do NOT hit web Weak hit (score 0.15–0.5) Answer from RAG and add a web-search suggestion "for more context" No hit Explicitly tell the user "corpus does not have this" then optionally invoke web search
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.
- 1mo ago First seen · 136 lines · 61 tokens per session scan A cb015a77be73
rag-web-fallback is a skill published in the GitHub repository lyonzin/knowledge-rag (299 stars, last pushed 4d ago), licensed MIT. It adds 61 tokens to every session and 1,470 once invoked, about $0.0002 per session on Opus 5.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
advogado-criminal
Advogado criminalista especializado em Maria da Penha, violencia domestica, feminicidio, direito penal brasileiro, medidas protetivas, inquerito policial e acao penal.
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".
markitdown
Converts 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.
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…
xberg-picking-a-format
Use when choosing an output format for extracted documents — plain text, markdown, djot, HTML, JSON, or DocTags. Maps consumer (LLM, parser, archive) to the right --format / --content-format pair.
azure-search-documents-dotnet
Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…