Skill: bigcat-byebye/ntfy-notify (version 1.0.5)

--- name: ntfy-notify description: Send ntfy.sh notifications with curl, including advanced headers like title, priority, tags, click links, action buttons, and image attachments. Use when a user asks to send basic or rich ntfy notifications to a topic. --- # ntfy-notify Send notifications to ntfy topics. ## Author - Name: 沉舟 - Website: https://chenzhou.dev ## Default topic - [REDACTED_SECRET] ## Script Use: ```bash skills/ntfy-notify/scripts/send_ntfy.sh ``` ### Parameters - `--topic` topic name - `--message` body text - `--title` notification title - `--priority` 1-5 - `--tags` comma-separated tags - `--click` URL opened on tap - `--actions` ntfy actions header string (supports buttons) - `--attach` URL to an image/file shown as attachment - `--filename` optional attachment filename hint ## Button format Pass buttons via `--actions` as a variable string. Example format: ```text view, Open docs, https://docs.openclaw.ai; http, Trigger API, https://example.com/hook ``` ## Examples Basic (explicit message): ```bash skills/ntfy-notify/scripts/send_ntfy.sh --message "你好，老爷" ``` Default message (omit --message, script auto-generates timestamp text): ```bash skills/ntfy-notify/scripts/send_ntfy.sh ``` Rich notification with buttons and image: ```bash skills/ntfy-notify/scripts/send_ntfy.sh \ --title "Deploy finished" \ --message "Build #42 is ready" \ --priority 4 \ --tags "rocket,white_check_mark" \ --click "https://example.com/build/42" \ --actions "view, Open build, https://example.com/build/42; view, Open docs, https://docs.openclaw.ai" \ --attach "https://picsum.photos/1200/630" ```

path: scripts/send_ntfy.sh
content: #!/usr/bin/env bash
set -euo pipefail

TOPIC=[REDACTED_SECRET]
MESSAGE=""
TITLE=""
PRIORITY=""
TAGS=""
CLICK=""
ACTIONS=""
ATTACH=""
FILENAME=""

usage() {
  cat <<'EOF'
Usage:
  send_ntfy.sh [--topic TOPIC] [--message TEXT] [--title TEXT] [--priority 1-5]
               [--tags a,b,c] [--click URL] [--actions ACTIONS]
               [--attach URL] [--filename NAME]

Notes:
  --actions format follows ntfy header syntax, example:
    "view, Open docs, https://docs.openclaw.ai; http, Trigger, https://example.com/hook"
EOF
}

while [[ $# -gt 0 ]]; do
  case "$1" in
    --topic) TOPIC="$2"; shift 2 ;;
    --message) MESSAGE="$2"; shift 2 ;;
    --title) TITLE="$2"; shift 2 ;;
    --priority) PRIORITY="$2"; shift 2 ;;
    --tags) TAGS="$2"; shift 2 ;;
    --click) CLICK="$2"; shift 2 ;;
    --actions) ACTIONS="$2"; shift 2 ;;
    --attach) ATTACH="$2"; shift 2 ;;
    --filename) FILENAME="$2"; shift 2 ;;
    -h|--help) usage; exit 0 ;;
    *)
      echo "Unknown argument: $1" >&2
      usage >&2
      exit 1
      ;;
  esac
done

if [[ -z "$MESSAGE" ]]; then
  NOW_UTC="$(date -u +"%Y-%m-%d %H:%M:%S UTC")"
  MESSAGE="这是一条默认消息，现在是${NOW_UTC}，来自沉舟老爷的小跟班"
fi

CMD=(curl -fsS -d "$MESSAGE")

[[ -n "$TITLE" ]] && CMD+=(-H "Title: $TITLE")
[[ -n "$PRIORITY" ]] && CMD+=(-H "Priority: $PRIORITY")
[[ -n "$TAGS" ]] && CMD+=(-H "Tags: $TAGS")
[[ -n "$CLICK" ]] && CMD+=(-H "Click: $CLICK")
[[ -n "$ACTIONS" ]] && CMD+=(-H "Actions: $ACTIONS")
[[ -n "$ATTACH" ]] && CMD+=(-H "Attach: $ATTACH")
[[ -n "$FILENAME" ]] && CMD+=(-H "Filename: $FILENAME")

CMD+=("https://ntfy.sh/$TOPIC")

"${CMD[@]}"
echo


Security scan verdicts — ClawScan: clean | static analysis:  | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)