编程

gateway-notify

Set up automatic notifications when OpenClaw gateway restarts. Use when user wants to be notified of gateway startup events via any messaging channel (iMessage, WhatsApp, Telegram, Discord, etc.).

它能做什么

Set up automatic notifications when OpenClaw gateway restarts. Use when user wants to be notified of gateway startup events via any messaging channel (iMessage, WhatsApp, Telegram, Discord, etc.).

技能文档

Gateway Notify

Send a notification (with user confirmation) when the OpenClaw gateway starts up.

What It Does

Creates a hook that triggers on gateway:startup events and sends a minimal notification (startup timestamp only) to the user's preferred channel.

Privacy notice: This hook auto-runs on every gateway startup and sends a message to your chosen messaging channel. Only the startup timestamp is transmitted — no local configuration, model names, or network details leave your machine.

Quick Start

⚠️ Before running setup, confirm with the user:

  1. The setup script will execute shell commands and write files under ~/.openclaw/hooks/.
  2. It will restart the gateway — this will briefly disconnect the current session (requires manual reconnect if auto-reconnect is unavailable).
  3. On every subsequent gateway startup, a notification will be sent automatically to the specified messaging channel. Only the startup timestamp is transmitted — no model names, API keys, or local paths leave your machine. Note: the message passes through the third-party channel's servers, which may log message metadata (send time, sender).
  4. To uninstall: run scripts/uninstall_gateway_notify.sh or delete ~/.openclaw/hooks/gateway-restart-notify/ and restart the gateway. Deleting the skill alone does NOT stop the hook.

Ask the user to confirm they accept these actions before proceeding.

Run the setup script with the user's messaging channel and address:

scripts/setup_gateway_notify.sh  

Examples:

scripts/setup_gateway_notify.sh imessage [email protected]
scripts/setup_gateway_notify.sh whatsapp +1234567890
scripts/setup_gateway_notify.sh telegram @username

The script will (requires user confirmation before execution):

  1. Create the hook directory at ~/.openclaw/hooks/gateway-restart-notify
  2. Generate the handler with the specified channel configuration (with security hardening)
  3. Restart the gateway to activate — this will briefly disconnect the current session (OpenClaw 2026.7+ auto-loads hooks, no explicit enable needed)

How It Works

The hook uses OpenClaw's internal hook system:

  • Listens for gateway:startup events
  • Collects gateway startup time
  • Sends notification via the configured channel CLI

Supported Channels

See CHANNELS.md for channel-specific CLI commands and address formats.

Requirements

  • OpenClaw gateway 2026.7+
  • python3 in $PATH (used for safe JSON serialization during setup)
  • Channel CLI tool installed: imsg (iMessage), wacli (WhatsApp), or openclaw message (Telegram/Discord/Slack)

Supported Channels

ChannelCLIAddress format
imessageimsgEmail or phone (e.g. [email protected], +8615900000000)
whatsappwacliPhone with country code (e.g. +1234567890)
telegramopenclaw messageChat ID or @username
discordopenclaw messageChannel ID (e.g. 1234567890)
slackopenclaw messageChannel name or ID (e.g. #general)

Script Flags

FlagEffect
--forceSkip the "overwrite existing hook?" prompt only
--yesSkip the privacy confirmation prompt (for CI/automation)

Note: --force does not skip the privacy confirmation. Use --force --yes together for fully non-interactive setup.

Debugging Notifications

If notifications stop arriving, check the gateway log for [gateway-restart-notify] entries:

openclaw gateway logs | grep gateway-restart-notify

Notification failures are caught silently (to avoid blocking gateway startup) — the gateway log is the authoritative source for hook execution errors.

Manual Setup

If you need to customize the hook, see MANUAL.md for step-by-step instructions.

相关技能

按命令族和 profile 选择合适的 OpenClaw CLI 命令,并校验执行结果。

335 次安装6 星标

用一条 CLI 命令管理 Nextcloud 的笔记、任务、日历、文件、联系人和 Deck 看板。

187 次安装9 星标

为 AI 智能体订阅社区维护的安全公告情报源,及时获取威胁与漏洞更新。

作者 davida-ps103 次安装1 星标

Interact with the Maestro API to create tasks, list tasks, and send room messages using the configured OpenClaw Maestro connection.

47 次安装

运维与扩展 OpenClaw 只读仪表盘的后端、前端标签页与安全模型。

174 次安装9 星标