mcp-local-rag/search

mcp-local-rag/search is a skill for Claude Code, Codex from damoqiongqiu/mcp-local-rag. It costs 37 tokens per session (1,516 once invoked), scanned A, original, from a forked repository, MIT.

Search tools that combine exact word matching with meaning-based search, while splitting code into searchable functions, classes, and methods.

In plain words
What is it for?
Searching project files, narrowing results to folders, finding symbols, answering code questions, and expanding nearby context.
Why use it?
They help find relevant code or documentation even when the wording differs, while still matching precise names such as function names and error codes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/me/docs/api.

Good fit Searching project files, narrowing results to folders, finding symbols, answering code questions, and expanding nearby context.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 mcp-local-rag/search

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/damoqiongqiu/mcp-local-rag/search"><img src="https://agentmods.dev/badge/skills/damoqiongqiu/mcp-local-rag/search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,516 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin fork From a forked repository.
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.00037 $0.01516
Opus 5 $0.00018 $0.00758
Sonnet 5 $0.00007 $0.00303
Haiku 4.5 $0.00004 $0.00152

Measured 12d ago against content hash bba0a8555d6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mcp-local-rag/search 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 12d 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.

skills/mcp-local-rag/search/SKILL.md · 153 lines

How it starts

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

搜索与查询

Tools

query_documents —— 混合搜索

语义向量搜索 + BM25 关键词搜索双路混合。返回与查询最相关的文档片段(chunk)。

query_documents({ query: string, limit?: number, scope?: string | string[] })
Score 解读

分数越低 = 匹配越好。

Score 处理方式
< 0.3 直接使用,高度相关
0.3–0.5 话题相关(提到相同概念/实体)时使用
0.5–0.7 仅在直接回答问题时纳入
> 0.7 无更好结果时备选,否则跳过
limit 选择
意图 limit 原因
精确答案(函数名、错误码) 5 冗余引入噪音
一般理解(概念、流程) 10 需要多个视角
全面调研(对比、综述) 20 覆盖面优先
scope——限定搜索范围

按目录前缀筛选结果。必须传绝对路径,相对路径静默不匹配。

场景 scope
搜索全部 不传
限定某目录 绝对路径前缀,如 /Users/me/docs/api
多个目录 字符串数组,结果取并集

如果用户给了相对路径 → 从之前的 query_documents / list_files 结果中推导绝对前缀,或省略 scope。

查询策略
场景 问题 操作
明确术语 关键词搜索需要精确匹配 保留原词
代码符号(函数名、类型) AST 分块已注入 scope chain,按符号搜索 直接用符号名
模糊问题 向量搜索需要语义信号 补充描述性上下文
错误堆栈 / 代码块 长文本稀释相关性 提取核心关键词(错误码、函数名)
多个独立话题 单查询混淆结果 拆为多次查询
结果少 / 质量差 术语不匹配 查询扩展(见下)
查询扩展

当结果少(< 3)或全部 score > 0.5 时:

  • 保留原词在最前,追加 2–4 个变体
  • 类型:同义词、缩写、相关词、词形变化
  • 例:"config""config configuration settings configure"
  • 上限 4 个追加词,防止话题漂移
结果筛选

纳入 条件(任一满足):

  • 直接回答问题
  • 提供回答问题所需的上下文
  • 话题相关且 score < 0.5

跳过 条件:

  • 关键词相同但意图不同(假阳性)
  • 提到术语但无实际解释
  • score > 0.7 且有更好的结果
fileTitle 字段

每项结果包含 fileTitle——从文档内容提取的标题:

  • 用于区分不同文档的 chunk(相同 fileTitle = 同一文档上下文)
  • fileTitle 与查询无关且 score > 0.5 → 降低该结果的优先级
  • 空值表示标题提取失败

read_chunk_neighbors —— 上下文展开

按需使用。当 query_documents 返回的 chunk 不足以支撑答案时调用——例如 chunk 引用了「上述方法」「如图所示」但缺失上文。

read_chunk_neighbors({
  chunkIndex: number,
  filePath?: string,
  source?: string,
  before?: number,
  after?: number
})
  • before / after 默认 2(遵循 grep -C 2 惯例)
  • filePathsource 二选一(分别对应 ingest_fileingest_data 摄入的内容)
  • 返回按 chunkIndex 升序的数组,目标 chunk 标记 isTarget: true

触发信号

  • 上下文不足:目标 chunk 引用了外部内容
  • 用户明确要求:「前文是什么」「展开看看」「完整上下文」「读一下前后的内容」

不需要展开时:直接用现有 query_documents 结果回答。

Read the full file on GitHub · 153 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. 12d ago First seen · 153 lines · 37 tokens per session scan A bba0a8555d6d

Subscribe to this mod's changes

mcp-local-rag/search is a skill published in the GitHub repository damoqiongqiu/mcp-local-rag (13 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,516 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It comes from a forked repository.

Related

Other skills, from other repositories

citation-system

A Chinese-language guide for designing systems that show where information comes from, such as document question-answering or search-based answers. It covers inline source markers, keeping citations during rewrites, and making factual claims traceable.

kangarooking/system-prompt-skills · 101 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

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"…

microsoft/skills · 102 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