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/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/muduiclaw/clawking/kb-rag"><img src="https://agentmods.dev/badge/skills/muduiclaw/clawking/kb-rag.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.00074 | $0.00864 |
| Opus 5.5 | $0.00030 | $0.00346 |
| Sonnet 5.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 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.
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.
- 1mo 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 6mo ago), licensed MIT. It adds 74 tokens to every session and 864 once invoked, about $0.0003 per session on Opus 5.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
AgentDB Memory Patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
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.
agents-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…
knowledge-org
A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.
llm-wiki
Explain and apply the foundational LLM Wiki architecture and knowledge-management strategy. Use for setup, architecture, schema, or organization decisions; operational ingest/query/lint work uses dedicated skills.