$npx -y skills add SafeAI-Lab-X/ClawKeeper --skill imsgiMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
| 1 | # imsg |
| 2 | |
| 3 | Use `imsg` to read and send iMessage/SMS via macOS Messages.app. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | ✅ **USE this skill when:** |
| 8 | |
| 9 | - User explicitly asks to send iMessage or SMS |
| 10 | - Reading iMessage conversation history |
| 11 | - Checking recent Messages.app chats |
| 12 | - Sending to phone numbers or Apple IDs |
| 13 | |
| 14 | ## When NOT to Use |
| 15 | |
| 16 | ❌ **DON'T use this skill when:** |
| 17 | |
| 18 | - Telegram messages → use `message` tool with `channel:telegram` |
| 19 | - Signal messages → use Signal channel if configured |
| 20 | - WhatsApp messages → use WhatsApp channel if configured |
| 21 | - Discord messages → use `message` tool with `channel:discord` |
| 22 | - Slack messages → use `slack` skill |
| 23 | - Group chat management (adding/removing members) → not supported |
| 24 | - Bulk/mass messaging → always confirm with user first |
| 25 | - Replying in current conversation → just reply normally (OpenClaw routes automatically) |
| 26 | |
| 27 | ## Requirements |
| 28 | |
| 29 | - macOS with Messages.app signed in |
| 30 | - Full Disk Access for terminal |
| 31 | - Automation permission for Messages.app (for sending) |
| 32 | |
| 33 | ## Common Commands |
| 34 | |
| 35 | ### List Chats |
| 36 | |
| 37 | ```bash |
| 38 | imsg chats --limit 10 --json |
| 39 | ``` |
| 40 | |
| 41 | ### View History |
| 42 | |
| 43 | ```bash |
| 44 | # By chat ID |
| 45 | imsg history --chat-id 1 --limit 20 --json |
| 46 | |
| 47 | # With attachments info |
| 48 | imsg history --chat-id 1 --limit 20 --attachments --json |
| 49 | ``` |
| 50 | |
| 51 | ### Watch for New Messages |
| 52 | |
| 53 | ```bash |
| 54 | imsg watch --chat-id 1 --attachments |
| 55 | ``` |
| 56 | |
| 57 | ### Send Messages |
| 58 | |
| 59 | ```bash |
| 60 | # Text only |
| 61 | imsg send --to "+14155551212" --text "Hello!" |
| 62 | |
| 63 | # With attachment |
| 64 | imsg send --to "+14155551212" --text "Check this out" --file /path/to/image.jpg |
| 65 | |
| 66 | # Specify service |
| 67 | imsg send --to "+14155551212" --text "Hi" --service imessage |
| 68 | imsg send --to "+14155551212" --text "Hi" --service sms |
| 69 | ``` |
| 70 | |
| 71 | ## Service Options |
| 72 | |
| 73 | - `--service imessage` — Force iMessage (requires recipient has iMessage) |
| 74 | - `--service sms` — Force SMS (green bubble) |
| 75 | - `--service auto` — Let Messages.app decide (default) |
| 76 | |
| 77 | ## Safety Rules |
| 78 | |
| 79 | 1. **Always confirm recipient and message content** before sending |
| 80 | 2. **Never send to unknown numbers** without explicit user approval |
| 81 | 3. **Be careful with attachments** — confirm file path exists |
| 82 | 4. **Rate limit yourself** — don't spam |
| 83 | |
| 84 | ## Example Workflow |
| 85 | |
| 86 | User: "Text mom that I'll be late" |
| 87 | |
| 88 | ```bash |
| 89 | # 1. Find mom's chat |
| 90 | imsg chats --limit 20 --json | jq '.[] | select(.displayName | contains("Mom"))' |
| 91 | |
| 92 | # 2. Confirm with user |
| 93 | # "Found Mom at +1555123456. Send 'I'll be late' via iMessage?" |
| 94 | |
| 95 | # 3. Send after confirmation |
| 96 | imsg send --to "+1555123456" --text "I'll be late" |
| 97 | ``` |