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.01542 |
| Opus 5.5 | $0.00024 | $0.00617 |
| Sonnet 5.5 | $0.00012 | $0.00308 |
| Haiku 4.5 | $0.00006 | $0.00154 |
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 28d 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 — 137 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) -
If it returns
no_resultsor the snippets do not address the question, try a paraphrase. Judge this from the snippets, not fromscore: it is min-max normalized within each query, so the top result scores 1.0 even when it is off-topic. Whenreranker_scoreis present (not null), it is the raw cross-encoder score and can be compared across queries. 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)Do not lower or raise
min_scoreto catch weaker matches: it filters on the per-query normalized score, so it only drops the weakest results of each query, whatever their relevance.
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.
- 28d ago Changed · +1 lines 50fc0b83623d
- 3mo 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 (314 stars, last pushed yesterday), licensed MIT. It adds 61 tokens to every session and 1,542 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.
rag-web-fallback compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rag-web-fallbacklyonzin/knowledge-rag | Skill | 314 | yesterday | MIT | A | 61 | Claude Code, Codex |
| pinecone-assistantpinecone-io/skills | Skill | 17 | 25d ago | MIT | A | 71 | Claude Code, Codex |
| pinecone:full-text-searchpinecone-io/pinecone-claude-code-plugin | Skill | 69 | 23d ago | MIT | A | 180 | Claude Code |
| pinecone:n8npinecone-io/pinecone-claude-code-plugin | Skill | 69 | 23d ago | MIT | A | 67 | Claude Code |
| pinecone:quickstartpinecone-io/pinecone-claude-code-plugin | Skill | 69 | 23d ago | MIT | A | 94 | Claude Code |
| pinecone:clipinecone-io/pinecone-claude-code-plugin | Skill | 69 | 23d ago | MIT | A | 75 | Claude Code |
| pinecone:mcppinecone-io/pinecone-claude-code-plugin | Skill | 69 | 23d ago | MIT | A | 80 | Claude Code |