← 返回 Skills 市场
341
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install librag-knowledge-recall
功能描述
使用 LibRAG 本地 `/api/v1/librag/knowbase/recall` 接口做知识库数据召回。适用于中文场景下的知识库检索、资料召回、证据段落提取、出处定位、基于知识库的问答取证,以及用户用“知识库查询”“数据召回”“从文档里找答案”等表达发起的任务。
使用说明 (SKILL.md)
\r \r
LibRAG 中文知识库召回\r
\r 优先使用附带脚本调用 LibRAG,不要手写 HTTP 请求。\r \r
触发语义\r
\r 遇到下列表达时优先使用本 Skill:\r
- “去知识库里查一下”\r
- “做一下数据召回”\r
- “从 LibRAG 找相关段落”\r
- “把出处和原文召回出来”\r
- “根据知识库检索证据”\r
- “从文档中找到答案”\r \r
输入\r
\r 必需输入:\r
question:用户要检索的问题或条件。\r \r 配置文件config.json:\rbase_url:LibRAG 服务地址。\rapi_key:与目标知识库绑定的 API Key。\rkb_id:默认知识库 ID。\rrecall_mode:默认召回模式。\rvector_top_k:向量召回 top-k。\rfulltext_top_k:全文召回 top-k。\rreturn_tree:是否返回树形结构。\rhas_source_text:是否包含原文。\rhas_score:是否保留分数字段。\rfilter_effective:是否过滤无效结果。\rreasoning_enhance:是否启用推理增强。\rscore_threshold:打分过滤阈值。\r \r 可选覆盖:命令行参数优先于config.json:\rkb_id:覆盖config.json里的默认知识库 ID。\rrecall_mode:reasoning、hybrid、vector,默认hybrid。\rvector_top_k:默认20。\rfulltext_top_k:默认20。\rreturn_tree:默认true。\rhas_source_text:默认true。\rhas_score:默认true。\rscore_threshold:默认0,作为打分过滤的分数阈值。\rfilter_effective:默认true。\rreasoning_enhance:默认true。\r \r
执行\r
\r
默认使用 config.json 中的知识库:\r
\r
python {baseDir}/scripts/recall.py --config {baseDir}/config.json --question "\x3C问题>"\r
```\r
\r
需要覆盖知识库时:\r
\r
```bash\r
python {baseDir}/scripts/recall.py --config {baseDir}/config.json --kb-id 12 --question "这个产品的违约金标准是什么?"\r
```\r
\r
## 输出\r
\r
默认直接返回脚本输出 JSON。\r
\r
关键字段:\r
- `request`\r
- `response.msg`\r
- `response.data`\r
- `summary.item_count`\r
- `summary.result_shape`\r
\r
## 约束\r
\r
- 缺少 `config.json`,或其中的 `base_url`、`api_key`、`kb_id`,或缺少 `question` 时直接失败。\r
- 默认使用非流式调用。\r
- 默认使用 `return_tree=true`,只有明确要求平铺段落结果时才改成 `false`。\r
- 不要输出完整 API Key。\r
- 若返回 `401` 或 `403`,明确提示密钥无效或没有该知识库权限。\r
- 若返回 `404`,明确提示知识库不存在。\r
\r
安全使用建议
This skill is a straightforward helper for calling a LibRAG recall endpoint. Before installing: (1) ensure base_url points to the intended LibRAG instance (default is localhost); (2) put the API key in config.json and protect that file (restrict filesystem permissions, don't check it into source control); (3) be aware the tool prints the config path and server responses verbatim — avoid passing secrets or private data in requests if you don't want them echoed; (4) verify the endpoint is trusted (if you set base_url to a remote host, the API key will be sent to that host). If you want keys outside files, consider modifying the script to read from a secure secret store or environment variable instead of a plaintext config.json.
功能分析
Type: OpenClaw Skill
Name: librag-knowledge-recall
Version: 1.0.0
The skill bundle is a standard implementation for performing knowledge retrieval from a LibRAG API. The Python script (scripts/recall.py) uses only standard libraries to make authorized GET requests to a configured endpoint, and the SKILL.md instructions correctly guide the agent to use the script for its intended purpose without any evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
Name/description say it calls LibRAG recall API. The bundle contains a Python script that calls a /librag/knowbase/recall endpoint and a config.json with base_url, api_key, kb_id, etc. Requiring a Python runtime and a config file is consistent with the stated purpose.
Instruction Scope
SKILL.md instructs the agent to run the included Python script with a config.json and question. The script reads config.json, constructs a GET request with Authorization: Bearer <api_key>, and prints JSON containing request/response and a summary. This is within scope. Minor note: the script prints the config file path and server response verbatim (including any echoed data). Although the script itself does not print the API key, server responses could theoretically echo sensitive fields—so be careful with what you send/return.
Install Mechanism
No install spec; this is instruction-only plus an included Python script. Nothing is downloaded or written to disk by the skill beyond reading the provided config.json and running the script, which is low-risk and proportional.
Credentials
The skill does not request environment variables or unrelated credentials. It expects an API key and endpoint in config.json, which is appropriate for an API client. Storing the API key in config.json is a design choice — users should protect that file (permissions) and avoid committing it to source control.
Persistence & Privilege
always:false and default autonomous invocation are set. The skill does not attempt to modify other skills, system settings, or persist new credentials. It only reads the local config and performs a network call to the configured base_url.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install librag-knowledge-recall - 安装完成后,直接呼叫该 Skill 的名称或使用
/librag-knowledge-recall触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of librag-knowledge-recall skill for Chinese knowledge base recall using local LibRAG API.
- Supports knowledge base retrieval, evidence extraction, and source location based on specified trigger phrases.
- Uses Python script with settings from config.json; allows command-line overrides for key parameters.
- Returns structured JSON with key results and request details.
- Built-in error handling for missing config, authentication, and missing knowledge base cases.
元数据
常见问题
librag-recall 是什么?
使用 LibRAG 本地 `/api/v1/librag/knowbase/recall` 接口做知识库数据召回。适用于中文场景下的知识库检索、资料召回、证据段落提取、出处定位、基于知识库的问答取证,以及用户用“知识库查询”“数据召回”“从文档里找答案”等表达发起的任务。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 341 次。
如何安装 librag-recall?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install librag-knowledge-recall」即可一键安装,无需额外配置。
librag-recall 是免费的吗?
是的,librag-recall 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
librag-recall 支持哪些平台?
librag-recall 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 librag-recall?
由 7010G(@7010g)开发并维护,当前版本 v1.0.0。
推荐 Skills