From agent-messenger
Sends and reads iMessage chats on a Mac via the imsg CLI. Supports sending messages, listing chats, reading recent messages, reacting with tapbacks, and watching for new messages.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-messenger:agent-imessageThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
An iMessage CLI for AI agents, backed by [imsg](https://github.com/openclaw/imsg) — a native macOS tool that reads the local Messages database and sends through Messages.app. Apple has no public iMessage API, so this integration runs **on a Mac** and drives Messages locally. You act as yourself with your own Apple ID; nothing leaves the machine.
An iMessage CLI for AI agents, backed by imsg — a native macOS tool that reads the local Messages database and sends through Messages.app. Apple has no public iMessage API, so this integration runs on a Mac and drives Messages locally. You act as yourself with your own Apple ID; nothing leaves the machine.
Use one of these entrypoints:
agent-imessage ...bunx --package agent-messenger agent-imessage ...brew install steipete/tap/imsg). agent-imessage spawns it and talks to it over JSON-RPC (stdin/stdout). There is no network and no server — it must run on the Mac signed into iMessage.message send, a chat id (integer rowid), a portable guid/identifier (e.g. iMessage;-;+15551234567), or a phone/email recipient. For message list/react/watch --chat, prefer a chat id — a guid also works but (since imsg has no guid→id lookup) is resolved against the 1000 most recent chats only.--since-rowid.imsg launch (SIP disabled). Basic send/read/watch/standard tapbacks do NOT.# Guided setup: checks imsg + permissions, saves an account
agent-imessage setup
# Diagnose anytime
agent-imessage doctor
# List chats (source of chat ids/guids)
agent-imessage chat list
# Send (to a chat id, guid, or a phone/email)
agent-imessage message send 42 "Hello from agent-imessage"
agent-imessage message send "+15551234567" "Hi"
# Read recent messages
agent-imessage message list 42 --limit 20
# Watch for new messages (resumable, JSON lines)
agent-imessage message watch --chat all --jsonl
# React to the most recent incoming message (standard tapbacks)
agent-imessage message react 42 love
iMessage runs on the Mac via imsg. One-time setup:
brew install steipete/tap/imsgSee setup and permissions references for detail.
Configuration is scriptable too:
agent-imessage auth set --bin /opt/homebrew/bin/imsg --region US --current
Environment overrides (runtime only, not persisted): AGENT_IMESSAGE_BIN, AGENT_IMESSAGE_REGION.
When a command fails, the agent MUST run agent-imessage doctor and act on the suggestion/code rather than telling the user to run commands. If code is imsg_not_found, guide installing imsg. If full_disk_access or automation_denied, surface the exact System Settings path (and that macOS grants to the parent process). Never silently retry the same failing call.
setup — guided check + save account.doctor [--account <id>] [--test-chat <chatId>] — diagnose imsg + permissions.auth set|list|use|remove|logout — manage accounts (binary path / region).chat list [--limit] / chat search <query> [--limit].message list <chat> [--limit] [--start <iso>] — read history (oldest-last). <chat> = chat id (recommended) or recent-chat guid.message send <chat> <text> — <chat> = chat id/guid or phone/email.message react <chat> <reaction> — standard tapback to the most recent incoming message.message watch [--chat <ref|all>] [--since-rowid <n>] [--jsonl] — stream new messages.whoami — active account + imsg status.All commands accept --account <id> and --pretty.
JSON by default; --pretty for indented output. message watch --jsonl emits one JSON object per line.
| Feature | Available | Requires |
|---|---|---|
| List/search chats, send text, read/watch messages | ✅ | imsg core (no SIP) |
| Standard tapbacks, to the most recent incoming message | ✅ | imsg core (no SIP) |
| React to a specific message / custom-emoji tapbacks | ⏳ planned | imsg bridge (imsg launch + SIP) |
| Typing, read receipts, edit/unsend, group management | ⏳ planned | imsg bridge (imsg launch + SIP) |
Errors are JSON with a code and often a suggestion:
| Code | Meaning | Action |
|---|---|---|
imsg_not_found | imsg binary not runnable | brew install steipete/tap/imsg (or set --bin/AGENT_IMESSAGE_BIN). |
full_disk_access | Can't read Messages DB | Grant Full Disk Access to the launching app (parent process). |
automation_denied | Can't control Messages | Grant Automation → Messages in System Settings. |
not_authenticated | No account configured | Run agent-imessage setup. |
chat_not_found | Unknown chat ref | Use a chat id/guid from chat list. |
private_api_required | Feature needs the bridge | Standard send/read/watch/tapbacks work without it; targeted/custom reactions need imsg launch (SIP off). |
invalid_limit | Bad --limit/--since-rowid | Use an integer 1–100 for --limit; non-negative integer for --since-rowid. |
send_failed | imsg could not send | Run doctor; on macOS 26 group sends can fail (imsg reports honestly). |
rpc_error | imsg rpc problem | Run doctor; check the imsg version. |
agent-imessage doctor is the fastest diagnostic — it reports imsg version, Full Disk Access, and the bridge tier.imsg.imsg launch + SIP off.Account config is stored in ~/.config/agent-messenger/imessage-credentials.json (mode 0600). Relocate via AGENT_MESSENGER_CONFIG_DIR. No secrets are stored — imsg uses macOS permissions, not tokens.
2plugins reuse this skill
First indexed Jun 29, 2026
npx claudepluginhub code-yeongyu/agent-messengerSends and reads iMessage chats on a Mac via the imsg CLI. Supports sending messages, listing chats, reading recent messages, reacting with tapbacks, and watching for new messages.
Reads and sends iMessage/SMS on macOS using the imsg CLI tool. Lists chats, views history, watches conversations, and sends messages with optional file attachments.
Automates macOS Messages (iMessage/SMS) via JXA with reliable service→buddy resolution. Use when asked to "automate iMessage", "send Messages via script", "JXA Messages automation", or "read Messages history". Covers send-bug workarounds, UI scripting for attachments, chat.db forensics, and launchd polling bots.