← Back to Skills Marketplace
xjw163

我的数据分析工具

by Xu Jiwei · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
44
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install my-analyzer
Description
基于 Chroma、Ollama 与 MCP 的本地 RAG 检索技能,用于 OpenClaw 查询私有知识库与 PDF 文档。
README (SKILL.md)

RAG 检索技能(RAG Skill)

该 Skill 用于将 OpenClaw 与本地 RAG(Retrieval-Augmented Generation)知识库连接,使 Agent 可以查询本地 PDF、项目文档、会议记录、技术资料以及私有知识库,而不仅仅依赖模型自身参数知识。

本 Skill 基于:

  • Chroma 向量数据库
  • Ollama Embedding 模型
  • MCP(Model Context Protocol)工具接口
  • OpenClaw Agent Skill 机制

实现 OpenClaw 与本地知识库的标准化集成。


使用场景

当用户提出以下类型问题时,应使用本 Skill:

  • 查询本地 PDF 文档
  • 查询私有项目资料
  • 查询技术文档
  • 查询会议记录
  • 查询本地知识库
  • 查询向量数据库中的内容
  • 检索企业内部资料
  • 基于本地文档进行问答

例如:

  • “查询 CircularAI Phase 3 的相关内容”
  • “从我的本地知识库中搜索 MCP 集成方案”
  • “根据 PDF 总结该项目的主要问题”
  • “检索与 Agentic RAG 相关的资料”

对于普通闲聊、公开常识问题或不需要文档检索的问题,不应使用本 Skill。


系统架构

整体流程如下:

用户问题
  ↓
OpenClaw Agent
  ↓
MCP Tool 调用
  ↓
rag_query
  ↓
Chroma 向量数据库
  ↓
Ollama Embedding
  ↓
返回相关文档片段
  ↓
OpenClaw 生成最终回答

本 Skill 的核心目标是:

让 OpenClaw 能够访问本地私有知识库。

MCP 工具

本 Skill 暴露以下 MCP Tool:

rag_query

输入:

{
  "query": "用户问题",
  "k": 3
}

输出:

{
  "query": "用户问题",
  "results": [
    {
      "content": "检索到的文档内容",
      "metadata": {
        "source": "文档名称",
        "page": 1
      }
    }
  ]
}

环境要求

需要以下环境:

  • Python 3.10+
  • Ollama
  • Chroma
  • OpenClaw
  • MCP Python SDK

需要安装的 Python 包:

pip install mcp chromadb langchain-community langchain-ollama

需要提前下载 embedding 模型:

ollama pull bge-m3

启动 Ollama:

ollama serve

OpenClaw 配置

需要在 OpenClaw 配置文件中注册 MCP Server:

{
  "mcpServers": {
    "rag": {
      "command": "python",
      "args": [
        "/absolute/path/to/rag_mcp_server.py"
      ]
    }
  }
}

推荐使用绝对路径。

因为 OpenClaw 启动 MCP Server 时的工作目录可能并不是当前目录,使用相对路径可能导致无法找到 Chroma 数据库。


回答规则

使用本 Skill 时:

  • 优先基于检索结果回答
  • 尽量保留文档来源信息
  • 不要编造不存在的文档
  • 不要伪造页码或引用
  • 如果没有检索到有效结果,应明确说明
  • 如果结果可信度较低,应说明“证据不足”

安全说明

本 Skill 默认仅访问本地数据。

其设计目标是:

  • 不上传本地文件
  • 不调用外部云 API
  • 不执行危险 Shell 命令
  • 不访问 SSH Key
  • 不需要 sudo 权限

所有文档均保留在本地 Chroma 数据库中。

用户在修改 Skill 或 MCP Server 后,应自行检查代码安全性。


局限性

本 Skill 只能检索:

已经被向量化并写入 Chroma 数据库的文档

如果文档尚未建立 embedding,则无法被检索。

检索效果依赖:

  • chunk 切分策略
  • embedding 模型质量
  • 查询语句质量
  • 向量数据库更新情况
  • metadata 完整性

建议在新增文档后重新构建向量数据库。


适用对象

本 Skill 适用于:

  • OpenClaw 用户
  • 本地 RAG 系统开发者
  • 私有知识库场景
  • 企业内部 Agent
  • 本地 AI 助手
  • Agentic RAG 系统
  • MCP Tool 开发者

尤其适合:

OpenClaw + MCP + Chroma + Ollama

的本地 Agent 架构。

Usage Guidance
Install if you want OpenClaw to query your local/private document index. Treat the connected Chroma database and MCP server as sensitive because they may expose private document content, and review any separate rag_mcp_server.py implementation before using it.
Capability Assessment
Purpose & Capability
The skill describes a local RAG workflow using Chroma, Ollama, and an MCP tool named rag_query to retrieve local PDF and private knowledge-base content.
Instruction Scope
Instructions are scoped to document and knowledge-base queries, with explicit guidance not to use the skill for casual chat or public/common-knowledge questions.
Install Mechanism
Setup requires manual package/model installation and OpenClaw MCP configuration, but the artifact contains only SKILL.md and no install script or automatic execution path.
Credentials
Access to private/local documents is sensitive but expected for this RAG purpose, and the skill states that data remains local and external cloud APIs are not used.
Persistence & Privilege
The skill relies on a local Chroma database and user-managed MCP/Ollama services, but does not request sudo, SSH keys, hidden persistence, or privileged system changes.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install my-analyzer
  3. After installation, invoke the skill by name or use /my-analyzer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of a local RAG retrieval skill for OpenClaw, connecting to private knowledge bases and PDF documents. - Integrates Chroma vector DB, Ollama embedding models, and MCP protocol for standardized document retrieval. - Adds a single MCP tool endpoint: `rag_query`, enabling querying of local PDFs and private documents. - Designed for secure, local use—does not upload files or call external APIs. - Provides detailed usage scenarios, answer guidelines, configuration steps, and system limitations.
Metadata
Slug my-analyzer
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 我的数据分析工具?

基于 Chroma、Ollama 与 MCP 的本地 RAG 检索技能,用于 OpenClaw 查询私有知识库与 PDF 文档。 It is an AI Agent Skill for Claude Code / OpenClaw, with 44 downloads so far.

How do I install 我的数据分析工具?

Run "/install my-analyzer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 我的数据分析工具 free?

Yes, 我的数据分析工具 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 我的数据分析工具 support?

我的数据分析工具 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 我的数据分析工具?

It is built and maintained by Xu Jiwei (@xjw163); the current version is v1.0.0.

💬 Comments