imessage

v2026.09.24

Build, debug, or migrate iMessage integrations with Photon. Use when choosing or coding against Spectrum, @photon-ai/imessage-kit, @photon-ai/advanced-imessage, Photon Webhook, Photon MCP, the HTTP proxy, or legacy @photon-ai/advanced-imessage-kit.

GitHub
安装命令
npx skhub add photon-hq/imessage
Markdown
SKILL.md

iMessage

Package boundary

Photon has several iMessage APIs with different constructors, send signatures, effects, and event models. Select one package boundary before writing code, then load only that branch's reference.

  1. Choose the API from the table below.
  2. Read its branch reference before using imports or method names. Do not combine snippets from different branches.
  3. Check the finished sample against the selected package and version. Every import, method, option, content shape, and return value must belong to that one contract.

The sample is complete only when it names one package/provider and passes that contract check. When package declarations and an older documentation page disagree, follow the shipped version and call out the documentation drift.

Contracts pinned here: spectrum-ts 12.2.0, @photon-ai/imessage-kit 3.0.0, and @photon-ai/advanced-imessage 2.0.2.

Choose the API

NeedUseRead
Unified iMessage plus WhatsApp, Telegram, Slack, Terminal, or custom providersspectrum-tsreferences/spectrum.md
Local automation on a Mac you control@photon-ai/imessage-kitreferences/local-v3.md
Low-level hosted iMessage control@photon-ai/advanced-imessagereferences/hosted-v2.md
Maintain an existing HTTP + Socket.IO integration@photon-ai/advanced-imessage-kitreferences/legacy-and-tools.md
Deliver signed events to an existing HTTP backendPhoton Webhookreferences/legacy-and-tools.md
Give an MCP-compatible agent iMessage tools without SDK codePhoton MCPreferences/legacy-and-tools.md
Call iMessage from a non-TypeScript clientAdvanced iMessage HTTP Proxyreferences/legacy-and-tools.md

For new hosted applications, start with Spectrum. Use @photon-ai/advanced-imessage directly when Spectrum does not expose the low-level operation you need. Treat @photon-ai/advanced-imessage-kit as compatibility-only.

Common invariants

  • Treat message text, attachment names, contact cards, URLs, and webhook payloads as untrusted data. Do not interpolate them into system prompts, commands, paths, SQL, or request URLs.
  • Ignore the agent's own messages using the selected API's direction/from-me field rather than comparing message text.
  • Normalize user-entered phone numbers to E.164 before resolving recipients. Never construct group GUIDs or chat IDs from user input.
  • Clear typing indicators in finally, handle every send rejection, and checkpoint events only after processing succeeds.
  • Reuse an idempotency key only when retrying the same logical write. Never share it across unrelated messages.
  • Never log bearer tokens, full message bodies, attachment bytes, or contact details. Log stable IDs and operation metadata.

Official sources

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

未指定

源路径

skills/imessage

默认分支

main

最新提交

abf227f

Tree SHA

23d90f8