DC config-modification-safety
OpenClaw 配置安全守护。防止 AI 改坏配置文件的双层守护架构,支持 macOS 和 Windows。 触发场景:AI 修改配置文件后系统崩溃、JSON 语法错误导致 Gateway 无法启动、想给 OpenClaw 配置安全网。 核心功能: - 第一层(铜墙):配置文件变更时自动校验 JSON,语法错误 1 秒内回滚 - 第二层(铁壁):每 5 分钟检查 Gateway 健康状态,崩溃自动恢复 - 应急回滚:一行命令恢复到最后一次正常配置 安装后用户获得:铜墙铁壁级别的配置保护,AI 改配置再也不怕搞崩系统了。
As a process C 58/100 · Has gaps — weak spots: result and completion, when it triggers, inputs and preconditions
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 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.
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.
- 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 · 7
-
high Dangerous commands
cmd-persistencescripts/install.sh:27Persistence mechanism (cron / launchd / scheduled task / autorun registry)launchctl load "$PLIST_DST" 2>/dev/null || echo " (可能已加载,跳过)"
-
high Dangerous commands
cmd-persistencescripts/install.sh:34Persistence mechanism (cron / launchd / scheduled task / autorun registry)(crontab -l 2>/dev/null | grep -v "config-safety/health-check"; echo "$CRON_LINE") | crontab -
-
high Dangerous commands
cmd-persistenceSKILL.md:61Persistence mechanism (cron / launchd / scheduled task / autorun registry)launchctl unload ~/Library/LaunchAgents/com.openclaw.config-guard.plist
Medium and low: 4
-
low Dangerous commands
cmd-persistencescripts/install.sh:23Persistence mechanism (cron / launchd / scheduled task / autorun registry) (detector / deny-list definition; string literal in code, not executed)PLIST_DST="$HOME/Library/LaunchAgents/com.openclaw.config-guard.plist"
detectorcode literal -
low Dangerous commands
cmd-cron-mentionscripts/install.sh:34Mentions editing / listing crontab(crontab -l 2>/dev/null | grep -v "config-safety/health-check"; echo "$CRON_LINE") | crontab -
-
low Dangerous commands
cmd-persistencescripts/install.sh:51Persistence mechanism (cron / launchd / scheduled task / autorun registry) (detector / deny-list definition; string literal in code, not executed)echo " 卸载:launchctl unload $HOME/Library/LaunchAgents/com.openclaw.config-guard.plist && crontab -r"
detectorcode literal -
low Dangerous commands
cmd-cron-mentionSKILL.md:62Mentions editing / listing crontabcrontab -e # 删除 config-safety 那行
Files scanned: 5. 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")
Process rating: all ten parameters 58/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Progress reporting. Says nothing while it works
- 20When it triggers. No condition that starts the skill
- 50Failures and branches. 0 branches, has a failure section
- 100Tools and files. No external tools needed
- 100Steps. 11 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 571 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)
- +3Output format is not stated: the model decides each time
- -31 of 3 scripts are never mentioned in SKILL.md
- +1No license
- +2Single-language instructions
- +3Description length 263: enough signal without eating the budget
- +4Structure: 15 headings
- +3Step-by-step instructions: 11 items
- +4Has examples (6 code blocks)
Quality base 70; lint remarks subtract, signals add up to 100. Result: 69.