← 返回 Skills 市场
54lynnn

Knowledge RAG

作者 54Lynnn · GitHub ↗ · v1.1.2 · MIT-0
cross-platform ⚠ suspicious
56
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install knowledge-rag
功能描述
个人知识库搜索引擎。把笔记、转录、文章建成向量索引,自然语言搜。搭配 Bilibili Auto Transcript 使用更佳:视频转录自动入库,转完即搜。
使用说明 (SKILL.md)

📖 Knowledge RAG — 个人知识库搜索

把你的笔记、转录、文章、文档集中管理,用自然语言搜索,不用管文件放哪。

能做什么

  • 📹 搜你转的 B站视频内容
  • 📚 搜你的读书笔记
  • 📱 搜你存的公众号文章
  • 📄 搜任何你丢进去的文档
  • 🌐 还有网页搜索界面,浏览器打开就能用

首次设置

1. 安装 Ollama(向量引擎)

从 \x3Chttps://ollama.com/download> 下载安装,或者:

# Linux / macOS
curl -fsSL https://ollama.com/install.sh | sh

# Windows 在官网下载安装包

2. 下载向量模型

ollama pull nomic-embed-text

3. 准备知识目录

把你想要搜索的文件放在这里:

~/workspace/knowledge/
  ├── bilibili/          ← B站转录文件放这里
  ├── notes/             ← 读书笔记放这里
  ├── wechat-articles/   ← 公众号文章放这里
  └── other/             ← 其他文档放这里

支持 .txt.md 格式。

4. 构建索引

python3 scripts/index_knowledge.py

工作流

方式一:通过我搜索(推荐)

直接问我,我会自动调用搜索:

你:付鹏说的英国经济那事具体怎么讲的? 我:在知识库里搜一下 → 带原文回答你

你:帮我查一下笔记里关于美联储的部分 我:搜 notes 来源 → 返回结果

方式二:网页搜索界面

启动搜索网页,在浏览器打开:

python3 scripts/knowledge_server.py 8765

然后打开 http://localhost:8765

方式三:命令行搜索

# 全量搜索
python3 scripts/query_knowledge.py "你的问题"

# 只搜某个来源
python3 scripts/query_knowledge.py "美联储" --source bilibili

# 只看某个作者
python3 scripts/query_knowledge.py "英国" --author 付鹏

# 查看更多结果
python3 scripts/query_knowledge.py "英国" --top 10

# 查看索引统计
python3 scripts/query_knowledge.py --stats

新增资料

有新文件时,跑一下索引更新:

python3 scripts/index_knowledge.py

--force 会全量重建:

python3 scripts/index_knowledge.py --force

推荐搭配:📼 Bilibili Auto Transcript

如果你也转B站视频,装 bilibili-auto-transcript,转录完自动存到知识库:

clawhub install bilibili-auto-transcript

装好后,转录的文件自动进 ~/workspace/knowledge/bilibili/,索引脚本会自动识别。 转完即搜,无需手动操作。

设置开机自启(网页界面)

Linux 系统(含 WSL2 开了 systemd):

# 创建用户级 systemd 服务
mkdir -p ~/.config/systemd/user/
cat > ~/.config/systemd/user/knowledge-server.service \x3C\x3C 'SERVICE'
[Unit]
Description=知识仓库搜索界面
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/python3 /path/to/scripts/knowledge_server.py 8765
WorkingDirectory=/path/to/scripts
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target
SERVICE

# 记得把上面的 /path/to/ 换成实际路径

systemctl --user daemon-reload
systemctl --user enable knowledge-server.service
systemctl --user start knowledge-server.service

数据在哪

所有数据存在 ~/workspace/knowledge/,跟 OpenClaw 无关,卸载也不丢。

索引文件在 ~/workspace/knowledge/.rag_data/

注意事项

  • 依赖 Ollama + nomic-embed-text 做向量化
  • 首次索引需联网下载向量模型(~274MB)
  • 纯文本搜索,不支持图片/PDF 中的表格
  • 删除旧文件后需要重新索引才能从搜索结果中移除
  • 搜索网页服务默认监听 8765 端口,可在启动时改
安全使用建议
Install only if you are comfortable indexing the chosen personal documents and running a local web service. Keep the server bound to localhost if possible, avoid using it on shared or untrusted networks, do not enable the systemd service unless you want it always running, and prefer the official Ollama download over piping an installer directly into a shell.
能力评估
Purpose & Capability
The indexing, query, Ollama embedding calls, and browser UI fit the stated purpose of searching local notes, transcripts, and articles.
Instruction Scope
The documentation mentions a web UI and persistence, but does not clearly warn that the server is unauthenticated, binds to all interfaces, allows wildcard CORS for JSON APIs, and can return indexed text and file metadata.
Install Mechanism
The declared install path uses an Ollama download page and an ollama pull command, while the README also offers a curl-to-shell installer pattern that users should treat carefully.
Credentials
Reading and indexing files under ~/workspace/knowledge is purpose-aligned, but serving search results and file listings from 0.0.0.0 is broader exposure than a personal local search tool should use by default.
Persistence & Privilege
The optional user-level systemd service is disclosed and not privileged, but it can keep the unauthenticated web interface running across sessions without matching security warnings or disable guidance.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install knowledge-rag
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /knowledge-rag 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.2
描述更新:推荐搭配 Bilibili Auto Transcript 使用。
v1.1.1
还原干净显示名称。
v1.1.0
品牌更新:显示名称加入 54Lynnn 个人标识;推荐搭配 bilibili-auto-transcript。
v1.0.0
首个版本:个人知识库搜索与管理系统,支持语义搜索、网页管理界面、自动索引。
元数据
Slug knowledge-rag
版本 1.1.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Knowledge RAG 是什么?

个人知识库搜索引擎。把笔记、转录、文章建成向量索引,自然语言搜。搭配 Bilibili Auto Transcript 使用更佳:视频转录自动入库,转完即搜。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 56 次。

如何安装 Knowledge RAG?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install knowledge-rag」即可一键安装,无需额外配置。

Knowledge RAG 是免费的吗?

是的,Knowledge RAG 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Knowledge RAG 支持哪些平台?

Knowledge RAG 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Knowledge RAG?

由 54Lynnn(@54lynnn)开发并维护,当前版本 v1.1.2。

💬 留言讨论