Local RAG Search
nkapila6/mcp-local-rag
Efficiently perform web searches using the mcp-local-rag server with semantic similarity ranking.
Only reach for external web search when the local corpus comes back empty or clearly insufficient.
$ npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install lyonzin/knowledge-rag rag-web-fallback --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/workflow/rag-web-fallback .claude/skills/rag-web-fallback && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rag-web-fallback" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/workflow/rag-web-fallback into .claude/skills/rag-web-fallback/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-web-fallback", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/lyonzin/knowledge-rag/tree/master/skills/workflow/rag-web-fallbackType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install lyonzin/knowledge-rag rag-web-fallback --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/workflow/rag-web-fallback .agents/skills/rag-web-fallback && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rag-web-fallback" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/workflow/rag-web-fallback into .agents/skills/rag-web-fallback/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-web-fallback", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install lyonzin/knowledge-rag rag-web-fallback --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/workflow/rag-web-fallback .cursor/skills/rag-web-fallback && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rag-web-fallback" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/workflow/rag-web-fallback into .cursor/skills/rag-web-fallback/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-web-fallback", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/lyonzin/knowledge-rag.git --path skills/workflow/rag-web-fallback--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install lyonzin/knowledge-rag rag-web-fallback --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/workflow/rag-web-fallback .gemini/skills/rag-web-fallback && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rag-web-fallback" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/workflow/rag-web-fallback into .gemini/skills/rag-web-fallback/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-web-fallback", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install lyonzin/knowledge-rag rag-web-fallbackInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/workflow/rag-web-fallback .github/skills/rag-web-fallback && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rag-web-fallback" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/workflow/rag-web-fallback into .github/skills/rag-web-fallback/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-web-fallback", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install lyonzin/knowledge-rag rag-web-fallback --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/workflow/rag-web-fallback .opencode/skills/rag-web-fallback && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rag-web-fallback" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/workflow/rag-web-fallback into .opencode/skills/rag-web-fallback/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-web-fallback", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rag-web-fallbackOnly reach for external web search when the local corpus comes back empty or clearly insufficient.
RAG Web Fallback is an agent skill from lyonzin/knowledge-rag. Only reach for external web search when the local corpus comes back empty or clearly insufficient. Forces the agent to try knowledge-rag first, then explicitly document why it needed to escalate. Prevents wasted API cost, latency, and (in air-gapped deployments) accidental network calls.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Retrieval-augmented generation and Web search. It works with Model Context Protocol. The repository describes itself as: Local RAG MCP server for Claude Code — hybrid search (semantic + BM25), cross-encoder reranking, 13 MCP tools, 20 format parsers. Zero external servers, zero API keys. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit df9cccb. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
RAG Web Fallback loads about 1.4k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 514 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from lyonzin/knowledge-rag at commit df9cccb, republished under its MIT licence (© lyonzin). 514 words, ~1,407 tokens.
.claude/skills/rag-web-fallback/SKILL.md (or your agent's skills folder).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:
Does NOT apply to:
The agent will:
search_knowledge call before any web call, using appropriately extracted keywords.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:
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 |
If escalating to web, prefix the answer with:
"The local knowledge base does not cover this (searched
<query1>,<query2>, 0 relevant hits). Falling back to external web search."
Then run the web tool (WebSearch, mcp__exa__web_search_exa, etc.).
Example 1 — RAG covers it, no web needed
User: "What is our retry policy for external HTTP calls?"
Agent:
search_knowledge(query="retry policy external http") → 2 hits, top score 0.79
Reply: "Per [docs/adr/0031-retries.md], the policy is 3 attempts with exponential
backoff starting at 1s, max 30s. See services/common/retry.py:12–28 for the impl."
(No web search performed.)Example 2 — RAG empty, web fallback explicit
User: "What are the top CVEs in Python cryptography package in Q3 2026?"
Agent:
search_knowledge(query="cve python cryptography 2026", min_score=0.10) → 0 hits
search_knowledge(query="python cryptography vulnerabilities", min_score=0.10) → 0 hits
Reply: "The local corpus does not track CVE data (searched 'cve python cryptography 2026'
and 'python cryptography vulnerabilities', 0 hits). Falling back to external web search..."
[Then calls WebSearch or mcp__cti__vuln_cve]Example 3 — Weak local hit + web supplement
User: "Explain the LangChain LCEL syntax."
Agent:
search_knowledge(query="langchain lcel syntax") → 1 hit, score 0.22
(a passing mention in one of your ADRs comparing frameworks)
Reply: "The corpus has one passing mention of LangChain LCEL in
[docs/adr/0044-framework-choice.md]. That does not fully explain the syntax
though — for the syntax reference itself, I will pull from LangChain's public docs."
[Then calls WebFetch on the LangChain docs URL]mcp__cti__*, mcp__shodan__*, mcp__virustotal__*, mcp__context7__*, etc., prefer those over generic web search — they are usually more precise and faster.rag-check-first — the prerequisite (this skill is check-first with an explicit escalation rule).rag-cite-sources — if you DO answer from RAG, cite. If from web, cite the URL.rag-troubleshoot — troubleshooting has its own escalation path (StackOverflow, GitHub issues) that follows the same pattern.© lyonzin, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/workflow/rag-web-fallback of lyonzin/knowledge-rag.
Open the folder on GitHubat commit df9cccb
RAG Web Fallback next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| RAG Web Fallback this skilllyonzin/knowledge-rag | 290 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Local RAG Searchnkapila6/mcp-local-rag | 134 | 1 repos | ~1.6k | Automated safety check: Pass | MIT | |
| Digoal Read Think Writerdigoal/blog | 8.6k | — | ~1.3k | Automated safety check: Pass | GPL-2.0 | |
| MCP Local RAGshinpr/mcp-local-rag | 407 | — | ~4.4k | Automated safety check: Pass | MIT | |
| Pgvector Semantic Searchtimescale/pg-aiguide | 1.9k | 1 repos | ~3.8k | Automated safety check: Pass | Apache-2.0 | |
| AutoRAG Setup and RepairMarker-Inc-Korea/AutoRAG | 5.1k | — | ~5.3k | Automated safety check: Pass | MIT |
nkapila6/mcp-local-rag
Efficiently perform web searches using the mcp-local-rag server with semantic similarity ranking.
digoal/blog
以 digoal/德哥 的第一人称口吻重写一篇文章。流程是:先吃透原文(必要时用 mcpMiniMaxwebsearch 拓展资料库),再用德哥的语气重新讲一遍,输出 markdown 到当前项目的 markdown/ 目录(SVG 图存到 markdown/svg/,文中以 …
shinpr/mcp-local-rag
Searches, saves, and maintains a local document index through a local RAG MCP server.
timescale/pg-aiguide
A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.
Marker-Inc-Korea/AutoRAG
Installs, configures, and repairs AutoRAG's search model, approved folders, indexes, and datasources, and registers its Lite MCP server.
opendatalab/Sciverse-Agent-Tools
A skill your agent uses when the user needs academic paper retrieval — searching scientific literature by author/year/journal, finding paper chunks for RAG-style citations, or expanding original…
lyonzin/knowledge-rag
Before answering any technical question, code request, architecture decision, or factual claim, call searchknowledge to check the local corpus.
lyonzin/knowledge-rag
Every technical claim drawn from the local corpus must ship with a source citation formatted as path:line or path:section.
lyonzin/knowledge-rag
When performing code review on a PR, diff, snippet, or "look at this change" request, first consult the corpus for related ADRs, coding standards, prior patterns, and similar files.
lyonzin/knowledge-rag
Three-step multi-tool workflow — search the corpus, fetch the most relevant document in full, then find similar documents.
lyonzin/knowledge-rag
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.
lyonzin/knowledge-rag
Measure retrieval quality using evaluateretrieval (MRR@5 and Recall@5) and getindexstats.
Works with
Categories
Only reach for external web search when the local corpus comes back empty or clearly insufficient. RAG Web Fallback is an agent skill from lyonzin/knowledge-rag. Only reach for external web search when the local corpus comes back empty or clearly insufficient.
RAG Web Fallback fits situations like: tasks that involve Retrieval-augmented generation; tasks that involve Web search.
Run `npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a claude-code`. Or copy the skill folder (skills/workflow/rag-web-fallback in lyonzin/knowledge-rag) into .claude/skills/rag-web-fallback in your project. Claude Code loads it when a task matches its description.
Run `npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a codex`. Or copy the skill folder (skills/workflow/rag-web-fallback in lyonzin/knowledge-rag) into .agents/skills/rag-web-fallback in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lyonzin/knowledge-rag --skill rag-web-fallback -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rag-web-fallback, .gemini/skills/rag-web-fallback, .github/skills/rag-web-fallback and .opencode/skills/rag-web-fallback in your project.
SKILL.md names no scripts, command-line tools or credentials: RAG Web Fallback is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
RAG Web Fallback is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with RAG Web Fallback: Local RAG Search (nkapila6/mcp-local-rag, 134 stars), Digoal Read Think Writer (digoal/blog, 8.6k stars), MCP Local RAG (shinpr/mcp-local-rag, 407 stars) and Pgvector Semantic Search (timescale/pg-aiguide, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
lyonzin (a GitHub user) maintains it in lyonzin/knowledge-rag, which has 290 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 4, 2026.
Source: lyonzin/knowledge-rag on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.