Automated summary
This skill documents how to drive the `imsg` CLI on macOS from OpenClaw agents to send iMessage/SMS messages, manage groups, react, run polls, and read local Messages.app history.
Strengths
- Clear four-step agent flow: resolve the conversation, pick DM/group, prefer the `message` tool, then fall back to the lowest-capability `imsg` command
- Stresses stable identifiers (`--chat-id`, chat GUID) and explicit confirmation whenever a recipient or group name is ambiguous
- Precisely lists host prerequisites: macOS 14+, Full Disk Access, Automation, Accessibility, Contacts, and Text Message Forwarding for SMS
- Explains the gap between private-API mode (replies, tapbacks, polls, group management) and basic read-only-plus-send mode, with JSON read examples
Limitations
- macOS-only; on Linux it can only read a copied `chat.db` and cannot send, react, or mark read
- Requires several system permissions that are easy to misconfigure (Full Disk Access, Automation, Accessibility) plus a signed-in Messages.app
- The provided page appears truncated: the command list cuts off mid-sentence in the text/file send section
Use it when an agent needs to read, search, watch, or change local iMessage/SMS conversations on a Mac beyond what the `message` tool exposes.
Skip it for Telegram, Signal, WhatsApp, Discord, or Slack, or when replying inside the current OpenClaw conversation whose configured channel already routes the reply.
Security analysis
CautionThe skill is a straightforward CLI wrapper for a legitimate iMessage automation tool and explicitly instructs the agent to confirm recipients and visible/destructive state changes before acting. Risk is not from exfiltration or obfuscated payloads, but from the level of system access it requires: Full Disk Access to the message database, Accessibility/Automation, and particularly the `imsg launch` step that terminates and re-injects code into Messages.app. Powerful but legitimate, hence caution rather than safe.
- •Requires broad macOS permissions: Full Disk Access (to read the Messages SQLite DB), Accessibility, and Automation for Messages.app
- •`imsg launch` kills and relaunches Messages.app to inject a private-API bridge into a system app — third-party code injection into a signed Apple application, which can destabilize or violate host policy
- •Destructive/visible actions exposed without capability gating: chat-delete, chat-leave, chat-remove-member, message edit/unsend/delete, read receipts, typing indicators
- •Installs a binary from a third-party Homebrew tap (steipete/tap/imsg) that is not the default formula set
- •Reads and transmits local private message history via a CLI and optional JSON-RPC daemon
- •Requires broad host permissions (Full Disk Access to the Messages chat.db, Accessibility for UI automation, Automation permission) and drives a CLI that can send messages and mutate chat state.
- •Uses a private-API injection mode (`imsg launch`) that kills and relaunches Messages.app and is described as potentially blocked by SIP/library-validation checks — effectively encouraging a reduced-security posture on the host.
- •Includes destructive/visible operations (chat-delete, chat-remove-member, unsend, edit, mark-read, tapbacks, poll votes) that are only gated by prompt-level 'confirm first' instructions rather than technical controls.
- •Installs a third-party binary from an external Homebrew tap (steipete/tap/imsg) with an unverified homepage (imsg.to).
- •No allowed-tools declared, but the skill's content is entirely operational commands executed on the host.
Examples
Look up my existing iMessage thread with Dana, show me which contact matched, and send her 'running 10 minutes late' once I confirm.Search my local Messages history for anything mentioning 'dinner' in the last month and summarize which conversations it came from.Create a new iMessage group with Sam and Priya, then send a first message saying 'Planning doc is in the shared folder'.name: imsg description: "Use the imsg CLI from OpenClaw agents for iMessage/SMS DMs, groups, replies, reactions, polls, watching, and private-API actions." homepage: https://imsg.to metadata: { "openclaw": { "emoji": "📨", "os": ["darwin"], "requires": { "bins": ["imsg"] }, "install": [ { "id": "brew", "kind": "brew", "formula": "steipete/tap/imsg", "bins": ["imsg"], "label": "Install imsg (brew)", }, ], }, }
imsg
Use the generic message tool first for actions that its current iMessage schema exposes. Use imsg when the task needs local Messages.app history, target discovery, watching, or an administrative/private-API capability that is not exposed by message.
Do not use this skill for Telegram, Signal, WhatsApp, Discord, Slack, or for replying inside the current OpenClaw conversation when the configured channel already routes the reply.
Agent Flow
- Resolve the conversation first.
- Choose DM, existing group, or new group.
- Prefer an available
messageaction; otherwise pick the lowest-capabilityimsgcommand that preserves the requested semantics. - Confirm any send or visible state change unless the user already gave exact recipient, content, and action.
- Execute with stable identifiers: prefer
--chat-idfor normal sends/watch/history and--chatchat GUID for bridge actions.
Never infer a recipient from a casual name alone when several chats or handles could match. Show the matched display name, handle(s), group participants, and message text/action before sending.
Host Requirements
- macOS 14+ with Messages.app signed in for send/react/bridge actions.
- Private API mode is strongly encouraged for OpenClaw iMessage. It unlocks replies, precise tapbacks, effects, polls, attachment replies, read/typing actions, and group management. Basic mode is a fallback for reads plus plain text/file send.
- Full Disk Access for the process context that runs
imsgor OpenClaw; reads fail without Messages DB access. - Automation permission for Messages.app when using public
send. - Accessibility permission for the process context that runs public
imsg react; it uses System Events UI automation. Bridgetapbackuses private API instead. - Optional Contacts permission for contact-name resolution.
- SMS sends require Text Message Forwarding from the user's iPhone to this Mac.
- Linux reads a copied
chat.dbonly; it cannot send, react, launch Messages.app, mark read, or type.
Resolve Targets
Use --json reads. Output is newline-delimited JSON; use jq -s when jq is available, or consume one object per line directly.
imsg chats --limit 25 --json | jq -s
imsg search --query "dinner" --match contains --json | jq -s
imsg history --chat-id 42 --limit 20 --attachments --json | jq -s
imsg group --chat-id 42 --json
Target rules:
- DM to a phone/email: use
imsg send --towhen the user gave an exact handle, or after a single unambiguous chat match. - Existing DM thread:
imsg send --chat-id <id>is safer than re-resolving a name. - Existing group: inspect with
imsg group --chat-id <id> --json; send with--chat-id, bridge with the chat GUID fromgroup. - New group: use
chat-createonly when the user explicitly asked to create a group or no existing group matches. - Ambiguous group names: confirm participants, not just display name.
- SMS: use
--service smsonly when requested or when iMessage fallback is not desired. SMS relay requires Text Message Forwarding.
Do not make jq a hard prerequisite for the skill; it is only a convenient formatter for examples.
Capability Choice
Use imsg standard commands when the current message schema does not cover the operation or when local history is needed:
- Read/list/search/watch:
chats,group,history,search,watch - Basic text/file send:
send - Standard tapback to most recent incoming message in a chat:
react
Use the private API bridge for the native iMessage actions OpenClaw users normally expect:
- Rich replies, text formatting, effects, subjects, multipart sends
- Native Apple Messages polls and poll votes
- Tapback by message GUID or tapback removal
- Edit, unsend, delete, notify anyways
- Read receipts, typing indicators, bridge event watch
- Group create/name/photo/member/leave/delete/mark actions
- Account, whois, nickname checks
For OpenClaw channel setup, check bridge availability early:
imsg status --json
If the host supports bridge actions but Messages is not injected yet, ask before running imsg launch. It kills and relaunches Messages.app to inject the bridge, so treat it as a visible state change:
imsg launch
imsg status --json
If SIP, library validation, private entitlement checks, or missing selectors still block the capability, explain that the requested private-API action is unavailable on this host and offer the closest non-bridge action, if one exists. Do not silently downgrade a threaded reply, effect, subject, poll, or GUID-targeted tapback into a plain send/react.
DM Scenarios
Exact handle, basic send:
imsg send --to "+14155551212" --text "On my way" --service auto
Known DM thread:
imsg send --chat-id 42 --text "On my way"
imsg send --chat-id 42 --file /path/to/photo.jpg
Force channel only when the user asks:
imsg send --to "+14155551212" --text "green bubble" --service sms
imsg send --to "+14155551212" --text "iMessage only" --service imessage --no-sms-fallback
Threaded reply, formatting, effects, or attachment reply:
imsg send-rich --chat 'iMessage;-;+15551234567' \
--reply-to <message-guid> --text "reply text"
imsg send-rich --chat 'iMessage;-;+15551234567' --text 'hello world' \
--format '[{"start":0,"length":5,"styles":["bold"]}]'
imsg send-rich --chat 'iMessage;-;+15551234567' --text "boom" --effect impact
imsg send-attachment --chat 'iMessage;-;+15551234567' \
--reply-to <message-guid> --file /path/to/file.jpg
Formatting ranges are UTF-16 positions. Supported styles include bold, italic, underline, and strikethrough; use --format-file for generated JSON.
Group Scenarios
Inspect before acting:
imsg group --chat-id 42 --json
imsg history --chat-id 42 --limit 20 --json | jq -s
Send to an existing group:
imsg send --chat-id 42 --text "Works for me"
Bridge reply or poll in an existing group:
imsg send-rich --chat 'iMessage;+;chat0000' \
--reply-to <message-guid> --text "replying in thread"
imsg poll send --chat 'iMessage;+;chat0000' \
--question "Dinner?" --option "Pizza" --option "Sushi"
Create or mutate groups only on explicit request:
imsg chat-create --addresses '+15551111111,+15552222222' --name 'Crew' --text 'gm'
imsg chat-name --chat 'iMessage;+;chat0000' --name 'Renamed'
imsg chat-photo --chat 'iMessage;+;chat0000' --file /path/to/group.jpg
imsg chat-add-member --chat 'iMessage;+;chat0000' --address +15553333333
imsg chat-remove-member --chat 'iMessage;+;chat0000' --address +15553333333
imsg chat-leave --chat 'iMessage;+;chat0000'
imsg chat-delete --chat 'iMessage;+;chat0000'
imsg chat-mark --chat 'iMessage;+;chat0000' --read
Group mutations are highly visible. Confirm the exact group and participant list before changing membership, name, photo, read state, leaving, or deleting.
Reactions and Replies
Public react is limited: it reacts to the most recent incoming message in the chat.
imsg react --chat-id 42 --reaction like
imsg react --chat-id 42 --reaction love
imsg react --chat-id 42 --reaction dislike
imsg react --chat-id 42 --reaction laugh
imsg react --chat-id 42 --reaction emphasis
imsg react --chat-id 42 --reaction question
For a specific message GUID or removal, use bridge tapback:
imsg tapback --chat 'iMessage;-;+15551234567' --message <message-guid> --kind love
imsg tapback --chat 'iMessage;-;+15551234567' --message <message-guid> --kind love --remove
Use send-rich --reply-to <message-guid> for threaded replies. Confirm the referenced message if the user says "that" or "the previous one".
Polls
Native Apple Messages polls require the bridge. Creation needs at least two --option values. Voting requires one of --option-id, --option-index, or --option.
Messages renders only the options on a poll balloon, so current imsg poll send echoes --question as a best-effort plain caption after the poll. Use --comment to override that caption. Do not retry automatically when only the caption fails: the poll may already be delivered.
imsg poll send --chat 'iMessage;-;+15551234567' \
--question "Dinner?" --option "Pizza" --option "Sushi" --comment "Vote by 5pm"
imsg poll send --chat 'iMessage;+;chat0000' --reply-to <message-guid> \
--question "Approve?" --option "Yes" --option "No"
imsg poll vote --chat 'iMessage;+;chat0000' \
--poll <poll-message-guid> --option-id <option-id>
Find poll IDs and options with:
imsg history --chat-id 42 --limit 20 --json | jq -s '.[] | select(.poll != null) | {guid, poll}'
history and watch backfill a title-less inbound native poll's poll.question from its clean caption row. Poll vote rows are poll events, not tapbacks; watch --reactions is not required to see them.
Watch and Long-Running Agents
For a short one-off wait, use watch:
imsg watch --chat-id 42 --since-rowid 9000 --json
imsg watch --chat-id 42 --attachments --convert-attachments --json
imsg watch --chat-id 42 --reactions --json
imsg watch --chat-id 42 --bb-events --json
--since-rowid is exclusive. Without it, watch starts at the newest row. watch uses filesystem events plus a low-frequency polling fallback, so it can catch up after missed SQLite sidecar events. Poll objects appear without --reactions.
For a daemon or multi-chat integration, use imsg rpc. It speaks JSON-RPC 2.0 over stdin/stdout. Inspect imsg status --json for rpc_methods before using newer bridge or poll methods.
Safety Rules
- Confirm recipient, chat, and content before every send unless the user's request already contains exact values.
- Confirm visible state changes: read receipts, typing indicators, edits, unsends, deletes, poll votes, tapbacks, group membership, group name/photo, leaving/deleting chats.
- Never send to unknown numbers or ambiguous contact-name matches without approval.
- Confirm attachments exist and are the intended files.
- Prefer E.164 phone numbers; use
--region USor another region only when needed for local formats. - Use bridge actions for bridge-only semantics, but confirm visible state changes and destructive actions first.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/imessage-sms-automation-via-imsg-mte1llov/download' --output '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md.part' && mv '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md.part' '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && test -s '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/imsg' && cp -R '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' '.claude/skills/imsg'Cursor
test -f '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && test -s '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/imsg' && cp -R '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' '.cursor/skills/imsg'Codex
test -f '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && test -s '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/imsg' && cp -R '.skill-downloads/imessage-sms-automation-via-imsg-mte1llov' '.agents/skills/imsg'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/imessage-sms-automation-via-imsg-mte1llov'openskills read 'imessage-sms-automation-via-imsg-mte1llov'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/imessage-sms-automation-via-imsg-mte1llov/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
PDF Reader
Productivity
Read and extract text from PDF files, including documents, reports, contracts, and spreadsheets. Works with local files, URLs, and WhatsApp attachments. Use whenever PDF content is needed, even if not explicitly requested.
Discord Messaging Workflows
Productivity
Use the message tool to send, edit, and moderate Discord messages with interactive components.
Interactive Verdict Preview
Productivity
Generate an interactive HTML preview of keep/drop verdicts for maintainer review, then process the pasted feedback JSON.