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/lyonzin/knowledge-rag/rag-web-fallbacknpx 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.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 | $0.00061 | $0.01470 |
| Opus 5 | $0.00030 | $0.00735 |
| Sonnet 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 4d 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.
- 4d 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 (262 stars, last pushed 6d ago), licensed MIT. It adds 61 tokens to every session and 1,470 once invoked, about $0.0003 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-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).
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…
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.
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:quickstart
Interactive Pinecone quickstart for new developers. Choose between two paths - Database (create an integrated index, upsert data, and query using Pinecone MCP + Python) or Assistant (create a Pinecone Assistant for document Q&A). Use when a user wants to get started with Pinecone for the first time or wants a guided…
pinecone:cli
Guide for using the Pinecone CLI (pc) to manage Pinecone resources from the terminal. The CLI supports ALL index types (standard, integrated, sparse) and all vector operations — unlike the MCP which only supports integrated indexes. Use for batch operations, vector management, backups, namespaces, CI/CD automation…