imsg
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseimsg
imsg
Use to read and send iMessage/SMS via macOS Messages.app.
imsg使用通过macOS Messages.app读取和发送iMessage/SMS消息。
imsgWhen to Use
适用场景
✅ USE this skill when:
- User explicitly asks to send iMessage or SMS
- Reading iMessage conversation history
- Checking recent Messages.app chats
- Sending to phone numbers or Apple IDs
✅ 在以下情况使用本技能:
- 用户明确要求发送iMessage或SMS消息
- 查看iMessage聊天历史记录
- 查看Messages.app的近期聊天会话
- 向电话号码或Apple ID发送消息
When NOT to Use
不适用场景
❌ DON'T use this skill when:
- Telegram messages → use tool with
messagechannel:telegram - Signal messages → use Signal channel if configured
- WhatsApp messages → use WhatsApp channel if configured
- Discord messages → use tool with
messagechannel:discord - Slack messages → use skill
slack - Group chat management (adding/removing members) → not supported
- Bulk/mass messaging → always confirm with user first
- Replying in current conversation → just reply normally (Clawdbot routes automatically)
❌ 在以下情况请勿使用本技能:
- Telegram消息 → 使用工具并指定
messagechannel:telegram - Signal消息 → 若已配置则使用Signal渠道
- WhatsApp消息 → 若已配置则使用WhatsApp渠道
- Discord消息 → 使用工具并指定
messagechannel:discord - Slack消息 → 使用技能
slack - 群聊管理(添加/移除成员)→ 暂不支持
- 批量群发消息 → 务必先征得用户确认
- 在当前会话中回复 → 直接正常回复即可(Clawdbot会自动路由)
Requirements
要求
- macOS with Messages.app signed in
- Full Disk Access for terminal
- Automation permission for Messages.app (for sending)
- 已登录Messages.app的macOS系统
- 终端需拥有完全磁盘访问权限
- Messages.app需获得自动化权限(用于发送消息)
Common Commands
常用命令
List Chats
列出聊天会话
bash
imsg chats --limit 10 --jsonbash
imsg chats --limit 10 --jsonView History
查看聊天记录
bash
undefinedbash
undefinedBy chat ID
通过聊天ID查看
imsg history --chat-id 1 --limit 20 --json
imsg history --chat-id 1 --limit 20 --json
With attachments info
包含附件信息
imsg history --chat-id 1 --limit 20 --attachments --json
undefinedimsg history --chat-id 1 --limit 20 --attachments --json
undefinedWatch for New Messages
监听新消息
bash
imsg watch --chat-id 1 --attachmentsbash
imsg watch --chat-id 1 --attachmentsSend Messages
发送消息
bash
undefinedbash
undefinedText only
仅发送文本
imsg send --to "+14155551212" --text "Hello!"
imsg send --to "+14155551212" --text "Hello!"
With attachment
附带附件
imsg send --to "+14155551212" --text "Check this out" --file /path/to/image.jpg
imsg send --to "+14155551212" --text "Check this out" --file /path/to/image.jpg
Specify service
指定服务类型
imsg send --to "+14155551212" --text "Hi" --service imessage
imsg send --to "+14155551212" --text "Hi" --service sms
undefinedimsg send --to "+14155551212" --text "Hi" --service imessage
imsg send --to "+14155551212" --text "Hi" --service sms
undefinedService Options
服务选项
- — Force iMessage (requires recipient has iMessage)
--service imessage - — Force SMS (green bubble)
--service sms - — Let Messages.app decide (default)
--service auto
- — 强制使用iMessage(要求收件人已开通iMessage)
--service imessage - — 强制使用SMS(绿色气泡消息)
--service sms - — 由Messages.app自动选择(默认选项)
--service auto
Safety Rules
安全规则
- Always confirm recipient and message content before sending
- Never send to unknown numbers without explicit user approval
- Be careful with attachments — confirm file path exists
- Rate limit yourself — don't spam
- 发送前务必确认收件人和消息内容
- 未经用户明确许可,切勿向未知号码发送消息
- 处理附件时需谨慎 — 确认文件路径存在
- 限制发送频率 — 请勿发送垃圾消息
Example Workflow
示例流程
User: "Text mom that I'll be late"
bash
undefined用户:"给妈妈发短信说我会晚点到"
bash
undefined1. Find mom's chat
1. 查找妈妈的聊天会话
imsg chats --limit 20 --json | jq '.[] | select(.displayName | contains("Mom"))'
imsg chats --limit 20 --json | jq '.[] | select(.displayName | contains("Mom"))'
2. Confirm with user
2. 向用户确认
"Found Mom at +1555123456. Send 'I'll be late' via iMessage?"
"已找到妈妈的号码+1555123456。是否通过iMessage发送‘我会晚点到’?"
3. Send after confirmation
3. 获得确认后发送
imsg send --to "+1555123456" --text "I'll be late"
undefinedimsg send --to "+1555123456" --text "I'll be late"
undefined