iMessage AI 自动回复器:利用 GPT 自动化短信 - Openclaw Skills
作者:互联网
2026-04-15
什么是 iMessage AI 自动回复器?
iMessage AI 自动回复器是一款专为希望使用高级语言模型自动化通信的 macOS 用户设计的精密工具。通过利用 Openclaw Skills,该代理可以坚控传入的 iMessage 和短信流量,应用细粒度规则来决定何时以及如何回复。它将您的信息应用转变为一个智能助手,能够在无需手动干预的情况下保持您的语调和上下文。
该技能对于需要处理大量消息或向特定联系人提供即时回复的开发人员和高级用户特别有价值。它支持为每个联系人定制 AI 人设、频率限制和基于时间段的窗口,提供了一种专业且安全的方式来处理自动化消息,同时让用户通过 CLI 或 T@elegrimm 集成保持完全控制。
下载入口:https://github.com/openclaw/skills/tree/main/skills/koba42corp/i-responder
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install i-responder
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 i-responder。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
iMessage AI 自动回复器 应用场景
- 在繁忙的工作时间或私人时间自动回复频繁联系的联系人。
- 为不同的朋友、家人或客户设置特定的 AI 人设。
- 根据“紧急”或“帮助”等关键词过滤回复,确保关键消息得到即时关注。
- 通过每日上限和最小延迟间隔管理消息量,防止垃圾信息。
- 在启用实时自动回复之前,在安全的预览模式下测试 AI 回复逻辑。
- 后台观察者进程通过 imsg CLI 工具坚控所有传入消息。
- 系统根据配置的列表过滤发送者,以确定是否需要自动回复。
- 频率限制逻辑检查上次回复时间,以确保符合配置的冷却期。
- 如果符合条件,该技能将获取最近 20 条对话历史记录,为 AI 提供完整上下文。
- 使用联系人的特定提示词和对话历史记录,通过 OpenAI 或 Anthropic 生成 AI 回复。
- 生成的回复通过 iMessage 网络发送,并记录操作以供审查。
iMessage AI 自动回复器 配置指南
在开始之前,请确保您使用的是 macOS 并已授予终端“完全磁盘访问权限”。
- 通过 Homebrew 安装 imsg CLI:
brew install steipete/tap/imsg
- 在配置文件中配置您的 API 密钥。
- 添加您的第一个联系人和特定 AI 提示词:
node ~/clawd/imsg-autoresponder/scripts/manage.js add "+15551234567" "热情且简短地回复" "联系人姓名"
- 启动后台观察者开始坚控:
nohup node ~/clawd/imsg-autoresponder/scripts/watcher.js > /dev/null 2>&1 &
iMessage AI 自动回复器 数据架构与分类体系
该技能跨配置文件和状态文件管理数据,以确保持久性和安全性:
| 文件路径 | 描述 |
|---|---|
~/clawd/imsg-autoresponder.json |
主配置,包括列表、提示词和全局设置。 |
~/clawd/data/imsg-autoresponder-state.json |
跟踪用于频率限制和每日上限的上次回复时间戳。 |
~/clawd/logs/imsg-autoresponder.log |
用于坚控和故障排除的详细执行日志。 |
name: imsg-autoresponder
description: Monitor iMessage/SMS conversations and auto-respond based on configurable rules, AI prompts, and rate-limiting conditions. Use when you need to automatically reply to specific contacts with AI-generated responses based on conversation context. Also use when the user asks to manage auto-responder settings, contacts, prompts, or view status/history.
iMessage Auto-Responder
Automatically respond to iMessages/SMS from specific contacts using AI-generated replies that match your voice and conversation context.
?? Requirements Checklist
Before using this skill, ensure you have:
- macOS with Messages.app signed in to iMessage
- imsg CLI installed:
brew install steipete/tap/imsg - OpenAI API key configured in Clawdbot config
- Full Disk Access granted to Terminal/iTerm
- Messages automation permission (macOS will prompt on first use)
Features
- ?? AI-powered responses using OpenAI GPT-4
- ?? Contact-based prompts - different AI personality per contact
- ?? Rate limiting - configurable delays between auto-responses
- ?? Context-aware - AI sees recent conversation history
- ?? T@elegrimm management - slash commands + natural language
- ?? Background monitoring - continuous polling for new messages
- ?? Auto-cleanup - clears stale locks on restart (prevents stuck contacts)
- ?? Test mode - generate real AI responses without sending
- ? Time windows - only respond during specific hours (e.g., 9 AM - 10 PM)
- ?? Keyword triggers - only respond if message contains specific keywords (e.g., "urgent", "help")
- ?? Statistics tracking - track total responses, daily counts, and averages per contact
- ?? Daily cap - limit max replies per day per contact (safety feature)
Quick Start
1. Add contacts to watch list
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. Start the watcher
node watcher.js
The watcher runs in the foreground and logs to ~/clawd/logs/imsg-autoresponder.log.
3. Run in background (recommended)
# Start in background
nohup node ~/clawd/imsg-autoresponder/scripts/watcher.js > /dev/null 2>&1 &
# Or use screen/tmux
screen -S imsg-watcher
node ~/clawd/imsg-autoresponder/scripts/watcher.js
# Ctrl+A, D to detach
Configuration
Config file: ~/clawd/imsg-autoresponder.json
{
"enabled": true,
"defaultMinMinutesBetweenReplies": 15,
"watchList": [
{
"identifier": "+15551234567",
"name": "Best Friend",
"prompt": "Reply with a middle finger emoji",
"minMinutesBetweenReplies": 10,
"enabled": true
}
]
}
Management via T@elegrimm (Recommended)
The auto-responder can be managed directly through T@elegrimm using slash commands or natural language.
Slash Commands
Both space and underscore formats are supported:
/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
Bulk Operations:
/autorespond set-all-delays OR /autorespond_set_all_delays
/autorespond enable-all OR /autorespond_enable_all
/autorespond disable-all OR /autorespond_disable_all
Time Windows:
/autorespond set-time-window OR /autorespond_set_time_window
/autorespond clear-time-windows OR /autorespond_clear_time_windows
Keyword Triggers:
/autorespond add-keyword OR /autorespond_add_keyword
/autorespond remove-keyword OR /autorespond_remove_keyword
/autorespond clear-keywords OR /autorespond_clear_keywords
Statistics & Limits:
/autorespond stats OR /autorespond_stats []
/autorespond set-daily-cap OR /autorespond_set_daily_cap
Examples:
/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
Natural Language
You can also just ask naturally:
- "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"
The agent will understand and execute the command using the telegram-handler.js script.
Command-Line Management (Advanced)
cd ~/clawd/imsg-autoresponder/scripts
# List all contacts
node manage.js list
# Add contact
node manage.js add "+15551234567" "Your custom prompt here" "Optional Name"
# Remove contact
node manage.js remove "+15551234567"
# Enable/disable contact
node manage.js enable "+15551234567"
node manage.js disable "+15551234567"
# Set custom delay for contact (in minutes)
node manage.js set-delay "+15551234567" 30
# Toggle entire system on/off
node manage.js toggle
How It Works
- Watcher monitors all incoming messages via
imsg watch - Checks watch list to see if sender is configured for auto-response
- Rate limiting ensures we don't spam (configurable minutes between replies)
- Fetches message history for the conversation (last 20 messages)
- Generates AI response using Clawdbot + the contact's configured prompt
- Sends reply via
imsg send - Logs everything to
~/clawd/logs/imsg-autoresponder.log
State Tracking
Response times are tracked in ~/clawd/data/imsg-autoresponder-state.json:
{
"lastResponses": {
"+15551234567": 1706453280000
}
}
This ensures rate limiting works correctly across restarts.
Prompts
Prompts define how the AI should respond to each contact. Be specific!
Examples:
"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."
The AI will see:
- The contact's custom prompt
- Recent message history (last 5 messages)
- The latest incoming message
Requirements
- macOS with Messages.app signed in
imsgCLI installed (brew install steipete/tap/imsg)- Full Disk Access for Terminal
- Clawdbot installed and configured
- Anthropic API key (configured in
~/.clawdbot/clawdbot.jsonorANTHROPIC_API_KEYenv var) curl(pre-installed on macOS)
Safety
- Rate limiting prevents spam (default: 15 minutes between replies per contact)
- Manual override via
enabled: falsein config ornode manage.js disable - System toggle to disable all auto-responses:
node manage.js toggle - Logs track all activity for review
Troubleshooting
Watcher not responding:
- Check
~/clawd/logs/imsg-autoresponder.logfor errors - Verify
imsg watchworks manually:imsg watch --json - Ensure contact is in watch list:
node manage.js list
Rate limited too aggressively:
- Adjust delay:
node manage.js set-delay "+15551234567" 5 - Or edit
defaultMinMinutesBetweenRepliesin config
AI responses are off:
- Refine the prompt for that contact
- Check message history is being captured correctly (see logs)
Agent Command Handling
When the user uses slash commands or natural language about the auto-responder, use the telegram-handler.js script.
Command Mapping (Both Formats Supported)
| User Input | Normalize To | Handler Call |
|---|---|---|
/autorespond list or /autorespond_list |
list | node telegram-handler.js list |
/autorespond status or /autorespond_status |
status | node telegram-handler.js status |
/autorespond add or /autorespond_add |
add | node telegram-handler.js add |
/autorespond remove or /autorespond_remove |
remove | node telegram-handler.js remove |
/autorespond edit or /autorespond_edit |
edit | node telegram-handler.js edit |
/autorespond delay or /autorespond_delay |
delay | node telegram-handler.js delay |
/autorespond history or /autorespond_history |
history | node telegram-handler.js history |
/autorespond test or /autorespond_test |
test | node telegram-handler.js test |
/autorespond toggle or /autorespond_toggle |
toggle | node telegram-handler.js toggle |
/autorespond restart or /autorespond_restart |
restart | node telegram-handler.js restart |
/autorespond set-all-delays or /autorespond_set_all_delays |
set-all-delays | node telegram-handler.js set-all-delays |
/autorespond enable-all or /autorespond_enable_all |
enable-all | node telegram-handler.js enable-all |
/autorespond disable-all or /autorespond_disable_all |
disable-all | node telegram-handler.js disable-all |
/autorespond set-time-window or /autorespond_set_time_window |
set-time-window | node telegram-handler.js set-time-window |
/autorespond clear-time-windows or /autorespond_clear_time_windows |
clear-time-windows | node telegram-handler.js clear-time-windows |
/autorespond add-keyword or /autorespond_add_keyword |
add-keyword | node telegram-handler.js add-keyword |
/autorespond remove-keyword or /autorespond_remove_keyword |
remove-keyword | node telegram-handler.js remove-keyword |
/autorespond clear-keywords or /autorespond_clear_keywords |
clear-keywords | node telegram-handler.js clear-keywords |
/autorespond stats or /autorespond_stats [ |
stats | node telegram-handler.js stats [ |
/autorespond set-daily-cap or /autorespond_set_daily_cap |
set-daily-cap | node telegram-handler.js set-daily-cap |
Processing steps:
- Detect
/autorespondor/autorespond_prefix - Extract subcommand (normalize underscores to spaces)
- Parse remaining arguments
- Call telegram-handler.js with appropriate parameters
Natural Language Pattern Matching
- "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
Contact resolution:
- When user refers to contact names, look up their phone number from the config
- Always use the full E.164 format (e.g.,
+15551234567)
After config changes: Always remind the user to restart the watcher if the command output mentions it.
Troubleshooting
Watcher Not Responding
Check status:
/autorespond_status
View logs:
tail -f ~/clawd/logs/imsg-autoresponder.log
Restart:
/autorespond_restart
Common Issues
"OPENAI_API_KEY not found"
- Add API key to
~/.clawdbot/clawdbot.json:{ "skills": { "openai-whisper-api": { "apiKey": "sk-proj-YOUR_KEY_HERE" } } } - Restart watcher after adding key
Permission errors
- Grant Full Disk Access to Terminal in System Settings
- Restart Terminal after granting access
- Verify
imsg ch@ts --jsonworks manually
Messages not detected
- Check Messages.app is signed in
- Verify contact is in watch list:
/autorespond_list - Ensure watcher is running:
/autorespond_status
Duplicate responses
- Fixed in current version via processing locks
- Restart watcher to apply fix:
/autorespond_restart
Testing
Generate actual AI responses without sending (preview mode):
/autorespond_test +15551234567 Hey what's up?
This will:
- Use the contact's actual prompt
- Generate a real AI response via OpenAI
- Show exactly what would be sent
- NOT actually send the message
Perfect for testing new prompts before going live!
Privacy & Safety
?? Important: This tool sends messages on your behalf automatically.
- Only add contacts who know they're texting an AI or won't mind
- Review responses regularly via
/autorespond_history - Use rate limiting to avoid spam
- Be transparent when appropriate
- Disable instantly if needed:
/autorespond_toggle
Future Enhancements
- Smart rate limiting based on conversation patterns
- Group ch@t support
- Web dashboard
- Voice message transcription
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
CI 生成器:自动化 GitHub Actions 工作流 - Openclaw Skills
Bundle Checker:AI 驱动的 JS 包体积优化 - Openclaw Skills
AI 备份脚本生成器:自动执行数据库备份 - Openclaw Skills
录用信生成器:专业招聘文档自动化 - Openclaw Skills
MCP Hub 技能:连接 1200+ AI 代理工具 - Openclaw Skills
HTML 幻灯片:构建交互式 reveal.js 演示文稿 - Openclaw Skills
Doc Pipeline:文档工作流自动化 - Openclaw Skills
批量转换:自动化多格式文档管线 - Openclaw Skills
Soul World:AI 智能体社交模拟平台 - Openclaw Skills
agent-sims:社交 AI 智能体模拟平台 - Openclaw Skills
AI精选
