← Back to Skills Marketplace
hazy2go

Agent Defibrillator

by Hazy · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
900
Downloads
0
Stars
2
Active Installs
2
Versions
Install in OpenClaw
/install agent-defibrillator
Description
Watchdog that monitors your AI agent gateway and restarts it when it crashes. Triggers on "install defibrillator", "agent watchdog", "gateway monitor", "auto...
README (SKILL.md)

Agent Defibrillator

Watchdog service that monitors your AI agent gateway and restarts it when it crashes.

What It Does

  • Checks gateway health every 10 minutes
  • Detects crashes and stale processes
  • Auto-restarts with cooldown protection
  • Optional Discord notifications on restart
  • Detects version mismatches after updates

Install

Recommended (review code first):

git clone https://github.com/hazy2go/agent-defibrillator.git
cd agent-defibrillator
./install.sh

Verify

launchctl list | grep defib

Configure

Edit ~/.openclaw/scripts/defibrillator.sh:

Variable Default Description
DEFIB_GATEWAY_LABEL ai.openclaw.gateway launchd service label
DEFIB_RETRY_DELAY 10 Seconds between retries
DEFIB_MAX_RETRIES 3 Retries before restart
DEFIB_COOLDOWN 300 Seconds between restarts
DISCORD_CHANNEL (empty) Your channel ID for notifications

Commands

# View logs
tail -f ~/.openclaw/logs/defibrillator.log

# Manual check
~/.openclaw/scripts/defibrillator.sh

# Stop watchdog
launchctl bootout gui/$(id -u)/com.openclaw.defibrillator

# Restart watchdog
launchctl kickstart -k gui/$(id -u)/com.openclaw.defibrillator

Uninstall

launchctl bootout gui/$(id -u)/com.openclaw.defibrillator
rm ~/Library/LaunchAgents/com.openclaw.defibrillator.plist
rm ~/.openclaw/scripts/defibrillator.sh

Requirements

  • macOS (uses launchd)
  • AI agent running via launchd (OpenClaw, etc.)
Usage Guidance
This package appears to do what it says: a macOS launchd watchdog for an OpenClaw gateway. Before installing: 1) Review defibrillator.sh and install.sh yourself (do not blindly run curl | bash). 2) Be aware the installer writes to ~/Library/LaunchAgents and ~/.openclaw and will call the OpenClaw CLI and a local health endpoint; if you don't trust existing OpenClaw config, audit those calls. 3) If you enable Discord notifications, set DISCORD_CHANNEL deliberately; the notify function uses OpenClaw's messaging, which will use whatever Discord credentials OpenClaw already has. 4) If uncertain, install from a local clone, run the script manually first, and test uninstall steps to ensure you can remove the service.
Capability Analysis
Type: OpenClaw Skill Name: agent-defibrillator Version: 1.0.1 The skill's core functionality is benign, designed to monitor and restart the OpenClaw gateway. However, the `install.sh` script downloads `defibrillator.sh` from a remote GitHub URL, and the `README.md` promotes a `curl | bash` one-liner for installation. These practices (found in `install.sh` and `README.md`) introduce a significant supply chain vulnerability, allowing remote code execution if the GitHub repository (`https://raw.githubusercontent.com/hazy2go/agent-defibrillator/main/`) were compromised. While the current code itself does not exhibit malicious intent, this RCE risk classifies it as suspicious.
Capability Assessment
Purpose & Capability
Name/description (agent watchdog) align with the code and README: scripts monitor a launchd gateway, check responsiveness/version, and restart via launchctl. Required actions (writing to ~/Library/LaunchAgents, ~/.openclaw/scripts, and logs) are consistent with providing a persistent watchdog.
Instruction Scope
SKILL.md and scripts instruct the agent to install and run a launchd service and to read local state (process list, session file mtime, local health endpoint). Those actions are necessary for a watchdog, but the script touches ~/.openclaw/agents/main/sessions/sessions.json (reads mtime) and calls openclaw commands and localhost health endpoints — review if you are uncomfortable with a tool inspecting or interacting with local agent state/CLI.
Install Mechanism
No formal install spec in registry, but the package includes install.sh and defibrillator.sh. install.sh may download defibrillator.sh from raw.githubusercontent.com (a common but unaudited source) and README recommends a curl | bash one-liner. Downloading and executing remote scripts is convenient but increases risk — prefer cloning the repo and auditing scripts before running.
Credentials
The skill requires no extra environment variables or external credentials. It relies on existing OpenClaw CLI/config and the user's launchd privileges, which are proportional for a tool that manages the OpenClaw gateway. Note: it reads session file timestamps and invokes openclaw message send (for Discord notifications), so it will use whatever OpenClaw configuration/credentials exist on the host.
Persistence & Privilege
The installer creates a per-user launchd agent under ~/Library/LaunchAgents and scripts under ~/.openclaw — expected for a persistent watchdog. always:true is not set. The skill does not modify other skills' configurations or system-wide settings beyond the user's LaunchAgents.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-defibrillator
  3. After installation, invoke the skill by name or use /agent-defibrillator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Security fixes: removed hardcoded Discord channel, recommend git clone over curl|bash
v1.0.0
Initial release: Watchdog that monitors AI agent gateway and auto-restarts on crash. macOS launchd service with Discord notifications.
Metadata
Slug agent-defibrillator
Version 1.0.1
License
All-time Installs 3
Active Installs 2
Total Versions 2
Frequently Asked Questions

What is Agent Defibrillator?

Watchdog that monitors your AI agent gateway and restarts it when it crashes. Triggers on "install defibrillator", "agent watchdog", "gateway monitor", "auto... It is an AI Agent Skill for Claude Code / OpenClaw, with 900 downloads so far.

How do I install Agent Defibrillator?

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

Is Agent Defibrillator free?

Yes, Agent Defibrillator is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Agent Defibrillator support?

Agent Defibrillator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Defibrillator?

It is built and maintained by Hazy (@hazy2go); the current version is v1.0.1.

💬 Comments