Gateway Safety
This skill ensures that any modifications to the OpenClaw gateway configuration are done safely. It prevents "death loops" and permanent session loss by verifying the gateway can successfully reboot before committing to a new config.
Core Rules
- 1. Mandatory Script Use: Never edit
~/.openclaw/openclaw.json directly. Always use the provided safe-gateway-update.sh script. - Anti-Loop Policy: If the script fails 3 times consecutively, it will create a
GATEWAY_LOCKOUT file. If this file exists, STOP ALL OPERATIONS and wait for Kevin. Do not attempt to bypass the lockout. - Backup Awareness: The script maintains its own backups, but for critical changes, manually verify
~/.openclaw/openclaw.json.known-good is up to date.
Usage
To update the gateway configuration:
- 1. Prepare the new configuration JSON file (e.g., at
/tmp/new_config.json). - Execute the safety script:
[SKILL_PATH]/scripts/safe-gateway-update.sh /tmp/new_config.json [timeout_seconds]
- 3. The script will:
- Validate the JSON syntax.
- Backup the current config.
- Apply the new config and restart the gateway.
- Poll for a successful "RPC probe: ok" status.
- Roll back to the previous config if the health check fails or times out.
Authorship
Created by Kevin Smith & Rook (Orbit Smith), March 2026.
网关安全
此技能确保对OpenClaw网关配置的任何修改都能安全进行。它通过验证网关在提交新配置前能够成功重启,从而防止死循环和永久性会话丢失。
核心规则
- 1. 强制使用脚本:切勿直接编辑~/.openclaw/openclaw.json。始终使用提供的safe-gateway-update.sh脚本。
- 防循环策略:如果脚本连续失败3次,将创建一个GATEWAY_LOCKOUT文件。如果该文件存在,停止所有操作并等待Kevin处理。请勿尝试绕过锁定。
- 备份意识:脚本会维护自身的备份,但对于关键更改,请手动验证~/.openclaw/openclaw.json.known-good是否为最新版本。
使用方法
要更新网关配置:
- 1. 准备新的配置JSON文件(例如,位于/tmp/new_config.json)。
- 执行安全脚本:
bash
[SKILL
PATH]/scripts/safe-gateway-update.sh /tmp/newconfig.json [超时秒数]
- 3. 脚本将:
- 验证JSON语法。
- 备份当前配置。
- 应用新配置并重启网关。
- 轮询检查是否成功返回RPC探测:正常状态。
- 如果健康检查失败或超时,则回滚到之前的配置。
作者信息
由Kevin Smith和Rook(Orbit Smith)于2026年3月创建。