首页龙虾技能列表 › iResponder — 智能短信自动回复

iResponder — 智能短信自动回复

v1.0.1

监控 iMessage/SMS 对话,根据自定义规则、AI 提示词和限速条件自动回复,可管理联系人、提示词、查看状态与历史记录。

0· 2,344·4 当前·4 累计·💬 1
by @koba42corp (Koba42Corp)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/14
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
可疑
high confidence
该技能基本履行自动回复 iMessage 的承诺,但代码与运行时指令请求访问未在元数据中声明的 API 密钥与系统资源,并存在 shell exec、读取本地配置文件、网络请求等需审查的高危行为。
评估建议
安装前需检查: - 来源可信:包主页未知,优先使用可信仓库代码,本地完整审阅脚本。 - 声明与实际需求不符:注册元数据未列环境变量,但代码需 OpenAI API 密钥(OPENAI_API_KEY)或读取 ~/.clawdbot;旧版 watcher 还需 Anthropic 密钥。确认所需密钥及存储位置。 - macOS 权限:需“完全磁盘访问”与“信息”自动化,授权后脚本可读取大量本地文件,仅在接受该权限前提下继续。 - 网络与数据外泄:watcher 将对话上下文发送至外部 LLM API(api.openai.com 与/或 api.anthropic.com)。若信息敏感,请勿启用。 - Telegram 集成与命令注入风险:telegram-handler 通过 execSync 执行用户输入的 shell 命令。若连接 Telegram 机器人,请限制可信聊天并考虑过滤输入或关闭该集成。 - 操作安全:先用测试模式运行,监控 ~/clawd/logs/imsg-autoresponder.log,建议用独立用户或非主力机运行,备份 ~/.clawdbot 并...
详细分析 ▾
用途与能力
技能描述为 iMessage 自动回复,SKILL.md 与 README 均要求 macOS、imsg CLI 与 OpenAI API 密钥,但包元数据未声明所需环境变量或二进制。代码还引用 Anthropic API 密钥(旧版 watcher)并假定 curl 与 Node.js 可用,因此需凭证与 CLI 工具,而注册元数据未列出,存在不一致需解决。
指令范围
运行时指令要求授予“完全磁盘访问”并运行常驻 watcher,该 watcher 在 ~/clawd 下读写配置与日志,并从 ~/.clawdbot 读取 API 密钥。watcher 会启动 imsg 与 curl,向外部 LLM API 发送网络请求。Telegram 处理器通过 execSync 执行 manage.js 并插值参数(若输入不可信存在命令注入风险)。这些操作超出简单本地配置编辑,涉及读取本地账户状态并将内容外发至外部 API。
安装机制
无自动安装规范(无远程下载)。技能仅随本地脚本与文档分发,技能本身不会静默拉取/安装任何内容,降低供应链风险,但脚本将直接在主机运行。
凭证需求
注册表未列出所需环境变量,但代码查找 OPENAI_API_KEY(旧版 watcher 还查找 ANTHROPIC_API_KEY)并从 ~/.clawdbot 读取凭证。Telegram 集成存在但未声明机器人令牌或网络凭证。请求“完全磁盘访问/信息自动化”与监控 Messages.app 相符,但未披露对 API 密钥与配置文件的访问,应予以声明与说明。
持久化与权限
技能运行后台 watcher,在 ~/clawd 下创建 PID、日志与状态文件,并在重启间保持状态(watcher 常见行为)。always: false(非强制启用)。需 macOS 高权限(完全磁盘访问、信息自动化),与功能相符——请确认理解授予这些 macOS 权限的影响。
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/1/29

• 🔑 关键词触发 • ⏰ 时段限制 • 📊 统计追踪 • 🚦 每日回复上限 • 修复竞态条件 • 文档改进

● 可疑

安装命令 点击复制

官方npx clawhub@latest install autoresponder
镜像加速npx clawhub@latest install autoresponder --registry https://cn.clawhub-mirror.com

技能文档

# iMessage 自动回复器 根据可配置的规则、AI 提示和限速条件监控 iMessage/SMS 对话并自动回复。当需要基于对话上下文用 AI 生成的回复自动回复特定联系人时,请使用此功能。也用于用户要求管理自动回复设置、联系人、提示或查看状态/历史时。 # iMessage 自动回复器 使用 AI 生成的、符合你语气和对话上下文的回复,自动响应特定联系人的 iMessage/SMS。 ## ⚠️ 使用前的要求清单 在使用本技能前,请确保已具备: - [ ] macOS 并已登录 iMessage 的 Messages.app - [ ] imsg CLI 已安装:brew install steipete/tap/imsg - [ ] OpenAI API key 已在 Clawdbot 配置中设置 - [ ] 完全磁盘访问权限 已授予 Terminal/iTerm - [ ] Messages 自动化权限(首次使用 macOS 会弹出授权) ## 功能 - 🤖 AI 驱动回复 使用 OpenAI GPT-4 - 📱 基于联系人的提示 —— 每个联系人可设不同 AI 人格 - ⏱️ 速率限制 —— 可配置自动回复间隔 - 💬 上下文感知 —— AI 可读取最近对话历史 - 📊 Telegram 管理 —— 斜杠命令 + 自然语言 - 🔄 后台监控 —— 持续轮询新消息 - 🔧 自动清理 —— 重启时清除过期锁(防止联系人卡死) - 🧪 测试模式 —— 生成真实 AI 回复但不实际发送 - ⏰ 时间窗口 —— 仅在特定时段回复(如 9 AM - 10 PM) - 🔑 关键词触发 —— 仅当消息包含特定关键词才回复(如 "urgent"、"help") - 📊 统计追踪 —— 记录总回复数、每日计数、每联系人平均数 - 🚦 每日上限 —— 限制每联系人每日最大回复数(安全功能) ## 快速开始 ### 1. 添加联系人到监控列表 ``bash cd ~/clawd/imsg-autoresponder/scripts node manage.js add "+15551234567" "Reply with a middle finger emoji" "Best Friend" node manage.js add "+15559876543" "You are my helpful assistant. Reply warmly and briefly, as if I'm responding myself. Keep it under 160 characters." "Mom" ` ### 2. 启动监控器 `bash node watcher.js ` 监控器将在前台运行,日志写入 ~/clawd/logs/imsg-autoresponder.log。 ### 3. 后台运行(推荐) `bash # 后台启动 nohup node ~/clawd/imsg-autoresponder/scripts/watcher.js > /dev/null 2>&1 & # 或使用 screen/tmux screen -S imsg-watcher node ~/clawd/imsg-autoresponder/scripts/watcher.js # Ctrl+A, D 脱离 ` ## 配置 配置文件:~/clawd/imsg-autoresponder.json `json { "enabled": true, "defaultMinMinutesBetweenReplies": 15, "watchList": [ { "identifier": "+15551234567", "name": "Best Friend", "prompt": "Reply with a middle finger emoji", "minMinutesBetweenReplies": 10, "enabled": true } ] } ` ## 通过 Telegram 管理(推荐) 自动回复器可直接通过 Telegram 斜杠命令自然语言管理。 ### 斜杠命令 空格和下划线格式均支持: ` /autorespond list OR /autorespond_list /autorespond status OR /autorespond_status /autorespond add OR /autorespond_add /autorespond remove OR /autorespond_remove /autorespond edit OR /autorespond_edit /autorespond delay OR /autorespond_delay /autorespond history OR /autorespond_history /autorespond test OR /autorespond_test /autorespond toggle OR /autorespond_toggle /autorespond restart OR /autorespond_restart 批量操作: /autorespond set-all-delays OR /autorespond_set_all_delays /autorespond enable-all OR /autorespond_enable_all /autorespond disable-all OR /autorespond_disable_all 时间窗口: /autorespond set-time-window OR /autorespond_set_time_window /autorespond clear-time-windows OR /autorespond_clear_time_windows 关键词触发: /autorespond add-keyword OR /autorespond_add_keyword /autorespond remove-keyword OR /autorespond_remove_keyword /autorespond clear-keywords OR /autorespond_clear_keywords 统计与上限: /autorespond stats OR /autorespond_stats [] /autorespond set-daily-cap OR /autorespond_set_daily_cap ` 示例: ` /autorespond_list /autorespond_status /autorespond_edit +15551234567 Be more sarcastic /autorespond_delay +15551234567 30 /autorespond_history +15551234567 /autorespond_set_time_window +15551234567 09:00 22:00 /autorespond_clear_time_windows +15551234567 /autorespond_add_keyword +15551234567 urgent /autorespond_add_keyword +15551234567 help /autorespond_clear_keywords +15551234567 /autorespond_stats /autorespond_stats +15551234567 /autorespond_set_daily_cap +15551234567 10 /autorespond_set_all_delays 30 /autorespond_disable_all /autorespond_restart ` ### 自然语言 你也可以直接说: - "Show me the auto-responder status" - "Add +15551234567 to the watch list with prompt: be sarcastic" - "Change Scott's prompt to be nicer" - "Disable auto-replies for Mom" - "What has the auto-responder sent to Foxy recently?" - "Restart the auto-responder" Agent 将通过 telegram-handler.js 脚本理解并执行命令。 ## 命令行管理(高级) `bash cd ~/clawd/imsg-autoresponder/scripts # 列出所有联系人 node manage.js list # 添加联系人 node manage.js add "+15551234567" "Your custom prompt here" "Optional Name" # 移除联系人 node manage.js remove "+15551234567" # 启用/禁用联系人 node manage.js enable "+15551234567" node manage.js disable "+15551234567" # 为联系人设置自定义延迟(分钟) node manage.js set-delay "+15551234567" 30 # 开关整个系统 node manage.js toggle ` ## 工作原理 1. Watcher 通过 imsg watch 监控所有 incoming 消息 2. 检查监控列表 判断发件人是否配置自动回复 3. 速率限制 确保不刷屏(可配置分钟间隔) 4. 获取对话历史(最近 20 条消息) 5. 生成 AI 回复 使用 Clawdbot + 联系人专属提示 6. 发送回复 通过 imsg send 7. 记录日志~/clawd/logs/imsg-autoresponder.log ## 状态追踪 回复时间记录在 ~/clawd/data/imsg-autoresponder-state.json`json { "lastResponses": { "+15551234567": 1706453280000 } } ` 确保重启后速率限制仍生效。 ## 提示词 提示词定义 AI 如何回复每位联系人。要写具体! 示例: ` "Reply with a middle finger emoji" "You are my helpful assistant. Reply warmly and briefly, as if I'm responding myself. Keep it under 160 characters." "You are my sarcastic friend. Reply with witty, slightly snarky responses. Keep it short." "Politely decline any requests and say I'm busy. Be brief but friendly." ` AI 将看到: - 联系人自定义提示 - 最近消息历史(最近 5 条) - 最新 incoming 消息 ## 要求 - macOS 且 Messages.app 已登录 - imsg CLI 已安装(brew install steipete/tap/imsg) - 为 Terminal 授予完全磁盘访问权限 - 已安装并配置 Clawdbot - Anthropic API key(配置在 ~/.clawdbot/clawdbot.jsonANTHROPIC_API_KEY 环境变量) - curl(macOS 预装) ## 安全 - 速率限制 防止 spam(默认:每联系人 15 分钟间隔) - 手动覆盖 通过配置 enabled: falsenode manage.js disable - 系统开关 一键禁用所有自动回复:node manage.js toggle - 日志 记录所有活动供审查 ## 故障排除 Watcher 无响应: - 查看 ~/clawd/logs/imsg-autoresponder.log 报错 - 手动验证 imsg watch 是否可用:imsg watch --json - 确认联系人已在监控列表:node manage.js list 速率限制过于严格: - 调整延迟:node manage.js set-delay "+15551234567" 5 - 或修改配置中的 defaultMinMinutesBetweenReplies AI 回复风格不对: - 精炼该联系人的提示 - 检查消息历史是否正确捕获(见日志) ## Agent 命令处理 当用户使用斜杠命令或自然语言提及自动回复器时,使用 telegram-handler.js 脚本。 ### 命令映射(两种格式均支持) | 用户输入 | 归一化 | Handler 调用 | |------------|--------------|--------------| | /autorespond list/autorespond_list | list | node telegram-handler.js list | | /autorespond status/autorespond_status | status | node telegram-handler.js status | | /autorespond add/autorespond_add | add | node telegram-handler.js add | | /autorespond remove/autorespond_remove | remove | node telegram-handler.js remove | | /autorespond edit/autorespond_edit | edit | node telegram-handler.js edit | | /autorespond delay/autorespond_delay | delay | node telegram-handler.js delay | | /autorespond history/autorespond_history | history | node telegram-handler.js history [limit] | | /autorespond test/autorespond_test | test | node telegram-handler.js test | | /autorespond toggle/autorespond_toggle | toggle | node telegram-handler.js toggle | | /autorespond restart/autorespond_restart | restart | node telegram-handler.js restart | | /autorespond set-all-delays/autorespond_set_all_delays | set-all-delays | node telegram-handler.js set-all-delays | | /autorespond enable-all/autorespond_enable_all | enable-all | node telegram-handler.js enable-all | | /autorespond disable-all/autorespond_disable_all | disable-all | node telegram-handler.js disable-all | | /autorespond set-time-window/autorespond_set_time_window | set-time-window | node telegram-handler.js set-time-window | | /autorespond clear-time-windows/autorespond_clear_time_windows | clear-time-windows | node telegram-handler.js clear-time-windows | | /autorespond add-keyword/autorespond_add_keyword | add-keyword | node telegram-handler.js add-keyword | | /autorespond remove-keyword/autorespond_remove_keyword | remove-keyword | node telegram-handler.js remove-keyword | | /autorespond clear-keywords/autorespond_clear_keywords | clear-keywords | node telegram-handler.js clear-keywords | | /autorespond stats/autorespond_stats [] | stats | node telegram-handler.js stats [] | | /autorespond set-daily-cap/autorespond_set_daily_cap | set-daily-cap | node telegram-handler.js set-daily-cap | 处理步骤: 1. 检测 /autorespond/autorespond_ 前缀 2. 提取子命令(将下划线归一化为空格) 3. 解析剩余参数 4. 调用 telegram-handler.js 并传入对应参数 ### 自然语言模式匹配 - "show/list/view auto-responder" → node telegram-handler.js list - "add [contact] to auto-responder" → node telegram-handler.js add - "change/edit/update [contact]'s prompt" → node telegram-handler.js edit - "set delay for [contact]" → node telegram-handler.js delay - "disable/remove [contact] from auto-responder" → node telegram-handler.js remove - "auto-responder status" → node telegram-handler.js status - "what has auto-responder sent to [contact]" → node telegram-handler.js history - "restart auto-responder" → node telegram-handler.js restart - "enable/disable auto-responder" → node telegram-handler.js toggle 联系人解析: - 当用户用名字指代联系人时,从配置中查找对应号码 - 始终使用完整 E.164 格式(如 +15551234567配置变更后: 若命令输出提示需重启,务必提醒用户重启 watcher。 ## 故障排除 ### 监控器无响应 查看状态: ` /autorespond_status ` 查看日志: `bash tail -f ~/clawd/logs/imsg-autoresponder.log ` 重启: ` /autorespond_restart ` ### 常见问题 "OPENAI_API_KEY not found" - 向 ~/.clawdbot/clawdbot.json 添加 API key: `json { "skills": { "openai-whisper-api": { "apiKey": "sk-proj-YOUR_KEY_HERE" } } } ` - 添加 key 后重启 watcher 权限错误 - 在系统设置中为 Terminal 授予完全磁盘访问权限 - 授权后重启 Terminal - 手动验证 imsg chats --json 可用 消息未被检测到 - 检查 Messages.app 已登录 - 确认联系人已在监控列表:/autorespond_list - 确保 watcher 正在运行:/autorespond_status 重复回复 - 当前版本已通过处理锁修复 - 重启 watcher 应用修复:/autorespond_restart ### 测试 生成真实 AI 回复但不发送(预览模式): ` /autorespond_test +15551234567 Hey what's up? ` 这将: - 使用联系人真实提示 - 通过 OpenAI 生成真实 AI 回复 - 精确展示将发送的内容 - 不会真正发送 消息 适合在正式启用前测试新提示! ## 隐私与安全 ⚠️ 重要: 本工具将代表你自动发送消息。 - 仅添加知情或不会介意与 AI 短信的联系人 - 定期通过 /autorespond_history 审查回复 - 使用速率限制避免 spam - 适当时保持透明 - 可立即禁用:/autorespond_toggle` ## 未来增强 - 基于对话模式的智能速率限制 - 群聊支持 - Web 仪表盘 - 语音消息转录

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务