📚 LiteRAG — LiteRAG

v0.2.2

本地 retrieval 技能 for large documentation corpora using independent SQLite knowledge libraries with keyword 增强版 vector hybrid 搜索. Use when searching...

0· 56·0 当前·0 累计
mozi1924 头像by @mozi1924 (Mozi Arasaka)
下载技能包
最后更新
2026/4/8
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's code, instructions, and requirements are coherent with a local-document retrieval/indexing tool; nothing in the bundle requests unrelated credentials or performs unexplained external installs, but you should review the library config because embedding endpoints/keys are stored there and can cause external network traffic.
评估建议
This skill appears to be what it says: a local SQLite-based hybrid search/indexer. Before installing/use: 1) Inspect <workspace>/.literag/knowledge-libs.json — it may contain an embedding.baseUrl and apiKey; ensure the endpoint is trusted (default is localhost) because document text will be sent there for embeddings. 2) Review the configured library 'paths' to confirm only the intended files will be indexed (the tool will read and store chunks from those paths). 3) Install requirements (sqlite-v...
详细分析 ▾
用途与能力
Name/description (local hybrid SQLite retrieval and indexing) match the included scripts and declared runtime needs. The only required binary is python3 and the code implements indexing, search, inspect, status, meta, and benchmark workflows that align with the stated purpose.
指令范围
SKILL.md and the scripts consistently instruct the agent to read workspace config (.literag/knowledge-libs.json), iterate configured source paths, and run local indexing/search scripts. This is expected for a local retrieval tool. Note: the indexer will read files under the configured library paths and will send texts to the configured embedding endpoint (embedding.baseUrl) during indexing/search, which is necessary for embedding-based retrieval.
安装机制
There is no automatic install spec; SKILL.md recommends running pip install -r requirements.txt. requirements.txt contains sqlite-vec (a native-backed package). No remote arbitrary downloads or URL/extract installs are present in the bundle. Installing sqlite-vec may require native build support or a Python+SQLite build that allows loading SQLite extensions—this is an expected but higher-footprint dependency for vector search.
凭证需求
The skill declares no required env vars and reads only OPENCLAW_WORKSPACE / WORKSPACE / LITERAG_PYTHON for workspace resolution and preferred python. However, sensitive credentials (embedding.apiKey) are stored in the librag config (.literag/knowledge-libs.json) rather than environment variables; the skill will use that apiKey and the embedding.baseUrl to contact an embedding provider. This is proportionate for an indexer, but you should verify the config and endpoint are trusted before indexing.
持久化与权限
The skill is not always-enabled (always: false) and is user-invocable only. It does not request persistent platform privileges. It stores DBs/config under the workspace (.literag/) which is expected for a local indexer.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

版本

latestv0.2.22026/4/8

Clarify workspace-relative .literag paths and document environment overrides used for workspace and Python resolution.

无害

安装命令

点击复制
官方npx clawhub@latest install literag
镜像加速npx clawhub@latest install literag --registry https://cn.longxiaskill.com

技能文档

# LiteRAG 当目标语料过于庞大或嘈杂,不适合放入主代理 memory 时,请使用本 skill。 ## 安装 依赖包安装: ``bash python3 -m pip install -r {baseDir}/requirements.txt ` ## 目录结构 - 配置 + 数据库存放在 /.literag/ - 主配置:/.literag/knowledge-libs.json - 默认 workspace 解析顺序:OPENCLAW_WORKSPACEWORKSPACE → 从当前路径向上查找,直到发现 OpenClaw workspace 标记文件 - 核心脚本位于 skills/literag/scripts/ - Skill 二进制入口:skills/literag/bin/literag - 快捷包装脚本:scripts/literag-query.pyscripts/literag-index.pyscripts/literag-status.pyscripts/literag-meta.py 以及 scripts/lq ## 规则 - 个人/工作记忆请放在 OpenClaw 内置 memory - 大型外部语料请放在 LiteRAG,而非 memory_search - 每个知识库都是独立的 library,拥有各自的 SQLite - 先搜索,后检视 - 优先返回成组文档命中,而非原始 chunk 轰炸 - 引用文件给用户时,优先使用相对于源码根的路径 - 默认使用本地 OpenAI-compatible 嵌入,除非配置另有指定 ## 需要时必读文件 - 每次操作 library 或修改配置前,务必读取 /.literag/knowledge-libs.json - 需要命令示例、输出格式或搜索→检视流程时,请读 references/usage.md - 新增 library、设置源码根、排除规则、chunking / ranking 覆盖时,请读 references/configuration.md - 其他 agent / ACP 框架需要现成 LiteRAG prompt 模板时,请读 references/agent-prompts.md - 针对特定 library 调优检索质量、清理排序或提升索引吞吐时,请读 references/optimization-playbook.md - 仅当修改行为或诊断 bug 时,才阅读 skills/literag/scripts/ 下的脚本 ## Slash / 用户可调用的用法 当用户输入 /literag ... 时,将剩余参数字符串解析为子命令。支持形式: - /literag search - /literag inspect [--start N --end N] - /literag index [--limit-files N] [--embedding-batch-size N] - /literag index-all [--limit-files N] [--embedding-batch-size N] - /literag status - /literag meta - /literag benchmark --query ... 若用户给出自然语言请求而非严格子命令,请将其翻译为最接近的受支持操作,而非苛求语法。 ## 支持的命令 - index_library.py —— 索引单个 library - index_all.py —— 索引所有已配置 library - search_library.py —— 分组混合/全文/向量检索 - inspect_result.py —— 按文件路径 + chunk 范围展开命中 - status_library.py —— 展示索引健康度/兼容性/计数 - meta_library.py —— 导出 sqlite meta 原始记录 - benchmark_library.py —— 对固定查询集做混合/全文/向量延迟与命中形态基准测试 - bin/literag —— 打包后的 CLI 入口,支持 search / inspect / index / status / meta / benchmark - scripts/literag-query.py —— 查询/搜索/检视包装器 - scripts/literag-index.py —— 单库或全库索引包装器 - scripts/literag-status.py —— 状态包装器 - scripts/literag-meta.py —— 元数据包装器 - scripts/literag-benchmark.py —— 基准测试包装器 - scripts/lq —— literag-query.py 的极简 shell 别名 ## 操作流程 1. 读取 /.literag/knowledge-libs.json 2. 解析目标 library 3. 运行 search_library.py 做分组检索 4. 如需,对最佳命中或选定区间运行 inspect_result.py 5. 日常操作优先用 scripts/literag-query.pyscripts/lq 6. 需要简洁索引入口时,用 scripts/literag-index.py 7. 调试异常检索或配置变更后,先用 scripts/literag-status.py 8. 需要查看原始存储元数据时,用 scripts/literag-meta.py 9. 需要可重复的检索延迟 / 命中形态对比时,用 scripts/literag-benchmark.pyskills/literag/scripts/benchmark_library.py` 10. 除非用户明确要求把持久摘要复制进 workspace memory,否则让 LiteRAG 与内置 memory 保持分离 ## 当前意图 使用 LiteRAG 的场景: - Blender 手册 + Blender Python 参考 - 未来的博客/文章/站点知识库 - 任何需要混合检索且不希望污染内置 memory 的大型外部文档

数据来源ClawHub ↗ · 中文优化:龙虾技能库