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 MuduiClaw/ClawKing --skill kb-raggit clone --depth 1 https://github.com/MuduiClaw/ClawKingWrote 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/muduiclaw/clawking/kb-rag)<a href="https://agentmods.dev/skills/muduiclaw/clawking/kb-rag"><img src="https://agentmods.dev/badge/skills/muduiclaw/clawking/kb-rag.svg" alt="Measured on agentmods" 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.00074 | $0.00864 |
| Opus 5 | $0.00037 | $0.00432 |
| Sonnet 5 | $0.00015 | $0.00173 |
| Haiku 4.5 | $0.00007 | $0.00086 |
Grade A, and why
kb-rag 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Base RAG
Architecture
- Backend: qmd (BM25 + vector + hybrid reranker)
- LLM: Antigravity proxy (Gemini/Claude, $0 cost)
- Collections: 7 indexed collections, auto-updated every 5 min by OpenClaw
Collections
| Collection | Content | Path |
|---|---|---|
| kb-articles | Blog translations & analysis | output/blog-translations/ |
| kb-skills | Skill documentation | skills/**/SKILL.md |
| kb-captures | Conversation insight captures | content-pipeline/captures/ |
| kb-docs | Project documentation | docs/ |
| memory-dir | Daily notes & archives | memory/ |
| memory-root | Core memory index | MEMORY.md |
| memory-alt | Alt memory | memory.md |
Query (RAG Pipeline)
Run the RAG script for end-to-end retrieve + generate:
python3 skills/kb-rag/scripts/rag_query.py "question"
Options:
-c <collection>— limit to specific collection (e.g.kb-articles)-k <N>— top-K chunks (default 8)-m <model>— LLM model (defaultgemini-3.1-pro-high)--retrieve-only— skip LLM, just show retrieved chunks--json— JSON output
Examples:
# General KB question
python3 skills/kb-rag/scripts/rag_query.py "OpenClaw 2026.2.13 有什么重要更新"
# Search only blog articles
python3 skills/kb-rag/scripts/rag_query.py "Agent 自主付费" -c kb-articles
# Just retrieve, no generation
python3 skills/kb-rag/scripts/rag_query.py "Peter Steinberger 的创业哲学" --retrieve-only
Manual Search (without LLM)
Direct qmd commands for quick lookups:
# Hybrid search (best quality)
qmd query "search terms" -n 5
# Vector similarity (better for semantic/fuzzy)
qmd vsearch "search terms" -n 5
# Full-text BM25 (exact term matching)
qmd search "search terms" -n 5
# Limit to collection
qmd query "search terms" -c kb-articles -n 5
Ingest New Content
Add individual files
New .md files dropped into indexed directories are auto-picked up on next qmd update && qmd embed.
Add new collection
qmd collection add /path/to/dir --name collection-name --mask "**/*.md"
qmd update && qmd embed
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.
- 8d ago First seen · 95 lines · 74 tokens per session scan A 50e72e686316
kb-rag is a skill published in the GitHub repository MuduiClaw/ClawKing (11 stars, last pushed 4mo ago), licensed MIT. It adds 74 tokens to every session and 864 once invoked, about $0.0004 per session on Opus 5. 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
pinecone-research
Agent RAG and long-term memory with Pinecone.
agent-v3-memory-specialist
Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.
langchain
Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…
browserwing-admin
Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.
mem0-integration
Mem0 memory layer integration for AI agents. Implement persistent, semantic memory for long-term context retention and personalization.
install-openviking-memory
Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…