messages
Skill4 starsChanged 4 months agoMITView on GitHub
Browse conversations, read messages, and send texts in Apple Messages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- jootsing-research/skillstheir own version, first seen Sep 10, 2026
- ayrshare/ayrshare-social-media-api-claude-plugintheir own version, first seen Jun 6, 2026
- github/gh-awtheir own version, first seen May 27, 2026
- seahyc/lark-cowork-plugintheir own version, first seen Apr 1, 2026
- yjwong/lark-clitheir own version, first seen Jan 14, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- github/gh-aw★ 5.3ksame name
- yjwong/lark-cli★ 54same name
- ayrshare/ayrshare-social-media-api-claude-plugin★ 19same name
- jootsing-research/skills★ 1same name
- seahyc/lark-cowork-plugin★ 0same name
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.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
Regular conversations: follow. Label format: "Name, Preview text, Date"
- Distinctive: line 126
What to do: Ask the user to manually open the conversation you need, then read its messages.
- Very specific: line 142
When you fill the search field, results appear in a popover > scroll_area > table > row structure — not inside the ConversationList.
“Common” is measured: kept by at least 6 in 10 of the 4 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
Messages.app Automation
Connect
connect_app({ name: "Messages" })Layout
Messages has a two-pane layout: conversation list (left) and transcript (right).
- Window title reflects the currently open conversation's contact name.
- The window identifier is always
SceneWindow.
Key Elements
Toolbar
| Query | Label | Action |
[{role:"window"}, {role:"toolbar"}, {role:"button"}] | Compose | Start new conversation |
[{role:"window"}, {role:"toolbar"}, {role:"menu_button", index:0}] | filter | Filter: Messages / Spam / Recently Deleted |
[{role:"window"}, {role:"toolbar"}, {role:"menu_button", index:1}] | Start FaceTime | Call menu |
Search
[{"role":"window"}, {"role":"group", "identifier":"CKConversationListCollectionView"}, {"role":"text_field"}]Label: "Search". Use fill to type a search query.
Conversation List
Container:
[{"role":"window"}, {"role":"group", "identifier":"ConversationList"}]Each conversation is a text element. Iterate with index:
[{"role":"window"}, {"role":"group", "identifier":"ConversationList"}, {"role":"text", "index": N}]- Pinned contacts come first (indices 0, 1, 2, ...). Label format:
"Name, Pinned" - Regular conversations follow. Label format:
"Name, Preview text, Date"
The label field contains all info — contact name, last message preview, and timestamp are comma-separated.
To open a conversation, the user must click it manually — see Gotchas below.
Conversation Title
[{"role":"window"}, {"role":"button", "identifier":"ConversationTitle"}]Shows the currently open contact's name in label. Click to view contact details.
Message Transcript
Container:
[{"role":"window"}, {"role":"group", "identifier":"TranscriptCollectionView"}]Two types of children:
Date/time separators — text elements. Iterate with index:
[..., {"role":"text", "index": N}]Label examples: "Nov 6, 2022 at 16:30", "Sun, Mar 1 at 00:50"
Message bubbles — group elements with identifier: "Sticker". Iterate with index:
[..., {"role":"group", "identifier":"Sticker", "index": N}]- The group's
labelcontains a summary:"Your iMessage, message text, time"or"Contact name, message text, time". Use this to determine sender and direction. - For the full message text, go one level deeper:
The[..., {"role":"group", "identifier":"Sticker", "index": N}, {"role":"text_area", "identifier":"CKBalloonTextView"}]valuefield has the complete message content. - SMS messages may not have a
CKBalloonTextViewchild. In that case, extract the text from the Sticker group'slabel— the format is"Sender, message text, time", so strip the first and last comma-separated segments.
Message Input
Container:
[{"role":"window"}, {"role":"group", "identifier":"MessageEntryView"}]| Query (from MessageEntryView) | Label | Purpose |
{"role":"text_field", "identifier":"messageBodyField"} | Message / iMessage | Text input |
{"role":"button", "index":0} | add | Attachment picker (+) |
{"role":"button", "index":1} | Record audio | Voice message |
{"role":"button", "index":2} | Emoji picker | Emoji keyboard |
Useful Menu Items
| Path | Action |
File > New Message (id: new_message) | Cmd+N — new conversation |
Edit > Send Message (id: keyCommandSend:) | Send the composed message |
Conversation > Delete Conversation… (id: keyCommandDeleteConversation:) | Delete current conversation |
Conversation > Mark as Unread (id: keyCommandToggleUnreadState:) | Toggle unread state |
View > Show Times (id: keyCommandToggleTimeStamp:) | Show/hide timestamps |
Gotchas
Clicking conversation items causes multi-select
Messages uses a SwiftUI list for the conversation sidebar. Synthesized CGEvent clicks (coordinate-based) are always interpreted as Cmd+click, causing multi-select instead of switching conversations. This is a macOS-level behavior — physical hardware clicks work, synthesized ones don't. No workaround exists at the CGEvent level.
Consequence: You cannot programmatically switch between conversations. You can only read from the currently open conversation.
What to do: Ask the user to manually open the conversation you need, then read its messages. Or use the search field + keyboard navigation as a partial workaround (fill search, press Down, press Return — results vary).
SMS bubbles lack CKBalloonTextView
iMessage bubbles have a text_area id:"CKBalloonTextView" child with the full text in value. SMS bubbles may not. Fall back to parsing the Sticker group's label field: format is "Sender, message text, time" — strip the first and last comma-separated segments to get the message body.
Avoid press_key — it steals focus
press_key activates the target app before posting keyboard events. Prefer select_menu_item for menu actions (e.g. select_menu_item({ app: "Messages", menuPath: ["Edit", "Send Message"] })) and click/fill for UI elements. Only use press_key as a last resort when no AX or menu alternative exists.
Pinned contacts have no date in label
Pinned conversation items have label format "Name, Pinned" with no date or preview text. You cannot determine when the last message was sent without opening the conversation.
Search results appear in a popover
When you fill the search field, results appear in a popover > scroll_area > table > row structure — not inside the ConversationList. The popover rows don't support AXPress. Use keyboard navigation (Down arrow + Return) to select a search result — but note this depends on the app being frontmost.
Workflows
List all conversations
for index 0..N:
get_element [window, {group id:"ConversationList"}, {text, index}]
→ read label (name, preview, date are comma-separated)
stop when error (no more items)Read messages from the currently open conversation
# Check which conversation is open
get_element [window, {button id:"ConversationTitle"}]
→ label contains the contact name
# Read messages (oldest-first, iterate with index)
for index 0..N:
get_element [window, {group id:"TranscriptCollectionView"}, {group id:"Sticker", index}]
→ label gives sender + text + time
# For full text (iMessage):
get_element [..., {text_area id:"CKBalloonTextView"}] → value
# For SMS (no CKBalloonTextView): parse label insteadSend a message (in the currently open conversation)
fill [window, {group id:"MessageEntryView"}, {text_field id:"messageBodyField"}] with "Hello!"
select_menu_item({ app: "Messages", menuPath: ["Edit", "Send Message"] })Start a new conversation
click [window, toolbar, button] # Compose (AXPress works on buttons)
# A "To:" field appears — fill with the recipient name/number
# Then fill the message body and press ReturnDoes 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.

