imessage
Skill4 starsChanged 5 months agoMITView on GitHub
Read and send iMessages via local macOS capabilities (no third-party API). Two modes. Send mode drafts a message and uses AppleScript (`osascript`) on explicit "send it" and requires only Automation, Messages permission (scoped, revocable). Read mode pulls from `~/Library/Messages/chat.db` via sqlite3 and requires Full Disk Access for Terminal, which is a broad permission, so it is opt-in only. Trigger on phrases like "text [person]", "iMessage [person]", "draft an imessage", "read my texts from [person]", "what did [person] text me", "/imessage". Defaults to drafts-only, never auto-sends.
26 other projects use a version of this.
Adopted by
Most recently taken up by
- shadow173/imessage-mcptheir own version, first seen Nov 8, 2026
- delorenj/skillstheir own version, first seen Nov 7, 2026
- photon-hq/skillstheir own version, first seen Nov 6, 2026
- thenavidm/imessage-mcp-clitheir own version, first seen Oct 20, 2026
- gquthier/CLAWGtheir own version, first seen Oct 17, 2026
- Stuko0/alice-agenttheir own version, first seen Oct 13, 2026
Used with
Projects with it also use heartmula, findmy and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
math-incSkillheartmula
Set up and run HeartMuLa, the open-source music generation model family (Suno-like). Generates full songs from lyrics + tags with multilingual support.
Also in 9 projects that use this
math-incSkillfindmy
Track Apple devices and AirTags via FindMy.app on macOS using AppleScript and screen capture.
Also in 16 projects that use this
john-data-chenSkilltouchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
Also in 7 projects that use this
john-data-chenSkillteams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
Also in 10 projects that use this
Tommy-ywSkillsongwriting-and-ai-music
Songwriting craft, AI music generation prompts (Suno focus), parody/adaptation techniques, phonetic tricks, and lessons learned. These are tools and ideas, not rules. Break any of them when the art calls for it.
Also in 12 projects that use this
mae616Skillp5js
p5.js(クリエイティブコーディング)のProcessing由来「コードでスケッチ」思想を軸に、setup/drawループ・座標系・インタラクション・パフォーマンス最適化を整理する。p5.js、Processing、クリエイティブコーディング、ジェネラティブアート、インタラクティブ表現、ビジュアルプログラミング、Canvas描画、パーティクル、フラクタル、ノイズ表現に関する相談で必ず使うこと。ユーザーが「コードでアート」「動くビジュアル」「インタラクティブな描画」と言った場合にも適用する。
Also in 13 projects that use this
- +4 more from math-inc
Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- NousResearch/hermes-agent★ 262ksame name
- math-inc/OpenGauss★ 1.3ksame name
- Tommy-yw/RunbookHermes★ 546same name
- aivrar/portable-hermes-agent★ 239same name
- RedWoodOG/Hermes-Desktop★ 177same name
- AtlasOmnia/donna-starter★ 136same name
- emanueleielo/ciana-parrot★ 77same name
- AtlasOmnia/hermes-custom-pack★ 75same name
- wundercorp/loki★ 28same name
- delorenj/skills★ 17same name
16 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- ai-writing-qaSkill
- build-captureSkill
- build-modeSkill
- fitfoSkill
- flow-mapSkill
- generate-system-mapSkill
- leanSkill
- meta-promptSkill
- no-bullshitSkill
- plain-englishSkill
- pressure-testSkill
- problem-logSkill
- reality-checkSkill
- swipeSkill
- video-breakdownSkill
- viral-hook-creatorSkill
- working-with-claudeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 13 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 26 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Read and send iMessages locally.
- Distinctive: line 20
Do NOT use for:
- Distinctive: line 55
Before invoking read mode for the first time in a session, warn the user once:
- Distinctive: line 59
If the user confirms, proceed:
- Distinctive: line 75
Always copy chat.db to /tmp first, query the copy, delete the copy.
- Distinctive: line 79
When the user says "text Alex", resolve the contact:
- Distinctive: line 81
If you already have the person's phone (E.164) or Apple ID, use it.
- Distinctive: line 83
If the person is not found, ask once: "What's [name]'s phone or Apple ID?"
- Distinctive: line 85
Do NOT scrape Contacts.app via AppleScript without confirming.
- Distinctive: line 91
Never auto-reply to incoming messages.
- Distinctive: line 92
If AppleScript send fails (no Automation permission, Messages.app not running, recipient not on iMessage), surface the error and the draft …
- Distinctive: line 93
Do not store message bodies in any log or cache.
- Very specific: line 97
When the user first invokes this skill, check whether permissions are configured.
- Distinctive: line 105
After granting, the terminal app must be fully quit and relaunched.
“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
imessage
Read and send iMessages locally. No MCP server, no cloud API. Two modes with very different permission costs.
Requires a Mac with iMessage set up: Messages must be signed into your Apple ID and able to send from this Mac. macOS only, this does not work on Windows, Linux, or from a phone alone.
When to use
- "Text Alex that I'm running 10 min late"
- "Draft an iMessage to [person] saying..."
- "Send Sam a quick text about..."
- "What did [person] text me yesterday?"
- "Pull up my last thread with [person]"
Do NOT use for:
- Slack or other chat apps (use their own tools)
- Email (use an email tool)
- SMS to non-Apple recipients without confirming the contact has iMessage (AppleScript can still route as SMS via the iPhone bridge, but only if Continuity is on)
Modes
Send mode (default, low-permission)
- Confirm recipient and message. Match the tone to the recipient (casual with friends, more measured with colleagues).
- Show the draft. Wait for "send it" or equivalent.
- On approval, send via AppleScript:
osascript <<'APPLESCRIPT'
tell application "Messages"
set targetService to 1st service whose service type = iMessage
set targetBuddy to buddy "PHONE_OR_APPLE_ID" of targetService
send "MESSAGE_TEXT" to targetBuddy
end tell
APPLESCRIPTReplace PHONE_OR_APPLE_ID with the recipient's phone (E.164, e.g. +19175551234) or Apple ID email. Replace MESSAGE_TEXT with the drafted body, escaping quotes and backslashes for AppleScript.
Permission required: System Settings, Privacy & Security, Automation, enable Messages under Terminal (or iTerm, or whatever shell host Claude Code runs in).
Permission NOT required: Full Disk Access. Send mode does not read chat.db.
Read mode (opt-in, high-permission)
Required for: pulling thread history, searching past messages, triaging recent texts.
Cost: Reading ~/Library/Messages/chat.db requires Full Disk Access for Terminal. FDA is a broad, system-level permission. Once granted, the terminal binary can read all protected user data (Photos, Health, banking caches, and more), not just iMessages. This is the OS design, not a skill choice.
Before invoking read mode for the first time in a session, warn the user once:
Heads up: reading iMessages needs Full Disk Access on Terminal, which is a broad permission. Send-only mode doesn't need it. Want me to proceed with read access, or stick to drafts and sends?
If the user confirms, proceed:
# Copy first to avoid locking conflicts with Messages.app
cp ~/Library/Messages/chat.db /tmp/chat.db.snap
sqlite3 /tmp/chat.db.snap "SELECT datetime(message.date/1000000000 + 978307200, 'unixepoch', 'localtime') as ts, handle.id as sender, message.is_from_me, message.text FROM message LEFT JOIN handle ON message.handle_id = handle.ROWID WHERE message.text IS NOT NULL ORDER BY message.date DESC LIMIT 20;"
rm /tmp/chat.db.snapSchema notes:
message.dateis nanoseconds since 2001-01-01 UTC. Convert:date/1000000000 + 978307200gives Unix epoch.handle.idis the other party's phone or Apple ID.message.is_from_meis 1 if you sent it, 0 if received.message.textis null for attachment-only messages and reactions; check theattributedBodyblob for newer iOS versions.- Threads/conversations live in the
chattable joined viachat_message_join.
Always copy chat.db to /tmp first, query the copy, delete the copy. Direct queries against the live file can lock when Messages.app is open.
Recipient lookup
When the user says "text Alex", resolve the contact:
- If you already have the person's phone (E.164) or Apple ID, use it.
- You can keep a simple lookup file at
~/.claude/data/contacts.jsonmapping names to handles, and read it if it exists. Do not create it if it is missing. - If the person is not found, ask once: "What's [name]'s phone or Apple ID?"
Do NOT scrape Contacts.app via AppleScript without confirming; that adds another permission surface.
Hard rules
- Drafts only by default. Never send without an explicit "send it" from the user in the same turn.
- One recipient at a time unless the user says "group" or names multiple people. A group send needs the existing chat's identifier (AppleScript can't address a group by member list alone), so confirm the exact target before sending.
- Never auto-reply to incoming messages. Read mode is read-only; deciding what to answer is the user's call.
- If AppleScript send fails (no Automation permission, Messages.app not running, recipient not on iMessage), surface the error and the draft so the user can paste manually.
- Do not store message bodies in any log or cache.
First-run setup
When the user first invokes this skill, check whether permissions are configured. If osascript -e 'tell application "System Events" to return name of every process' fails with a permission error, the Automation permission isn't granted yet. Direct the user to:
System Settings, Privacy & Security, Automation, Terminal (or iTerm), enable Messages
For read mode, additionally:
System Settings, Privacy & Security, Full Disk Access, enable Terminal (or iTerm)
After granting, the terminal app must be fully quit and relaunched. The Claude Code session needs to restart inside the newly-permissioned terminal.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

