🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Claw Sos

by @robertfarkash29-source

Install, run, and manage the SOS emergency recovery tool for OpenClaw instances. Use when (1) the bot stops responding on Telegram/Discord and needs diagnosi...

Versionv6.1.2
Downloads597
TERMINAL
clawhub install claw-sos

πŸ“– About This Skill


name: claw-sos description: Install, run, and manage the SOS emergency recovery tool for OpenClaw instances. Use when (1) the bot stops responding on Telegram/Discord and needs diagnosis or recovery, (2) you need to install SOS on a new or existing machine, (3) autofix, rollback, network check, or Telegram test is needed, (4) the user mentions "sos", "recovery", "bot is down", "not responding", or "emergency fix".

claw-sos

Emergency recovery tool for OpenClaw. Diagnoses and fixes unresponsive bots via SSH.

Install

The script is bundled at scripts/sos.sh. Install locally:

cp scripts/sos.sh /usr/local/bin/sos
chmod +x /usr/local/bin/sos

To install on a remote machine:

scp scripts/sos.sh root@:/usr/local/bin/sos
ssh root@ "chmod +x /usr/local/bin/sos"

Alternative β€” install from GitHub:

curl -fsSL https://raw.githubusercontent.com/clawsos/claw-sos/main/install.sh | bash

Usage

Interactive (human via SSH)

sos          # whiptail arrow-key menu

Non-interactive (agent or cron)

sos auto     # autofix: diagnose β†’ doctor β†’ restart β†’ force β†’ nuclear
sos net      # network check only
sos tg       # telegram test message
sos --version
sos --help

When the bot is down β€” decision tree

1. Run sos auto β€” handles 95% of cases automatically 2. If autofix fails β†’ run sos net β€” if network is broken, fix DNS/internet first 3. If network is fine but bot still down β†’ run sos tg β€” check Telegram delivery 4. If Telegram fails β†’ check bot token validity 5. Last resort β†’ sos menu option 9 (Nuclear) β€” kills everything and starts fresh

Menu Options

| # | Name | What it does | Safe? | |---|------|-------------|-------| | 1 | Check status | Gateway running, RAM, disk, version | βœ… Read-only | | 2 | Restart | Graceful restart | βœ… Safe | | 3 | Force kill | Kill process + restart | ⚠️ Drops active sessions | | 4 | Rollback | Revert to previous version + config | ⚠️ Downgrade | | 5 | View logs | Last 50 lines of gateway log | βœ… Read-only | | 6 | Full diagnostic | RAM, disk, Telegram, sessions, process | βœ… Read-only | | 7 | Backup config | Save config + version before changes | βœ… Safe | | 8 | Self-test | Verify SOS script works | βœ… Read-only | | 9 | Nuclear | Kill ALL openclaw processes, reload | πŸ”΄ Last resort | | 10 | Autofix | Escalating auto-repair | ⚠️ May restart | | 11 | Network check | DNS, internet, Telegram API, Anthropic | βœ… Read-only | | 12 | Telegram test | Send real test message | βœ… Safe |

Autofix Escalation Order

1. Diagnose: process, RAM, disk 2. Clean RAM/disk if critical 3. openclaw doctor --fix 4. Graceful restart β†’ wait 15s β†’ check 5. Force kill + restart β†’ wait 15s β†’ check 6. Nuclear (kill all + reload)

Stops as soon as gateway is healthy.

Log Location

All actions logged to ~/.openclaw/backups/sos.log. Read this to understand what happened during recovery:

cat ~/.openclaw/backups/sos.log

Platform Support

  • Linux: Full support (systemd, journalctl, free, /proc)
  • macOS: Full support (launchctl, log show, vm_stat, purge, dialog fallback)
  • Docker: Partial β€” no systemd, manual fallback works
  • Credentials

    This skill uses no API keys or tokens of its own. It reads existing OpenClaw config to:

  • Check gateway status (local process, no network)
  • Send Telegram test messages (uses the bot token already configured in openclaw.json)
  • Check Anthropic API reachability (HTTPS ping only, no auth)
  • No credentials are stored, transmitted, or required to install or run SOS.

    Source

    GitHub: https://github.com/clawsos/claw-sos

    πŸ’‘ Examples

    Interactive (human via SSH)

    sos          # whiptail arrow-key menu
    

    Non-interactive (agent or cron)

    sos auto     # autofix: diagnose β†’ doctor β†’ restart β†’ force β†’ nuclear
    sos net      # network check only
    sos tg       # telegram test message
    sos --version
    sos --help
    

    When the bot is down β€” decision tree

    1. Run sos auto β€” handles 95% of cases automatically 2. If autofix fails β†’ run sos net β€” if network is broken, fix DNS/internet first 3. If network is fine but bot still down β†’ run sos tg β€” check Telegram delivery 4. If Telegram fails β†’ check bot token validity 5. Last resort β†’ sos menu option 9 (Nuclear) β€” kills everything and starts fresh