This repo stores an AI agent skill for Apple Messages.app iMessage integration on macOS.
The public interface is scripts/commands.
scripts/applescripts stores internal AppleScript backends and dictionary-aligned coverage.
npx skills add vinitu/macos-imessage-skillOr with skills.sh:
skills.sh add vinitu/macos-imessage-skill- macOS with Messages.app configured and signed in to iMessage
- Automation permission for Terminal (for sending)
- Full Disk Access for Terminal (for reading history via
scripts/commands/message/history.sh) - jq for history script output (
brew install jq)
Run skill actions with:
scripts/commands/<entity>/<action>.sh [args...]Output rules:
- Commands return JSON by default unless noted otherwise.
--json,--plain, and--format=plain|jsonare not supported.
scripts/commands/account/*→ AppleScript inscripts/applescripts/account/*scripts/commands/chat/*→ AppleScript inscripts/applescripts/chat/*scripts/commands/message/*→ AppleScript inscripts/applescripts/message/*(send) or SQLite query (history)
scripts/applescripts is internal. Do not call it directly from the skill instructions.
Account:
scripts/commands/account/list.shscripts/commands/account/default.sh
Chat:
scripts/commands/chat/list.sh
Message:
scripts/commands/message/send.shscripts/commands/message/history.sh
Account object:
iddescriptionservice_typeenabled
Chat object:
idname
History object:
dateis_from_metext
Scalar envelopes:
account_id:{"account_id": "..."}sent(plain text from send command, not JSON)
make compile
make testmake test runs live checks against Messages.app and expects iMessage to be available.
- Messages.app must be running and signed in to iMessage.
- TCC permissions (Automation) must be granted to the terminal or parent process.
- SMS (green bubble) may require iPhone relay setup in Messages.app.
- Message history requires Full Disk Access.