Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add xyva-yuangui/XyvaClaw --skill rag-knowledge-basegit clone --depth 1 https://github.com/xyva-yuangui/XyvaClawWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/rag-knowledge-base)<a href="https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/rag-knowledge-base"><img src="https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/rag-knowledge-base/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/rag-knowledge-base"><img src="https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/rag-knowledge-base.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00360 |
| Opus 5.5 | $0.00000 | $0.00144 |
| Sonnet 5.5 | $0.00000 | $0.00072 |
| Haiku 4.5 | $0.00000 | $0.00036 |
Grade A, and why
rag-knowledge-base scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
RAG Knowledge Base
本地 RAG 知识库系统,支持文档解析、向量存储、混合检索和增强生成。
功能
- 文档解析:PDF / Word / Excel / Markdown / 纯文本
- 智能分块:递归字符分割,保留语义完整性
- 向量存储:ChromaDB 本地持久化
- 混合检索:向量语义检索 + 关键词 BM25
- Embedding:DashScope text-embedding-v3(通义千问)
- CLI 管理:add / remove / list / query / stats
使用方式
# 添加文档到知识库
python3 scripts/kb_manager.py add /path/to/document.pdf --collection default
# 添加整个目录
python3 scripts/kb_manager.py add /path/to/docs/ --collection project-docs
# 查询知识库
python3 scripts/kb_manager.py query "什么是 OpenClaw 的架构?" --top-k 5
# 列出所有 collection
python3 scripts/kb_manager.py list
# 查看统计
python3 scripts/kb_manager.py stats
# 删除文档
python3 scripts/kb_manager.py remove --source /path/to/document.pdf
# 导出检索结果为上下文(供 LLM 使用)
python3 scripts/kb_manager.py context "用户问题" --max-tokens 4000
配置
环境变量 DASHSCOPE_API_KEY 用于 embedding 模型调用。
数据存储在 ~/.openclaw/data/chromadb/。
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 43 lines · 0 tokens per session scan A 1ec5ca4d1970
rag-knowledge-base is a skill published in the GitHub repository xyva-yuangui/XyvaClaw (21 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 360 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
rag-assistant
A local knowledge-base assistant for answering questions from indexed private documents. It searches the stored documents, checks whether the results are relevant, and cites the source files in its answers.
mastra
Comprehensive Mastra framework guide. Teaches how to find current documentation, verify API signatures, and build agents and workflows. Covers documentation lookup strategies (embedded docs, remote docs), core concepts (agents vs workflows, tools, memory, RAG), TypeScript requirements, and common patterns. Use this…
markitdown
Converts heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.
agents-llamaindex
Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…
xberg-picking-a-format
Use when choosing an output format for extracted documents — plain text, markdown, djot, HTML, JSON, or DocTags. Maps consumer (LLM, parser, archive) to the right --format / --content-format pair.
kb-retriever
A retrieval and question-answering assistant for a local folder of documents, including Markdown, text, PDFs, and spreadsheets.