mcp-local-rag/manage

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

File-management tools for a local search index, which is a searchable catalogue of imported files and their contents.

In plain words
What is it for?
Listing indexed files, deleting indexed files, checking file and text-chunk counts, and diagnosing search coverage.
Why use it?
They help you see what has been indexed, remove outdated content, inspect index statistics, and check the folders being searched.

Skill for Claude CodeCodex

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

Good fit Listing indexed files, deleting indexed files, checking file and text-chunk counts, and diagnosing search coverage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/damoqiongqiu/mcp-local-rag/manage
Install

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.

Any agent
npx skills add damoqiongqiu/mcp-local-rag --skill manage
Clone the repo
git clone --depth 1 https://github.com/damoqiongqiu/mcp-local-rag

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/manage

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/damoqiongqiu/mcp-local-rag/manage"><img src="https://agentmods.dev/badge/skills/damoqiongqiu/mcp-local-rag/manage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 869 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.00025 $0.00869
Opus 5 $0.00013 $0.00434
Sonnet 5 $0.00005 $0.00174
Haiku 4.5 $0.00003 $0.00087

Measured 12d ago against content hash c15ec0b62366, 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/manage 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/manage/SKILL.md · 90 lines

What it actually says

管理与维护


Tools

list_files —— 列出已摄入文件

list_files({ scope?: string | string[] })
  • scope 可选,限定目录前缀(必须绝对路径)
  • 返回每个文件的摄入状态、chunk 数量等
  • ingest_data 摄入的 sources 始终被列出,不受 scope 限制

delete_file —— 删除已摄入内容

delete_file({ filePath: string })
// 或
delete_file({ source: string })
  • filePathsource 二选一
  • 幂等:目标不存在也返回成功

status —— 查看统计

status()

无参数。返回:文件总数、chunk 总数、数据库路径、已配置的根目录等。

诊断用途:当用户反馈搜索不到内容或摄入范围异常时,先调用 status 检查当前配置的根目录和有效 warning。


文档根目录(安全边界)

所有 ingest / list / delete / read_chunk_neighbors 操作均被限制在已配置的根目录内。

方式 说明 场景
BASE_DIR 环境变量 单路径 单根目录(兼容旧版)
BASE_DIRS 环境变量 JSON 数组,如 '["/a","/b"]' 多根目录
CLI --base-dir 可重复参数 CLI 多根目录,会覆盖环境变量

优先级:CLI --base-dir > BASE_DIRS > BASE_DIR > process.cwd()

配置警告(作为响应中的附加 content block 出现):

  • BASE_DIRS is set; BASE_DIR is ignored. → 两者同时配置,BASE_DIR 被自动忽略
  • Nested base directory pruned: <child> is inside <parent>. → 配置了嵌套的根目录,子目录被裁剪

CLI 速查

操作 CLI 命令
摄入文件 npx @damoqiongqiu/mcp-local-rag ingest <path> [--visual] [--visual-quality fast|quality]
摄入目录 npx @damoqiongqiu/mcp-local-rag ingest <dir>(如 ./src/
搜索 npx @damoqiongqiu/mcp-local-rag query <text> [--limit n] [--scope prefix]
列出 npx @damoqiongqiu/mcp-local-rag list [--base-dir path] [--scope prefix]
状态 npx @damoqiongqiu/mcp-local-rag status
删除 npx @damoqiongqiu/mcp-local-rag delete [--source url] [path]
上下文 npx @damoqiongqiu/mcp-local-rag read-neighbors --file-path <abs-path> --chunk-index <n> [--before n] [--after n]

CLI 全局选项(--db-path, --cache-dir, --model-name)优先级:CLI 参数 > 环境变量 > 默认值。

Config 匹配:对已有数据库操作时,--model-name 等选项必须与 MCP server 配置一致。切换模型会改变向量空间,搜索质量无声降级。

详见 references/cli-reference.md

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 · 90 lines · 25 tokens per session scan A c15ec0b62366

Subscribe to this mod's changes

mcp-local-rag/manage is a skill published in the GitHub repository damoqiongqiu/mcp-local-rag (13 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 869 once invoked, about $0.0001 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

markitdown

Convert 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.

K-Dense-AI/scientific-agent-skills · 61 tokens

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…

davila7/claude-code-templates · 70 tokens

azure-ai

Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.

microsoft/skills · 76 tokens

kb-retriever

A retrieval and question-answering assistant for a local folder of documents, including Markdown, text, PDFs, and spreadsheets.

ConardLi/garden-skills · 105 tokens

bailian-kb

A command-line manager for Alibaba Cloud Bailian knowledge bases, which are collections of documents prepared for search and question answering. It handles the stored documents, search services, text chunks, and data-centre files rather than everyday searches.

modelstudioai/cli · 234 tokens

azure-ai-contentunderstanding-py

Multimodal AI service that extracts semantic content from documents, video, audio, and image files for RAG and automated workflows.

benjaminasterA/antigravity-awesome-skills · 0 tokens