DF smart-agent-template
Smart Agent 工作流模板:三重判断机制 + 自动更新 + Context 优化。包含完整的任务执行规范、WBS 拆分、流程豁免阈值、记忆管理等最佳实践。
As a process F 35/100 · Will not run — References files that are not bundled: docs/TASK_EXECUTION.md, docs/MEMORY_MANAGEMENT.md
What is at stake
The skill contains fragments that, in the wrong hands, cost money or data. Below: what the installer risks and what the author should do.
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.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
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
- Address the high-severity findings: each costs 18 safety points. If one is a false positive, add the rule id to guard.allow in spec.yaml.
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- The text references files that are not there: add them or drop the references.
- 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 · 16
-
high Exfiltration
exfil-webhook-urldocs/FEISHU_INTEGRATION.md:95Webhook / callback URL commonly used for exfiltration (verify the destination)# 例:https://abc1…app/
-
high Dangerous commands
cmd-pipe-to-shelldocs/OLLAMA_SETUP.md:18Downloads and executes remote code from an unrecognised host (pipe to shell)curl -fsSL https://ollama.com/install.sh | sh
Medium and low: 14
-
medium Broad scope
meta-agent-memory-dumpIDENTITY.mdAgent memory / workspace files bundled with the skill (2) — likely a workspace dump with personal data or tokensIDENTITY.md, memory/hot.md
-
medium Exfiltration
net-redirectable-api-keyintegrations/feishu/config.py:45Helper 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
-
low Exfiltration
exfil-webhook-urldocs/FEISHU_INTEGRATION.md:27Webhook / callback URL commonly used for exfiltration (verify the destination) (placeholder value)- 把 ngrok URL 填入(格式:`https://xxxx.ngrok-free.app/`)
placeholder -
low Dangerous commands
cmd-background-processdocs/FEISHU_INTEGRATION.md:125Starts a background / autostarted processnohup python bot.py > feishu-bot.log 2>&1 &
-
low Dangerous commands
cmd-background-processdocs/FEISHU_INTEGRATION.md:207Starts a background / autostarted processsystemctl enable feishu-bot
-
low Exfiltration
read-dotenvintegrations/feishu/DEPLOYMENT.md:83Reads a .env filecp .env.example .env
-
low Dangerous commands
cmd-background-processintegrations/feishu/DEPLOYMENT.md:145Starts a background / autostarted processnohup ./start_longconn.sh > bot.log 2>&1 &
-
low Dangerous commands
cmd-background-processintegrations/feishu/DEPLOYMENT.md:186Starts a background / autostarted processsudo systemctl enable feishu-bot
-
low Exfiltration
exfil-webhook-urlintegrations/feishu/LOCAL_TEST.md:35Webhook / callback URL commonly used for exfiltration (verify the destination) (placeholder value)# 复制 ngrok 输出的 URL(格式:https://xxxx.ngrok-free.app/)
placeholder -
low Exfiltration
exfil-webhook-urlintegrations/feishu/LOCAL_TEST.md:43Webhook / callback URL commonly used for exfiltration (verify the destination) (placeholder value)4. 配置请求 URL:`https://xxxx.ngrok-free.app/`(ngrok 的 URL)
placeholder -
low Exfiltration
read-dotenvintegrations/feishu/README.md:51Reads a .env filecp .env.example .env
-
low Exfiltration
exfil-webhook-urlintegrations/feishu/README.md:104Webhook / callback URL commonly used for exfiltration (verify the destination) (placeholder value)# 格式:https://xxxx.ngrok.io/
placeholder -
low Exfiltration
read-dotenvintegrations/feishu/start.sh:12Reads a .env file (quoted — discussed, not commanded)echo " cp .env.example .env"
quoted -
low Secrets in code
secret-password-literalprocess-standards/core/SECURITY_CHECK.md:55Hard-coded password / key literal (may be an example) (placeholder value)原始:api_key = "sk-1…def"
placeholder
Files scanned: 68. 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") - warning
missing-refreference to a missing file: docs/TASK_EXECUTION.md - warning
missing-refreference to a missing file: docs/MEMORY_MANAGEMENT.md
Process rating: all ten parameters 35/100
- 0Tools and files. 2 referenced file(s) missing: docs/TASK_EXECUTION.md, docs/MEMORY_MANAGEMENT.md
- 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
- 0Progress reporting. Says nothing while it works
- 20When it triggers. No condition that starts the skill
- 100Steps. 24 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 281 tokens
- 100Running it twice. No mutating operations
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 81: 120–800 characters recommended
- +3Output format is not stated: the model decides each time
- -37 of 8 scripts are never mentioned in SKILL.md
- +1No license
- +2Single-language instructions
- +4Structure: 11 headings
- +3Step-by-step instructions: 24 items
- +4Has examples (2 code blocks)
- +4Reference files are cited in the instructions (1 of 5)
Quality base 70; lint remarks subtract, signals add up to 100. Result: 61.