Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

filechat-ragfilechat RAG 搜索

Agent Skill

用于搭建或维护带检索增强的 RAG 工作流,适合让 Agent 处理知识库问答、向量检索、来源引用和事实核查。它可以辅助整理数据接入、Embedding、向量库、召回参数和回答生成流程。使用时需要确认数据来源、更新频率、召回阈值和引用展示方式,避免把未命中的资料或过期内容包装成确定事实。

总安装

5,488

周安装

222

GitHub Stars

公开资料未说明

下载量

1,723
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:filechat-rag(filechat RAG 搜索)
来源仓库:https://github.com/eladrave/filechat-rag
安装命令:
openclaw skills install filechat-rag
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install filechat-rag

简介

利用语义向量搜索实现 Google Drive 文档的智能问答与知识管理。

  • 适合构建企业级知识库问答系统,支持多文件夹文档的实时检索与引用。
  • 提供召回参数调整和引用展示功能,便于事实核查和答案可信度验证。
  • 使用前需授权访问 Google Drive,并设置合适的召回阈值避免误判未命中内容。
  • 数据来源更新依赖用户手动同步,建议明确标注内容时效性以防过时信息误导。

SKILL.md

name
filechat-rag
description
>
metadata
openclaw
category
knowledge
requires
bins
["node", "npm", "gws"]
install
kind
node
package
@googleworkspace/cli
bins
["gws"]
label
Install Google Workspace CLI
kind
script
script
cd ./skills/filechat && npm install
label
Install FileChat Dependencies

FileChat RAG Skill

Your personal RAG (Retrieval-Augmented Generation) document library backed by Google Drive. Supports multiple Google Drive folders dynamically, interactive folder routing, incremental sync, choosing between Gemini or OpenAI for embeddings, and connecting to Qdrant.

Setup & Bootstrap

FIRST verify that the required environment variables are set in /workspace/skills/filechat/.env:

  1. EMBEDDING_PROVIDER (either gemini or openai)
  2. GEMINI_API_KEY or OPENAI_API_KEY
  3. Optional: QDRANT_URL and QDRANT_API_KEY (If absent, it uses local disk-based JSON).

Create the .env file like this:

echo "EMBEDDING_PROVIDER=gemini" > ./skills/filechat/.env
echo "GEMINI_API_KEY=your_key_here" >> ./skills/filechat/.env

Google Workspace Authentication: Before running any commands, check if the system is authenticated by running:

npx @googleworkspace/cli auth status

If it returns an auth error or indicates no token, you MUST prompt the user to authenticate. Trigger the interactive login flow:

npx @googleworkspace/cli auth login --services drive

Wait for the user to complete the browser OAuth flow before proceeding.

Folder Management

The user can have infinite folders synced. You manage them using folders.js.

  • List Folders: cd ./skills/filechat && node folders.js list
  • Add a Folder: node folders.js add "Taxes 2026" <FOLDER_ID> (Auto-discovers the ID via gws drive files list if you don't know it!)
  • Set Default Folder: node folders.js default "Taxes 2026"

If the user asks to do something with a file/folder but doesn't specify which one, run node folders.js get-default to find the default ID. If no folders exist, ask them to set one up!

How to Sync the Library

When the user asks to "sync", "flush", or "update", you must run the ingestion script.

To sync a specific folder:

cd ./skills/filechat && node sync.js <FOLDER_ID>

To sync EVERYTHING (all folders in the registry):

cd ./skills/filechat && node sync-all.js

*Note: Syncs are highly incremental and use a local cache! If a file hasn't been modified in Drive, the script will skip it instantly and output "0 chunks" embedded. This is NORMAL behavior. If you are debugging, testing, or the user specifically requests a hard flush, you MUST delete the cache files first:*

rm ./skills/filechat/meta_<FOLDER_ID>.json
rm ./skills/filechat/vector_db_<FOLDER_ID>.json

How to Answer User Questions (RAG)

Query the local vector store or Qdrant for the target Folder ID to fetch relevant text chunks:

cd ./skills/filechat && node query.js <FOLDER_ID> "What does my medical discharge say?"

Use the snippets returned to answer the user.

How to Retrieve and Send a Physical File

Find the File ID using the query script, then download it:

gws drive files get --params '{"fileId": "<FILE_ID>", "alt": "media"}' --output /workspace/discharge.pdf

Reply using the media tag: MEDIA:/workspace/discharge.pdf.

How to Store a New File for the User

If the user uploads a file and asks you to save it (or implicitly sends a file per your automatic processing rules):

  1. Check their folders (node folders.js list).
  2. If they didn't specify which folder, use the default folder. If no default is set, ask them!
  3. Notify the user exactly which folder the file is being saved to.
  4. Tell the user that you are now extracting the information and saving it in a vectordb.
  5. If the file is an image or scanned document, make sure to extract the text using a vision model or OCR before it is embedded. (The sync script handles this natively).
  6. Upload it to the correct folder using gws:
   gws drive files create --json '{"name": "filename.pdf", "parents": ["<FOLDER_ID>"]}' --upload /path/to/uploaded/file.pdf
  1. Trigger node sync.js <FOLDER_ID> so the vector database chunks and embeds the file into the corresponding vectordb.

How to Test & Validate the Skill

If the user asks you to verify the skill is working, or if you just set it up and want to ensure end-to-end functionality, follow these exact steps:

  1. Verify Auth: Run npx @googleworkspace/cli auth status. Ensure it shows a valid token.
  2. Verify Drive Access: Do a dry-run fetch of the target folder to ensure GWS can see the files.
   npx @googleworkspace/cli drive files list --params '{"q": "'\''<FOLDER_ID>'\'' in parents and trashed = false"}'

*(If this fails, check folder permissions or GWS credentials.)*

  1. Force a Clean Sync: Clear the cache for the test folder to guarantee a fresh run, then sync.
   rm -f ./skills/filechat/meta_<FOLDER_ID>.json ./skills/filechat/vector_db_<FOLDER_ID>.json
   node ./skills/filechat/sync.js <FOLDER_ID>

*(You should see files being downloaded, OCR'd, and chunks being embedded. If it says "0 chunks", verify the folder isn't empty.)*

  1. Test the Vector Query: Run a generic query to verify the embeddings were saved and cosine similarity works.
   node ./skills/filechat/query.js <FOLDER_ID> "hello"

*(You should see a list of "Top matches" with similarity scores and text snippets. If you do, the RAG pipeline is 100% operational!)*

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

79.06%
按下载量换算1,362

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills