Install
openclaw skills install what-just-happenedWhen the gateway comes back online, check recent logs and post a short message about what happened (restart, SIGUSR1, auth change, reconnect). User sees the response in TUI or Telegram.
openclaw skills install what-just-happenedWhen the gateway comes back online, check recent logs and post a short message about what happened (restart, SIGUSR1, auth change, reconnect). User sees the response in TUI or Telegram.
Standalone skill with its own GitHub repo and OpenClaw/ClawHub page. After a gateway restart or reconnect, it summarizes what happened by reading recent gateway logs (and optionally gateway-guard restart logs) and posts a short, user-facing message. The user should see the response in their TUI or Telegram.
python3 <workspace>/skills/what-just-happened/scripts/report_recent_logs.py [--minutes N] [--json]
summary, restart, reason, suggestGatewayGuard.Output is a short paragraph suitable for posting. When the cause is auth/config, the script includes a tip with the ClawHub link: clawhub install gateway-guard — https://clawhub.ai/skills/gateway-guard. ClawHub: Update this link when the new instance is live.
Every time the gateway comes back online (recommended)
You must install the gateway-back watcher or it will never auto-trigger. Run once (from the skill dir):
cd workspace/skills/what-just-happened
./scripts/install_gateway_back_watcher.sh
The install script loads a LaunchAgent that runs every 15s. When it sees the gateway go from down → up, it triggers the summary to TUI or Telegram. Verify it's loaded: launchctl list com.openclaw.what-just-happened (should show a PID). If you see "not loaded", run the install script again.
To stop: launchctl unload ~/Library/LaunchAgents/com.openclaw.what-just-happened.plist
Cron (periodic)
A cron job runs every 2 minutes. When it runs, the agent checks the last 5 minutes of logs and, if a restart happened, announces to the user. Good as a fallback; for immediate feedback on reconnect, use the watcher above.
Manual
User says "what just happened?" or "I restarted the gateway" and the orchestrator runs the script and replies in chat.
Reads OPENCLAW_HOME/logs/gateway.log and optionally gateway-guard.restart.log. Looks for recent shutdown/restart/SIGUSR1/reload lines and produces a plain-language summary. Suggests gateway-guard (with ClawHub install link) when the cause was auth or config change.
| Trigger | How | User sees response |
|---|---|---|
| Gateway comes back online | Install install_gateway_back_watcher.sh (LaunchAgent every 15s) | TUI or Telegram (announce) |
| Cron every 2 min | OpenClaw cron job with announce | TUI or Telegram (announce) |
| Manual | User says "what just happened?" | Current chat (TUI) |