AgentSkillsCN

ntfy

通过ntfy.sh发送推送通知。当您需要提醒用户任务已完成、出现错误,或等待用户输入时,这一工具能帮您快速发出通知。涵盖发送通知、订阅主题、设置优先级、添加标签与表情符号。

SKILL.md
--- frontmatter
name: ntfy
description: Send push notifications via ntfy.sh. Use for alerting user about completion, errors, or when input is needed. Covers sending notifications, subscribing to topics, priority levels, tags/emojis.

ntfy - Push Notifications

Simple HTTP-based pub-sub notification service. Send notifications to your phone/desktop with a single curl command.

Quick Reference

bash
# Basic notification
curl -d "Your message here" ntfy.sh/your-topic

# With title and priority
curl -H "Title: Alert Title" \
     -H "Priority: high" \
     -H "Tags: warning,skull" \
     -d "Message body" \
     ntfy.sh/your-topic

# Delayed notification
curl -H "Delay: 30m" -d "Reminder message" ntfy.sh/your-topic

# With clickable link
curl -H "Click: https://example.com" -d "Click to open" ntfy.sh/your-topic

Headers Reference

HeaderDescriptionExample
TitleNotification titleTitle: Server Alert
Prioritymin, low, default, high, urgentPriority: high
TagsComma-separated, supports emojisTags: warning,skull
DelayDelayed deliveryDelay: 30m or Delay: 1h
ClickURL to open on clickClick: https://...
IconCustom icon URLIcon: https://.../icon.png
EmailAlso send to emailEmail: you@example.com
AttachAttachment URLAttach: https://.../file.pdf
FilenameName for attachmentFilename: report.pdf

Priority Levels

LevelUse Case
minBackground info, low importance
lowInformational
defaultNormal notifications
highImportant, needs attention
urgentCritical, bypasses Do Not Disturb

Common Tag Emojis

TagEmojiTagEmoji
white_check_markx
warning⚠️skull💀
rocket🚀tada🎉
bug🐛fire🔥
hourglassbell🔔

Full list: https://docs.ntfy.sh/emojis/

Workflows

WorkflowPurpose
sendSend a notification
subscribeSubscribe to a topic

Setup

  1. Install app on phone: Android / iOS
  2. Subscribe to your topic in the app
  3. Send notifications via curl

No account required for public topics on ntfy.sh.

Self-Hosting

bash
# Docker
docker run -p 80:80 binwiederhier/ntfy serve

# Then use your host instead of ntfy.sh
curl -d "Test" http://localhost/mytopic

Integration with Ralph

Ralph uses ntfy for story completion notifications:

bash
# Set topic in ralph config
export RALPH_NTFY_TOPIC="your-topic-name"

# Or in ralph-ui
ralph -ui 50 --notify

API Docs