$npx -y skills add berabuddies/Semia --skill deadclawEmergency kill switch for OpenClaw agents. Instantly halts all running agents, pauses scheduled jobs, kills active sessions, and logs everything — triggered by a single message, a WebChat button, or a phone home screen shortcut. Includes a background watchdog that auto-kills agen
| 1 | # DeadClaw — Emergency Kill Switch for OpenClaw Agents |
| 2 | |
| 3 | > "One tap. Everything stops." |
| 4 | |
| 5 | DeadClaw is a single-purpose emergency kill switch. When triggered, it immediately |
| 6 | halts all running OpenClaw agent processes, stops Docker containers, pauses all |
| 7 | scheduled cron jobs and heartbeats, kills all active sessions, and writes a |
| 8 | timestamped incident log. It then confirms back to whichever surface triggered it. |
| 9 | |
| 10 | Works with both **native OpenClaw installs** and **Docker-based deployments** |
| 11 | (Hostinger VPS, etc.). Auto-detects your setup. |
| 12 | |
| 13 | ## Why DeadClaw Exists |
| 14 | |
| 15 | The ClawHavoc attack (February 2026) exposed 1,184 malicious skills in the OpenClaw |
| 16 | ecosystem. People run agents autonomously — often overnight, often unattended. When |
| 17 | something goes wrong, you need a way to stop everything from wherever you are, even |
| 18 | from your phone. DeadClaw is that way. |
| 19 | |
| 20 | --- |
| 21 | |
| 22 | ## Activation Methods |
| 23 | |
| 24 | DeadClaw supports three activation methods. All three execute the exact same kill |
| 25 | sequence — the only difference is how the user triggers it. |
| 26 | |
| 27 | ### Method 1: Message Trigger |
| 28 | |
| 29 | The user sends a trigger word to any connected OpenClaw channel (Telegram, WhatsApp, |
| 30 | Discord, Slack, or any other connected channel). The following words activate DeadClaw: |
| 31 | |
| 32 | - `kill` or `KILL` |
| 33 | - `dead` |
| 34 | - `stop everything` |
| 35 | - `emergency stop` |
| 36 | - `deadclaw` |
| 37 | - `🔴` |
| 38 | |
| 39 | When a trigger word is detected: |
| 40 | |
| 41 | 1. Execute `scripts/kill.sh` from the DeadClaw skill directory |
| 42 | 2. Capture the output (process count, containers stopped, cron jobs paused, timestamp) |
| 43 | 3. Send confirmation back to the **same channel** the trigger came from: |
| 44 | `🔴 DeadClaw activated. All agents stopped. [timestamp] — [X] killed ([X] processes, [X] containers). [X] cron jobs paused. See deadclaw.log for full report.` |
| 45 | |
| 46 | ### Method 2: WebChat Kill Button |
| 47 | |
| 48 | A persistent red button rendered in the OpenClaw WebChat dashboard. The HTML widget |
| 49 | is located at `ui/deadclaw-button.html`. It calls `kill.sh` via OpenClaw's WebChat |
| 50 | API hooks (`window.OpenClaw.exec()`). If the WebChat hooks are unavailable, the |
| 51 | button degrades to showing an error message with manual instructions. |
| 52 | |
| 53 | To embed the button, use OpenClaw's WebChat customization hooks: |
| 54 | |
| 55 | ```javascript |
| 56 | OpenClaw.WebChat.registerWidget('deadclaw-button', { |
| 57 | src: 'skills/deadclaw/ui/deadclaw-button.html', |
| 58 | position: 'top-bar', |
| 59 | persistent: true |
| 60 | }); |
| 61 | ``` |
| 62 | |
| 63 | ### Method 3: Phone Home Screen Shortcut |
| 64 | |
| 65 | A pre-built shortcut that sends the kill trigger message (`deadclaw`) to the user's |
| 66 | configured Telegram bot. Setup guides for iOS and Android are in `docs/`: |
| 67 | |
| 68 | - `docs/iphone-shortcut-guide.md` — iOS Shortcuts setup |
| 69 | - `docs/android-widget-guide.md` — Android widget setup (Tasker or HTTP Shortcuts) |
| 70 | |
| 71 | --- |
| 72 | |
| 73 | ## Watchdog (Passive Protection) |
| 74 | |
| 75 | DeadClaw includes a background watchdog (`scripts/watchdog.sh`) that monitors for |
| 76 | dangerous conditions and auto-triggers the kill without any user action. |
| 77 | |
| 78 | The watchdog checks every 60 seconds for (after a 5-minute startup grace period): |
| 79 | |
| 80 | 1. **Runaway loops** — Any agent process or Docker session running longer than 30 minutes |
| 81 | 2. **Token burn** — Token spend exceeding 50,000 tokens in under 10 minutes |
| 82 | 3. **Unauthorized network** — Outbound network calls to domains not on the user's whitelist |
| 83 | 4. **Sandbox escape** — Any process attempting to write outside the designated OpenClaw workspace |
| 84 | |
| 85 | The watchdog uses zero AI tokens — all checks use local system commands only. |
| 86 | |
| 87 | When the watchdog auto-triggers, it sends an alert explaining the reason: |
| 88 | `🔴 DeadClaw auto-triggered. Reason: [specific reason]. All processes stopped. Check deadclaw.log.` |
| 89 | |
| 90 | ### Watchdog Configuration |
| 91 | |
| 92 | The watchdog reads its thresholds from environment variables (with sensible defaults): |
| 93 | |
| 94 | | Variable | Default | Description | |
| 95 | |---|---|---| |
| 96 | | `DEADCLAW_MAX_RUNTIME_MIN` | 30 | Max agent runtime in minutes before auto-kill | |
| 97 | | `DEADCLAW_MAX_TOKENS` | 50000 | Max token spend in the monitoring window | |
| 98 | | `DEADCLAW_TOKEN_WINDOW_MIN` | 10 | Token spend monitoring window in minutes | |
| 99 | | `DEADCLAW_WHITELIST` | `./network-whitelist.txt` | Allowed outbound domains (one per line) | |
| 100 | | `DEADCLAW_WORKSPACE` | `$OPENCLAW_WORKSPACE` | |