← 返回 Skills 市场
amar1432

Error Guard — Control‑Plane Safety

作者 Amar1432 · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
3110
总下载
8
收藏
13
当前安装
1
版本数
在 OpenClaw 中安装
/install error-guard
功能描述
System safety and control-plane skill that prevents agent deadlocks and freezes. Provides non-LLM control commands to inspect task state, flush message queues, cancel long-running work, and recover safely without restarting the container. Use when implementing or operating long-running tasks, sub-agents, benchmarks, background monitors (e.g., Moltbook, PNR checks), or when the system becomes unresponsive and needs immediate recovery controls.
使用说明 (SKILL.md)

error-guard

⚠️ System‑level skill (Advanced users)

This skill defines the control‑plane safety primitives for OpenClaw. It is intentionally minimal, non‑blocking, and designed to prevent agent freezes, deadlocks, and unrecoverable states when running long‑lived or high‑risk workloads.

Design Principles

Warning: This skill operates at the agent control‑plane level. It should be installed only by users who understand OpenClaw’s execution model and are running workloads that can block, hang, or run for extended periods.

  • Main agent never blocks: no long exec, no external I/O, no LLM calls.
  • Event-driven: workers emit events; the control plane listens.
  • Fail-safe first: recovery commands must always respond.
  • Minimal state: track only task metadata (never payloads).

Command Surface (Phase 1)

/status

Report current system health and task registry state.

Returns:

  • Active tasks (taskId, type, state)
  • Start time and last heartbeat
  • Flags for stalled or overdue tasks

Constraints:

  • Must run in constant time
  • Must not call any model or external API

/flush

Emergency stop.

Immediately:

  • Cancel all active tasks
  • Kill active exec/process sessions
  • Clear pending message queue
  • Reset in-memory task registry

Constraints:

  • Must always respond
  • No waiting on workers
  • No model calls

/recover

Safe recovery sequence.

Steps:

  1. Execute /flush
  2. Reset control-plane state
  3. Optionally reload skills/state (no container restart)

Future Extensions (Not Implemented Yet)

  • Sub-agent runner helper (event-driven)
  • Task watchdogs with TTL and silence detection
  • Structured event protocol (task.started, task.heartbeat, task.completed, ...)
  • Back-pressure and task classes (interactive / batch / background)

Security & Privacy

  • This skill does not store payloads, prompts, messages, or model outputs
  • Only minimal task metadata is persisted (taskId, timestamps, state)
  • No API keys, credentials, or user data are read or written
  • Safe to publish and share publicly

Non-Goals

  • No business logic
  • No background polling loops
  • No user-facing features
  • No LLM reasoning paths

This skill is the last line of defense. Keep it small, fast, and reliable.

安全使用建议
What to consider before installing: - This is a control‑plane tool: it can spawn and kill sessions and will clear the in‑memory registry and attempt to kill exec sessions on /flush. Those are powerful actions that can interrupt other work; run it in a test environment first. - The skill does not ask for credentials and only persists minimal task metadata to skills/error-guard/state.json, but verify that path and file permissions are acceptable in your deployment. - Review the SDK calls (sessions_spawn, sessions_send, process.list, process.kill) to confirm they are scoped to the agent/session boundaries you expect — ensure it cannot inadvertently kill unrelated system processes. - There are a few minor code hygiene issues (odd 'as any' import syntax) — ensure the code compiles or is adapted to your runtime before enabling it in production. - If you want to reduce risk, restrict who can invoke this skill, avoid giving it always:true, and test its /flush behavior to confirm it only affects intended sessions.
功能分析
Type: OpenClaw Skill Name: error-guard Version: 1.0.0 This skill is classified as benign. It provides system-level control and recovery mechanisms, such as killing active processes and managing sub-agent sessions, which are powerful but explicitly documented in SKILL.md as core to its purpose of preventing agent deadlocks and enabling safe recovery. The code aligns with the stated purpose, with file system access limited to internal task metadata persistence (state.ts) and no evidence of data exfiltration, malicious execution, persistence, or prompt injection attempts in SKILL.md.
能力评估
Purpose & Capability
The name/description (control‑plane safety, task registry, flush/recover) match the code: registry, status/flush/recover commands, spawn and session helpers, and watchdog logic are all present and serve the stated purpose.
Instruction Scope
SKILL.md promises no LLM calls, no payload storage, and minimal state; the code follows this model (only task metadata persisted). One minor mismatch: SKILL.md says 'no external I/O' but example worker (moltbook-worker) contains a placeholder fetch simulation (currently no real network call). The control APIs (sessions_send, sessions_spawn, process.list/kill) are platform SDK calls and are expected for a control‑plane skill, but they do give the skill wide runtime reach.
Install Mechanism
No install spec (no external downloads) which is low risk. However the package contains TypeScript source files; there is no build/install instruction in SKILL.md — ensure the platform will compile/load these sources as expected. There is also a small syntax/typo artifact (imports using 'as any') that should be reviewed before runtime.
Credentials
The skill declares no environment variables, credentials, or config paths and the code does not access secrets or external API keys. Persisted state is limited to a local state.json containing only task metadata (taskId, timestamps, state).
Persistence & Privilege
This skill has significant control-plane privileges: it can spawn sub‑agents (sessions_spawn), send session messages (sessions_send), list and kill exec/sessions (process.list/process.kill), and it writes a local state file. These capabilities are coherent with its purpose but mean the skill can affect other running tasks and system behavior — test in an isolated environment and restrict who can invoke it. Note: always:true is not set (good); autonomous invocation is allowed by default (platform default).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install error-guard
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /error-guard 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Control‑plane safety skill for OpenClaw that prevents agent freezes and deadlocks using sub‑agent isolation, event‑driven execution, watchdogs, and crash‑safe recovery.
元数据
Slug error-guard
版本 1.0.0
许可证
累计安装 13
当前安装数 13
历史版本数 1
常见问题

Error Guard — Control‑Plane Safety 是什么?

System safety and control-plane skill that prevents agent deadlocks and freezes. Provides non-LLM control commands to inspect task state, flush message queues, cancel long-running work, and recover safely without restarting the container. Use when implementing or operating long-running tasks, sub-agents, benchmarks, background monitors (e.g., Moltbook, PNR checks), or when the system becomes unresponsive and needs immediate recovery controls. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 3110 次。

如何安装 Error Guard — Control‑Plane Safety?

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

Error Guard — Control‑Plane Safety 是免费的吗?

是的,Error Guard — Control‑Plane Safety 完全免费(开源免费),可自由下载、安装和使用。

Error Guard — Control‑Plane Safety 支持哪些平台?

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

谁开发了 Error Guard — Control‑Plane Safety?

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

💬 留言讨论