360 Secure SkillHub
360 安全技能中心

Cross-Channel Notify

该 Skill 把同一条 markdown 通知同时通过邮件(Himalaya CLI)和 iMessage(BlueBubbles 渠道)发出:先用本地脚本将正文格式化为完整 markdown 与不超过 2000 字符的纯文本两个版本,再分别发送,可用环境变量跳过任一渠道,最后报告各渠道的发送结果。

分类:协作
terrycarter1985
terrycarter1985
热度 33.64
最近更新 2026-05-12 05:41:46

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add terrycarter1985/cross-channel-notify
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
cross-channel-notify
description
Send the same notification across email (Himalaya) and iMessage (BlueBubbles) in one shot. Use when the user wants to broadcast or notify someone through multiple channels simultaneously, or asks for cross-channel / multi-channel notifications. Handles content formatting via a shared markdown template so both channels receive consistent, well-structured messages.

Cross-Channel Notify

Send a single notification through both email and iMessage with unified markdown formatting.

Prerequisites

  • Email: Himalaya CLI configured (himalaya --version). See references/channels.md for setup.
  • iMessage: BlueBubbles channel enabled in gateway config (channels.bluebubbles).

Workflow

  1. Collect inputs: to_email, to_imessage (E.164 or chat_guid), subject (email), body (markdown).
  2. Format content: Run scripts/format_message.sh to apply the shared markdown template. This produces two outputs:
    • email_body: full markdown (headers, bullet lists, signature block)
    • imessage_body: compact plain-text (stripped markdown syntax, ≤2000 chars)
  3. Send email:
    cat << 'EOF' | himalaya template send
    From: <sender>
    To: <to_email>
    Subject: <subject>
    
    <email_body>
    EOF
    
  4. Send iMessage: Use the message tool with channel: "bluebubbles", target: <to_imessage>, message: <imessage_body>.
  5. Report: Confirm both sends or surface any failures.

Format Template

scripts/format_message.sh reads the body and applies:

  • Title line (## Notification) prepended
  • Timestamp line appended
  • For email: keeps full markdown
  • For iMessage: strips #, **, bullet markers, and truncates to 2000 chars

Usage:

scripts/format_message.sh "Your message body here"
# Outputs two lines: EMAIL_BODY <tab> IMESSAGE_BODY

Channel Selection

Both channels are sent by default. To skip a channel:

  • Email only: set SKIP_IMESSAGE=1
  • iMessage only: set SKIP_EMAIL=1
SKIP_EMAIL=1 scripts/format_message.sh "Urgent: server down"

Error Handling

  • If Himalaya send fails, log the error and continue to iMessage.
  • If iMessage send fails, log the error and report partial failure.
  • Always report which channels succeeded/failed.