← 返回 Skills 市场
hazy2go

Agent Defibrillator

作者 Hazy · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
900
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install agent-defibrillator
功能描述
Watchdog that monitors your AI agent gateway and restarts it when it crashes. Triggers on "install defibrillator", "agent watchdog", "gateway monitor", "auto...
使用说明 (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.)
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-defibrillator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-defibrillator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug agent-defibrillator
版本 1.0.1
许可证
累计安装 3
当前安装数 2
历史版本数 2
常见问题

Agent Defibrillator 是什么?

Watchdog that monitors your AI agent gateway and restarts it when it crashes. Triggers on "install defibrillator", "agent watchdog", "gateway monitor", "auto... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 900 次。

如何安装 Agent Defibrillator?

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

Agent Defibrillator 是免费的吗?

是的,Agent Defibrillator 完全免费(开源免费),可自由下载、安装和使用。

Agent Defibrillator 支持哪些平台?

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

谁开发了 Agent Defibrillator?

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

💬 留言讨论