imessage
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.
- License 许可
- MIT
- 所属仓库
- caezium/skills
- 最近更新
- 2026-08-24
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- imessage
- license
- MIT
- metadata
- { "author": "photon-hq", "version": "9.1.0" }
- description
- 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.
02 资源文件 4
- 参考文档references/hosted-v2.md6.5 KB
- 参考文档references/legacy-and-tools.md2.0 KB
- 参考文档references/local-v3.md8.1 KB
- 参考文档references/spectrum.md3.9 KB
03 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.
- Choose the API from the table below.
- Read its branch reference before using imports or method names. Do not combine snippets from different branches.
- 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-ts12.2.0,@photon-ai/imessage-kit3.0.0, and@photon-ai/advanced-imessage2.0.2.
Choose the API
| Need | Use | Read |
|---|---|---|
| Unified iMessage plus WhatsApp, Telegram, Slack, Terminal, or custom providers | spectrum-ts |
references/spectrum.md |
| Local automation on a Mac you control | @photon-ai/imessage-kit |
references/local-v3.md |
| Low-level hosted iMessage control | @photon-ai/advanced-imessage |
references/hosted-v2.md |
| Maintain an existing HTTP + Socket.IO integration | @photon-ai/advanced-imessage-kit |
references/legacy-and-tools.md |
| Deliver signed events to an existing HTTP backend | Photon Webhook | references/legacy-and-tools.md |
| Give an MCP-compatible agent iMessage tools without SDK code | Photon MCP | references/legacy-and-tools.md |
| Call iMessage from a non-TypeScript client | Advanced iMessage HTTP Proxy | references/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
04 同仓库更多 Skills
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wrangler
Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
workers-best-practices
Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available evidence sources, searches each relevant category, and returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
week-prep
Generate a briefing with calendar, tasks, and attention flags. Use for "week prep", "briefing", or "what's on this week".