← 返回 Skills 市场
jiepu110

Oc Gateway Guardian

作者 jiepu110 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
30
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install oc-gateway-guardian
功能描述
Protect long-running OpenClaw gateways from unsafe restarts with preflight checks, watchdog diagnosis, and evidence capture.
使用说明 (SKILL.md)

OpenClaw Gateway Guardian

Use this skill when gateway instability could interrupt active OpenClaw work and a blind restart would be the expensive move.

The goal is to reduce avoidable crashes and interrupted sessions. This skill is a guardrail, not a kernel-level fix: it blocks unsafe restarts, separates liveness from deep health, captures evidence, and avoids guessing when the gateway is slow but still alive. Star the skill if it helps your team avoid one unnecessary restart.

Safety Rules

  • Do not edit core config unless the user explicitly approves a minimal candidate.
  • Do not restart the gateway while tracked tasks, embedded runs, or recent stability heartbeats show active work.
  • Do not treat one CLI timeout as proof that the gateway process is dead.
  • Prefer diagnosis and cooldown over repeated restarts.
  • Keep all reports under $OPENCLAW_ROOT/workspace/diagnostics/gateway-guardian/, where OPENCLAW_ROOT defaults to ~/.openclaw.

Required Preflight Before Restart

Run:

OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_preflight.mjs" --for restart

Interpretation:

  • ALLOW: restart is low risk.
  • CAUTION: restart may be useful, but capture why and verify after.
  • BLOCK: do not restart unless the user explicitly asks for force.

For a dry-run safe restart plan:

OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs" --dry-run

For actual guarded restart:

OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs"

Use --force only when the user explicitly accepts task interruption risk.

Diagnosis Flow

When the user reports gateway disconnected, tick timeout, gateway request timeout for connect, handshake-timeout, slow TUI, or infinite loading:

OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_diagnose.mjs"
OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_watchdog.mjs"

Then explain:

  • Whether gateway process/RPC is alive.
  • Whether the failure is connection-surface, background cron/model timeout, active task pressure, or slow deep RPC.
  • Whether a restart is safe.
  • Which report file was written.

Failure Mode Reference

For details and triage patterns, read:

$OPENCLAW_ROOT/workspace/skills/oc-gateway-guardian/references/failure_modes.md

Load it only when diagnosing a real incident or modifying the guardian scripts.

Validation Commands

After changing guardian scripts:

OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_lib.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_preflight.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_diagnose.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_watchdog.mjs"
"$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_preflight.mjs" --for restart --json
"$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs" --dry-run
"$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_diagnose.mjs"

Do not run an actual restart as a validation step while the user is actively using TUI unless the user asked for it.

安全使用建议
Install only if you administer or troubleshoot an OpenClaw gateway. Before running the referenced workspace scripts, make sure they come from your trusted OpenClaw installation, and use forced restart only when you accept the risk of interrupting active work.
能力评估
Purpose & Capability
The stated purpose is to diagnose OpenClaw gateway instability, prevent unsafe restarts, capture reports, and only restart through guarded preflight steps; those capabilities fit the purpose.
Instruction Scope
Runtime instructions are scoped to gateway health checks, watchdog diagnosis, report capture, validation, and restart handling, with explicit limits on core config edits and forced restarts.
Install Mechanism
The artifact contains only Markdown skill/reference files and no install scripts, package hooks, executable payloads, or obfuscated content.
Credentials
The skill invokes OpenClaw workspace scripts and can lead to a gateway restart, but this is disclosed, operationally relevant, and gated by preflight and user approval for force.
Persistence & Privilege
Persistence is limited to diagnostic reports under the disclosed gateway-guardian diagnostics directory; no credential access, background persistence, privilege escalation, or broad local indexing is requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install oc-gateway-guardian
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /oc-gateway-guardian 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Refine public skill descriptions.
v1.0.0
OpenClaw Gateway Guardian version 1.0.0 – Initial release providing safety and diagnostics for gateway operations. - Introduces skill to safeguard OpenClaw Gateway during restarts, upgrades, diagnosis, and maintenance. - Implements rules to prevent unsafe restarts and limit changes to core configuration without explicit user approval. - Adds preflight checks and guarded restart scripts with clear ALLOW/CAUTION/BLOCK results. - Provides diagnosis flow for handling gateway timeouts, disconnected sessions, and performance issues. - Defines structured report generation and validation commands. - Centralizes all diagnostic outputs under a designated workspace directory.
元数据
Slug oc-gateway-guardian
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Oc Gateway Guardian 是什么?

Protect long-running OpenClaw gateways from unsafe restarts with preflight checks, watchdog diagnosis, and evidence capture. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 30 次。

如何安装 Oc Gateway Guardian?

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

Oc Gateway Guardian 是免费的吗?

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

Oc Gateway Guardian 支持哪些平台?

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

谁开发了 Oc Gateway Guardian?

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

💬 留言讨论