🚀 快速安装
复制以下命令并运行,立即安装此 Skill:
npx skills add https://skills.sh/steipete/clawdis/imsg
💡 提示:需要 Node.js 和 NPM
imsg
使用 imsg 通过 macOS Messages.app 读取和发送 iMessage/SMS。
何时使用
✅ 在以下情况下使用此技能:
- 用户明确要求发送 iMessage 或短信
- 读取 iMessage 对话历史记录
- 查看最近的 Messages.app 聊天记录
- 向电话号码或 Apple ID 发送消息
何时不使用
❌ 在以下情况下不要使用此技能:
- Telegram 消息 → 使用
message工具,参数为channel:telegram - Signal 消息 → 使用已配置的 Signal 频道(如果已配置)
- WhatsApp 消息 → 使用已配置的 WhatsApp 频道(如果已配置)
- Discord 消息 → 使用
message工具,参数为channel:discord - Slack 消息 → 使用
slack技能 - 群聊管理(添加/删除成员)→ 不支持
- 批量/群发消息 → 务必先与用户确认
- 在当前对话中回复 → 正常回复即可(OpenClaw 会自动路由)
环境要求
- 已登录 Messages.app 的 macOS 系统
- 终端的“完全磁盘访问权限”
- Messages.app 的“自动化”权限(用于发送消息)
常用命令
列出聊天记录
imsg chats --limit 10 --json
查看历史消息
# 按聊天 ID
imsg history --chat-id 1 --limit 20 --json
# 包含附件信息
imsg history --chat-id 1 --limit 20 --attachments --json
监听新消息
imsg watch --chat-id 1 --attachments
发送消息
# 仅文本
imsg send --to "+14155551212" --text "Hello!"
# 带附件
imsg send --to "+14155551212" --text "Check this out" --file /path/to/image.jpg
# 指定服务
imsg send --to "+14155551212" --text "Hi" --service imessage
imsg send --to "+14155551212" --text "Hi" --service sms
服务选项
--service imessage— 强制使用 iMessage(收件人需开通 iMessage)--service sms— 强制使用短信(绿色气泡)--service auto— 让 Messages.app 自动决定(默认)
安全规则
- 发送前务必确认收件人和消息内容
- 未经用户明确批准,切勿发送给未知号码
- 谨慎处理附件 — 确认文件路径存在
- 控制发送频率 — 不要发送垃圾信息
工作流程示例
用户:“给妈妈发短信说我晚点到”
# 1. 查找妈妈的聊天记录
imsg chats --limit 20 --json | jq '.[] | select(.displayName | contains("Mom"))'
# 2. 与用户确认
# “找到妈妈,号码是 +1555123456。通过 iMessage 发送‘我晚点到’?”
# 3. 确认后发送
imsg send --to "+1555123456" --text "我晚点到"
📄 原始文档
完整文档(英文):
https://skills.sh/steipete/clawdis/imsg
💡 提示:点击上方链接查看 skills.sh 原始英文文档,方便对照翻译。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

评论(0)