360 Secure SkillHub
360 安全技能中心

OpenClaw Safe Ops

该 Skill 规定在执行 OpenClaw 网关启停、配置 set/unset、插件安装更新卸载或手工编辑 openclaw.json 之前先备份配置,操作后执行 channels status 与 status 健康检查,失败时回滚配置并重启网关,最后报告命令、备份路径与检查结果。其引用的包装脚本未随文件列表提供。

dhrxy
dhrxy
热度 61.01
最近更新 2026-05-11 17:29:44
分类:自动化依赖:代码执行 / 读写文件应用场景:工作流 / 自动化脚本 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add openclaw-safe-ops
Metadata
name
openclaw-safe-ops
description
Guards high-risk OpenClaw operations with preflight backups, post-change health checks, and rollback guidance. Use when running gateway restart/start/stop, config set/unset, plugin install/update/uninstall, or editing openclaw.json.

OpenClaw Safe Ops

When To Apply

Apply this skill before any high-risk OpenClaw operation:

  • openclaw gateway restart|start|stop|install|uninstall|run|status
  • openclaw config set|unset
  • openclaw plugins install|update|uninstall|enable|disable
  • Manual edits to ~/.openclaw/openclaw.json

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.
  3. 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
    • openclaw status --deep

Preferred Command Wrapper

For local terminal operations, prefer:

  • ./scripts/openclaw-safe.sh <openclaw args...>

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