← Back to Skills Marketplace
amar1432

Error Guard — Control‑Plane Safety

by Amar1432 · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
3110
Downloads
8
Stars
13
Active Installs
1
Versions
Install in OpenClaw
/install error-guard
Description
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.
README (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.

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install error-guard
  3. After installation, invoke the skill by name or use /error-guard
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug error-guard
Version 1.0.0
License
All-time Installs 13
Active Installs 13
Total Versions 1
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 3110 downloads so far.

How do I install Error Guard — Control‑Plane Safety?

Run "/install error-guard" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Error Guard — Control‑Plane Safety free?

Yes, Error Guard — Control‑Plane Safety is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Error Guard — Control‑Plane Safety support?

Error Guard — Control‑Plane Safety is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Error Guard — Control‑Plane Safety?

It is built and maintained by Amar1432 (@amar1432); the current version is v1.0.0.

💬 Comments