Rag Manager logo

Rag Manager

Community
coracoo
rag-manager

Use when 需要管理 RAG 语义搜索的索引生命周期 — 检查索引状态、重建索引、增量索引、移除索引、配置扫描范围。label-manager(RAG 场景) 的前置门控。 触发词:RAG 索引、语义搜索索引、重建索引、索引状态、重新索引、更新索引、reindex、NAS 文件索引、搜索索引管理、索引文件更新。 不适用:语义搜索本身(用 MCP semantic_search tool)、文件打标签(用 label-manager)、文件审计(用 file-organizer)。

Overview

Publishercoracoo
Repositoryzspace_skill
Skill namerag-manager
Stars
39
Forks
13
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by coracoo on GitHub. Read the source before you install it.

Installation

Install the Rag Manager AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/coracoo/zspace_skill/tree/master/skills/rag-manager
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/coracoo/zspace_skill.git /tmp/zspace_skill
mkdir -p .claude/skills
cp -r /tmp/zspace_skill/skills/rag-manager .claude/skills/rag-manager
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Rag Manager in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Rag Manager on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Rag Manager is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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),体积随文件数线性增长

Frequently asked questions

What does the Rag Manager AI skill do?

Use when 需要管理 RAG 语义搜索的索引生命周期 — 检查索引状态、重建索引、增量索引、移除索引、配置扫描范围。label-manager(RAG 场景) 的前置门控。 触发词:RAG 索引、语义搜索索引、重建索引、索引状态、重新索引、更新索引、reindex、NAS 文件索引、搜索索引管理、索引文件更新。 不适用:语义搜索本身(用 MCP semantic_search tool)、文件打标签(用 label-manager)、文件审计(用 file-organizer)。

Why use Rag Manager on TypingMind?

Because you install it once and use it with any model. Rag Manager is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Rag Manager in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/coracoo/zspace_skill/tree/master/skills/rag-manager. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Rag Manager?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Rag Manager?

As many as you like. As long as a model supports skills, you can use Rag Manager with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Rag Manager AI skill free?

Yes. It is published on GitHub by coracoo under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇