CC xiaoyaoclaw-kb-retriever
OpenClaw local knowledge-base retriever & QA over a local directory (md/pdf/xlsx): hierarchical data_structure.md index navigation + progressive retrieval, core retrieval zero-dependency, Windows & macOS (PDF/Excel need on-demand pip packages, see skill body). Retrieval itself is read-only; the skill also ships optional maintenance scripts that WRITE files inside the knowledge base — scripts/build_index.py generates/updates data_structure.md index files, scripts/extract_pdf_text.py writes derived .txt files, and scripts/convert_pdf_to_images.py writes page PNGs for the optional OCR path — and those run only when the user asks for indexing/PDF text extraction and confirms the write. Every write target is resolved to its real path and must stay inside the knowledge-base root (symlinks cannot redirect a write outside). Reads use the same gate: each entry's real path must stay inside the root, and entries that escape it (symlinked files/folders) are skipped, never read — so the search cannot be steered outside the knowledge base either. The PDF helpers additionally accept only real (non-symlinked) source paths: a source path containing any symlink is refused outright, so they never read outside the knowledge base by following a link. Use when user asks to retrieve/answer from a knowledge base directory (knowledge base/retrieve/ RAG over local files), 或明确要求生成/更新索引、把 PDF 转文本。中文:面向本地知识库目录的检索和问答助手。 核心流程:(1)分层 data_structure.md 索引导航 (2)遇到 PDF/Excel 时必须先读取 references 学习处理方法 (3)处理文件后再检索。按文件类型组合使用 grep/Select-String、read、pdfplumber、pandas 进行渐进式检索,避免整文件加载。 用户问题涉及"从知识库目录回答问题/检索信息/查资料/knowledge base/本地知识库检索"时使用。 与 xiaoyaoclaw-workspace-initializer(目录规范)、xiaoyaoclaw-memory-distill(记忆蒸馏)、 xiaoyaoclaw-task-progress-tracker(任务进度)组成四件套。
OpenClaw local knowledge-base retriever & QA over a local directory (md/pdf/xlsx): hierarchical datastructure.md index navigation + progressive retrieval…
As a process C 61/100 · Has gaps — weak spots: result and completion, inputs and preconditions, failures and branches
What is at stake
Medium-severity findings: the skill is probably honest, but read what alarmed the scanner.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The skill asks for more than the task needs: broad tool access, credential environment variables, binaries. Every extra permission widens the damage from a mistake or a compromise.
Narrow allowed-tools and the variable list to the minimum; replace binaries with readable sources or scripts.
How to improve
- Shorten the description to 1024 characters.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 1
✓ No critical or high findings
Medium and low: 1
-
medium Broad scope
meta-broad-allowed-toolsSKILL.md:1Broad tool permissions pre-approved: Bashallowed-tools: Read Glob Grep Bash Write Edit
Files scanned: 16. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- error
description-longdescription is 1747 chars, limit 1024 - note
description-budgetdescription takes 1747 of the ~15000-char shared budget for all skills
Process rating: all ten parameters 61/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Failures and branches. Linear process with no failure handling
- 70When it triggers. States when to use, but not when not to
- 100Tools and files. Tools declared in frontmatter
- 100Steps. 170 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 3330 tokens
- 100Running it twice. No mutating operations
- 100Progress reporting. Reports progress
- low 11 top-level sections: this looks like several domains in one skill
- low The response is described with custom markup (6 tags): a typed call is more reliable
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Description length 1746: 120–800 characters recommended
- +3Output format is not stated: the model decides each time
- -218 emoji in the instructions: noise for the model
- +2Single-language instructions
- +4Structure: 25 headings
- +3Step-by-step instructions: 170 items
- +4Has examples (3 code blocks)
- +4Reference files are cited in the instructions (3 of 3)
- +3All 5 scripts are documented
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 59.