← Back to Skills Marketplace
54lynnn

Knowledge RAG

by 54Lynnn · GitHub ↗ · v1.1.2 · MIT-0
cross-platform ⚠ suspicious
56
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install knowledge-rag
Description
个人知识库搜索引擎。把笔记、转录、文章建成向量索引,自然语言搜。搭配 Bilibili Auto Transcript 使用更佳:视频转录自动入库,转完即搜。
README (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 端口,可在启动时改
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install knowledge-rag
  3. After installation, invoke the skill by name or use /knowledge-rag
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.2
描述更新:推荐搭配 Bilibili Auto Transcript 使用。
v1.1.1
还原干净显示名称。
v1.1.0
品牌更新:显示名称加入 54Lynnn 个人标识;推荐搭配 bilibili-auto-transcript。
v1.0.0
首个版本:个人知识库搜索与管理系统,支持语义搜索、网页管理界面、自动索引。
Metadata
Slug knowledge-rag
Version 1.1.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is Knowledge RAG?

个人知识库搜索引擎。把笔记、转录、文章建成向量索引,自然语言搜。搭配 Bilibili Auto Transcript 使用更佳:视频转录自动入库,转完即搜。 It is an AI Agent Skill for Claude Code / OpenClaw, with 56 downloads so far.

How do I install Knowledge RAG?

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

Is Knowledge RAG free?

Yes, Knowledge RAG is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Knowledge RAG support?

Knowledge RAG is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Knowledge RAG?

It is built and maintained by 54Lynnn (@54lynnn); the current version is v1.1.2.

💬 Comments