OpenClaw Safe Ops
When To Apply
Apply this skill before any high-risk OpenClaw operation:
- - INLINECODE0
- INLINECODE1
- INLINECODE2
- Manual edits to INLINECODE3
Safety Workflow
- 1. Capture a backup before change:
-
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.manual.$(date +%Y%m%d-%H%M%S).bak
- 2. Run the intended command.
- Validate immediately:
-
openclaw channels status --probe
-
openclaw status --deep
- 4. If checks fail, rollback:
-
cp ~/.openclaw/openclaw.json.bak ~/.openclaw/openclaw.json
-
openclaw gateway restart
- INLINECODE9
Preferred Command Wrapper
For local terminal operations, prefer:
This wrapper auto-backs up config for risky actions, runs health checks, and rolls back on failure.
Output Requirements
When completing a risky operation, report:
- - Command executed
- Backup path used
- Health check results
- Whether rollback was needed
技能名称:openclaw-safe-ops
详细描述:
OpenClaw 安全操作
适用场景
在执行任何高风险 OpenClaw 操作前应用此技能:
- - openclaw gateway restart|start|stop|install|uninstall|run|status
- openclaw config set|unset
- openclaw plugins install|update|uninstall|enable|disable
- 手动编辑 ~/.openclaw/openclaw.json
安全工作流程
- 1. 变更前创建备份:
- cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.manual.$(date +%Y%m%d-%H%M%S).bak
- 2. 执行目标命令。
- 立即验证:
- openclaw channels status --probe
- openclaw status --deep
- 4. 若检查失败则回滚:
- cp ~/.openclaw/openclaw.json.bak ~/.openclaw/openclaw.json
- openclaw gateway restart
- openclaw status --deep
推荐命令封装
对于本地终端操作,建议使用:
- - ./scripts/openclaw-safe.sh
该封装脚本会自动为风险操作备份配置、执行健康检查,并在失败时自动回滚。
输出要求
完成风险操作后需报告:
- - 已执行的命令
- 使用的备份路径
- 健康检查结果
- 是否需要回滚