⚠️ Use this plugin at your own risk. This is created for personal use, and running Claude Code with permissions off as a bot on a Mac connected to iMessage and the Internet exposes your computer to considerable security risks. The author is not responsible for your use of this, and you are assuming all liability by using it.
Claude Code iMessage Assistant
An iMessage assistant that monitors for messages and responds using the full power of Claude Code.

What is this?
This plugin adds iMessage capabilities to Claude Code, allowing you to:
- Read and send iMessages via command-line tools
- Run a daemon that monitors incoming messages from a specific contact
- Trigger autonomous agent sessions where Claude can work on tasks, check for follow-up messages, and send multiple replies
- Use the full Claude Code ecosystem - the agent has access to all your skills, tools, and resources
The daemon creates a continuous conversation thread with Claude Code over iMessage, making it accessible from iPhone, iPad, Mac, or Apple Watch.
Installation & Setup
Prerequisites
- macOS with Messages app signed in to iMessage
- Claude Code installed (get Claude Code)
- Full Disk Access permission for Terminal (System Preferences > Security & Privacy > Privacy > Full Disk Access)
1. Install the Plugin
# In any Claude Code session
/plugin marketplace add dvdsgl/claude-imessage
/plugin install imessage@dvdsgl
2. Configure the Daemon
Create a configuration file with the contact details of the person who will message the agent (the agent will respond to messages from this contact):
# Create config file
cat > ~/.claude-imessage.env << 'EOF'
export IMESSAGE_CONTACT_PHONE="4155551234" # Their phone number (digits only)
export IMESSAGE_CONTACT_NAME="John Doe" # Their name
export IMESSAGE_CONTACT_EMAIL="john@example.com" # Optional: their iMessage email
EOF
# Load the configuration
source ~/.claude-imessage.env
3. Start the Daemon
In any Claude Code session:
/imessage-daemon start
The daemon is now running and monitoring for messages from your configured contact!
4. Send a Message
Send an iMessage from your configured contact's phone, and watch Claude respond autonomously.
5. Manage the Daemon
/imessage-daemon status # Check if running and view logs
/imessage-daemon stop # Stop the daemon
/imessage-daemon start # Start the daemon
Features
iMessage Skill
The plugin includes a comprehensive iMessage skill with tools for:
- Reading messages: Access message history and conversation context via SQLite database
- Sending messages: Send to contacts, phone numbers, or group chats
- Checking new messages: Monitor for incoming messages
- File attachments: Send and receive files, images, documents
- Conversation management: List conversations, get chat identifiers
See skills/imessage/SKILL.md for complete documentation.
Auto-Reply Daemon
The daemon monitors iMessages and automatically:
- Detects new messages from a configured contact
- Starts an autonomous Claude Code agent session
- Sends multiple messages as it works on tasks
- Checks for new messages every 30-60 seconds
- Maintains conversation continuity across sessions
The agent has access to all Claude Code capabilities including other skills, tools, and can perform complex multi-step tasks autonomously.
Using the iMessage Skill
Once installed, you can use iMessage tools in any Claude Code conversation:
# Read recent messages from a contact
claude -p "Use the imessage skill to read my recent messages from 4155551234"
# Send a message
claude -p "Use the imessage skill to send a message to 4155551234 saying 'Hello!'"
# Check for new messages
claude -p "Use the imessage skill to check if I have any new messages"
How It Works
Agent Workflow
When the daemon receives a message, it:
- Starts a Claude Code agent with your message as the prompt
- Provides full context: Recent conversation history, available skills/tools
- Runs autonomously: The agent can:
- Send multiple messages as it works
- Check for new messages from you
- Use any Claude Code skills (calendar, files, APIs, etc.)
- Break down complex tasks into steps
- Ask for clarification when needed
- Maintains continuity: Uses conversation resume to maintain context across sessions
Conversation Continuity
The daemon uses Claude Code's conversation resume feature:
- First message starts a new conversation
- Subsequent messages resume the same conversation ID
- Full history is available across all agent sessions
- Conversation ID saved in
~/tmp/imessage/imessage_claude_conversation_id.txt
Example Interaction