BD rag
检索增强生成(Retrieval-Augmented Generation)。把本地文档建索引、按问题检索 top-k 相关分块并产出带引用的回答。支持离线抽取式与可选 LLM 生成式两种模式,纯 Python 无重依赖。当用户需要"基于自有资料问答""知识库检索""文档问答""RAG""让模型引用来源"时使用。
As a process D 48/100 · Unfinished process — weak spots: result and completion, when it triggers, inputs and preconditions
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 instructions or scripts send data out: environment variables, keys, file contents, chat history. You may never notice, because the agent performs the upload as "part of the task".
If the upload is not needed for the task, remove it: catalogs flag such skills and delist them. If it is needed, name the destination explicitly, say what leaves the machine, and give the user a switch.
How to improve
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- 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 Exfiltration
net-redirectable-api-keyscripts/rag_synthesize.py:64Helper sends the API key to a host configured by an environment variable — the key can be redirected to another serverAPI key + configurable base URL from environment
Files scanned: 8. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
description-no-whendescription does not say WHEN to use the skill (no "use when") - note
frontmatter-keyunknown frontmatter key "agent_created" - note
frontmatter-keyunknown frontmatter key "visibility"
Process rating: all ten parameters 48/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
- 20When it triggers. No condition that starts the skill
- 60Tools and files. Uses tools (python) that frontmatter does not declare
- 100Steps. 13 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 293 tokens
- 100Running it twice. No mutating operations
- 100Progress reporting. Reports progress
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
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- +4No input/output examples
- +1No license
- +2Single-language instructions
- +5Description quotes 2 example trigger phrases
- +3Description length 157: enough signal without eating the budget
- +4Structure: 5 headings
- +3Step-by-step instructions: 13 items
- +3All 5 scripts are documented
Quality base 70; lint remarks subtract, signals add up to 100. Result: 74.