rag-manager

rag-manager is a skill for Claude Code, Codex from coracoo/zspace_skill. It costs 144 tokens per session (1,029 once invoked), scanned A, original, MIT.

A tool for managing the index used by RAG semantic search, which finds files by meaning rather than only by exact words. It checks the index, rebuilds it, updates it, removes entries, and configures scan ranges.

In plain words
What is it for?
Use it to check index status, rebuild or incrementally update file indexes, remove a file from the index, configure scanning scope, and verify that semantic search is ready.
Why use it?
It helps when search is unavailable, outdated, or missing recently added files by showing whether the indexing service is ready and updating its stored data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check index status, rebuild or incrementally update file indexes, remove a file from the index, configure scanning scope, and verify that semantic search is ready.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/coracoo/zspace_skill/rag-manager
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 coracoo/zspace_skill --skill rag-manager
Clone the repo
git clone --depth 1 https://github.com/coracoo/zspace_skill

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 rag-manager

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/coracoo/zspace_skill/rag-manager"><img src="https://agentmods.dev/badge/skills/coracoo/zspace_skill/rag-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,029 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 original No closer match found in the catalogue.
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.00144 $0.01029
Opus 5.5 $0.00058 $0.00412
Sonnet 5.5 $0.00029 $0.00206
Haiku 4.5 $0.00014 $0.00103

Measured 2mo ago against content hash 9f1efa334ceb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rag-manager 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 2mo 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/rag-manager/SKILL.md · 86 lines

What it actually says

RAG Manager — 语义搜索索引管理

概述

管理 NAS 上 RAG docker daemon(<nas_ip>:8000,bge-small-zh-v1.5 + sqlite-vec)的索引生命周期。

前置:nas-setup skill(验证 NAS 登录 + RAG daemon 在线)。

依赖 MCP tool:

  • index_status() — 索引概况(model/chunks/db_size)
  • reindex(scope, full) — 重建索引
  • semantic_search(query, scope, top_k) — 按 query 搜索(验证索引用)

RAG 不会自动扫描 NAS 文件。需要手动 reindex 或 NAS cron 定时触发。


工作流

场景 1:门控检查(label-manager RAG 的前置)

触发:label-manager 的 RAG 依赖 skill 被加载时,先调 rag-manager 做门控。

步骤:

  1. 调 index_status() → 拿 chunks、model、db_size
  2. 如果 chunks == 0:调 reindex(scope="files", full=true) → 等完成后重查 status
  3. 如果 error 或 daemon 不通:返回错误,"RAG daemon 未就绪,请先部署 rag-server docker"
  4. 如果 chunks > 0:门控通过,告诉调用方"RAG ready,chunks=X"

场景 2:用户说"更新 RAG 索引"

触发:"重建 RAG 索引"、"reindex"、"把 NAS 文件重新索引"、"RAG 搜不到新文件"

步骤:

  1. 调 index_status() 看当前状态
  2. 调 reindex(scope="files", full=true) → 同步阻塞(大目录几分钟)
  3. 调 index_status() 确认 chunks 数量增加
  4. 报告:已索引 X chunks,共 Y MB

场景 3:用户说"去掉某个文件的索引"

触发:"把 XX 文件从 RAG 索引里移除"、"unindex"

步骤:

  1. 当前 MCP 无 unindex tool。走 rag-server HTTP API:POST /unindex {source_type, source_path}
  2. 确认状态 /status → chunks 减少

场景 4:用户说"配置 RAG 扫描范围"

触发:"RAG 只索引教材目录"、"让 RAG 扫更多目录"

步骤:

  1. 编辑 rag-server/.env 的 SCAN_ROOTS 和 NAS_RAG_PATH_MAP
  2. 调 reindex(scope="files", full=true) 应用新范围
  3. API 不暴露修改配置端点(需 SSH 或 docker compose restart)

跟 label-manager 的 RAG 分工

能力 用哪个
索引状态门控 rag-manager
重建索引 rag-manager
内容语义搜索 label-manager(RAG 场景)
搜索结果打标签 label-manager → MCP save_file_label
文件内容浏览 label-manager(RAG 场景)

label-manager 场景 6 步骤 2 改为:加载 rag-manager skill → 门控检查通过 → 继续。


关键约束

  • reindex 是同步阻塞的(大目录几分钟),期间 MCP 会一直等待,LLM 应提示用户耐心等
  • SCAN_ROOTS 在 rag-server/.env 里,修改需要容器重启:docker compose restart
  • RAG daemon 部署在 NAS docker 上(不是本地),/status 优先走 http://<nas_ip>:8000/status
  • 索引数据在 rag-server/data/(sqlite-vec),体积随文件数线性增长
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 86 lines · 144 tokens per session scan A 9f1efa334ceb

Subscribe to this mod's changes

rag-manager is a skill published in the GitHub repository coracoo/zspace_skill (36 stars, last pushed 2mo ago), licensed MIT. It adds 144 tokens to every session and 1,029 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 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

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens