← 返回 Skills 市场
allthebadthings

Gateway Safety

作者 allthebadthings · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
289
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install gateway-safety
功能描述
Safely update OpenClaw gateway configuration (openclaw.json) with automatic validation, backup, and 30-second health-check rollback. Use this skill whenever...
使用说明 (SKILL.md)

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.
  2. 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.
  3. 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).
  2. 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.

安全使用建议
This skill appears to implement the stated safe-update behavior, but before installing or invoking it: 1) Verify jq and the openclaw CLI exist on target hosts and are the expected tools (the metadata does not declare these binaries). 2) Inspect and confirm the script's file paths ($HOME/.openclaw, $HOME/.rook) and ensure you accept logs/backups being written there. 3) Understand the lockout behavior: after 3 failures the script creates a GATEWAY_LOCKOUT file and instructs agents to stop and 'wait for Kevin' — confirm who is the intended approver and update messaging/policy if needed. 4) Consider testing the script in a safe environment (non-production gateway) to see how restart/status behave and to confirm rollback works. 5) Recommend updating the skill metadata to list required binaries (jq, openclaw) and/or hardening the script (check that CONFIG_PATH exists before copying, validate permissions, and avoid reliance on a single named human in automated messaging).
功能分析
Type: OpenClaw Skill Name: gateway-safety Version: 1.0.0 The skill bundle provides a utility for safely updating the OpenClaw gateway configuration file (~/.openclaw/openclaw.json). The included script (safe-gateway-update.sh) implements standard safety procedures including JSON validation via jq, automatic backups, health-check polling, and a rollback mechanism if the gateway fails to restart. It also includes a failure counter and a lockout file mechanism to prevent automated agents from entering a 'death loop' of failed configuration attempts.
能力评估
Purpose & Capability
The skill claims to safely update the gateway config and the provided script implements that. However, the metadata declares no required binaries while the script calls external commands (jq for JSON validation and openclaw for restart/status). The missing declared dependencies is an incoherence: the skill will fail or behave unpredictably if those binaries are absent or not the expected implementations.
Instruction Scope
SKILL.md restricts actions to using the included script and describes the backup/validate/restart/rollback flow. The scope is limited to gateway config files in $HOME/.openclaw and agent-facing behavior. Note: the script assumes an existing config at $HOME/.openclaw/openclaw.json (no pre-check before backing up) and writes logs to $HOME/.rook/logs and a lockout file that instructs agents to 'STOP ALL OPERATIONS' and wait for a named person ('Kevin'), which may be operationally awkward.
Install Mechanism
This is an instruction-only skill with an included shell script and no install spec — low install risk. Nothing is downloaded or installed by the skill bundle itself.
Credentials
The skill declares no required environment variables or credentials, which is fine, but the script uses $HOME paths and external binaries without declaring them. The implicit dependency on jq and the openclaw CLI should be declared; otherwise the agent may run this when the environment is not appropriate.
Persistence & Privilege
The skill does not request persistent or elevated platform privileges; always:false. It writes backups, a known-good file, failure count, logs, and potentially a GATEWAY_LOCKOUT file in the user's home directory — expected for its purpose but worth noting because those files control agent retry behavior and include a hardcoded human contact instruction.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gateway-safety
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gateway-safety 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - prevents death loops and session loss when modifying OpenClaw gateway configs.
元数据
Slug gateway-safety
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Gateway Safety 是什么?

Safely update OpenClaw gateway configuration (openclaw.json) with automatic validation, backup, and 30-second health-check rollback. Use this skill whenever... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 289 次。

如何安装 Gateway Safety?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gateway-safety」即可一键安装,无需额外配置。

Gateway Safety 是免费的吗?

是的,Gateway Safety 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Gateway Safety 支持哪些平台?

Gateway Safety 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Gateway Safety?

由 allthebadthings(@allthebadthings)开发并维护,当前版本 v1.0.0。

💬 留言讨论