# Add Imessage

Add iMessage to NanoClaw, one channel, two backends.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-imessage -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-imessage -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-imessage -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-imessage -g -a gemini-cli -y`

## Description

Add iMessage to NanoClaw, one channel, two backends. Local (this Mac's chat.db via the Chat SDK bridge; macOS + Full Disk Access) or Hosted iMessage (via photon.codes, native spectrum-ts with a device-login wizard; any OS, no Mac relay). Triggers on "add imessage", "connect imessage", "add photon", "imessage via photon", "native imessage".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add iMessage

NanoClaw talks to iMessage through a single **`imessage`** channel with two
pluggable backends:

- **Local (this Mac)**, the Chat SDK bridge over `chat-adapter-imessage`,
  reading this Mac's signed-in iMessage account (`chat.db`). macOS only; the
  Node binary needs Full Disk Access.
- **Hosted iMessage (via photon.codes)**, a native adapter over Photon's
  `spectrum-ts` gRPC stream. The hosted service owns the iMessage line, so
  there's no Mac relay, webhook, or public URL. Works on any OS, and a
  device-login flow provisions everything for you.

Both register the same `imessage` channel type; only one runs per install.
NanoClaw doesn't ship channels in trunk, this skill copies the unified
`imessage` adapter in from the `channels` branch. Full reference:
[docs/imessage.md](docs.md).

The mechanical steps under **Apply** carry `nc:` directive fences: an agent reads
the prose and applies them, and a parser can apply them deterministically from
the same document. Every directive is idempotent, so the whole skill is safe to
re-run; anything a parser can't apply falls back to the prose beside it.

## Apply

### 1. Choose a backend

Pick the backend first, it decides which package gets installed and which
walkthrough runs below (the other backend's steps are skipped):

```nc:prompt backend validate:^(local|hosted)$
How should iMessage run, `local` (this Mac's signed-in iMessage account; macOS only, needs Full Disk Access) or `hosted` (a managed line via photon.codes; works on any OS)?
```

The local backend only works on a Mac, it reads this machine's iMessage
`chat.db` directly, and there is no such database off macOS. On any other OS,
stop here and choose `hosted` instead; otherwise you'd write a local config
that can never receive a message:

```nc:run effect:check when:backend=local
[ "$(uname)" = Darwin ]
```

### 2. Copy the adapter

Fetch the `channels` branch and copy the unified iMessage adapter and its tests
into `src/channels/`:

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-imessage/SKILL.md
