Apple mail
Personal collection of agent skills for Claude Code and the open agent skills ecosystem (skills.sh)
npx -y skills add rauleburro/skills --skill apple-mailAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Send, read, search, reply to, archive, and delete emails through Apple Mail on macOS. Use this skill whenever the user wants to interact with their Mail.app inbox — composing or sending a message (with or without attachments), checking unread mail, finding a specific thread, replying to a sender, cleaning up an inbox, or scripting any email operation locally. Triggers on Mac-specific email tasks like "send Ruben that doc", "what's unread from my boss", "reply to the last invoice", "archive everything from no-reply", "find that flight confirmation", or "draft a message with this PDF attached". Supports file attachments. Requires explicit user confirmation before sending, replying, or deleting.
SKILL.md
7.5 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it
Apple Mail Skill (AiMA fork)
This skill provides commands to interact with Apple Mail on macOS via AppleScript.
It is a user-managed fork of the upstream rbouschery/marketplace@apple-mail skill. Differences from the upstream version:
- Attachment support in
send-email.sh,create-draft.sh, andcreate-reply-draft.sh(extra final argument: comma-separated absolute paths). Scripts validate that each file exists before composing the message. - Mandatory confirmation flow before any outbound or destructive operation (see below). The agent must confirm with the user before invoking scripts that send mail or mutate the mailbox in ways that are hard to reverse.
MANDATORY: confirm before sending or deleting
Sending an email or deleting one from the mailbox is a real-world, externally-visible, hard-to-reverse action. Before invoking any of the following scripts, you MUST use AskUserQuestion (or a plain question in chat if the harness lacks that tool) to confirm with the user, and wait for explicit approval:
send-email.sh— sends a new messagesend-draft.sh— sends the front-most draft (which may already be composed)create-reply-draft.sh— composes a reply that the user could then senddelete-email.sh— removes a message from the mailbox
The confirmation MUST surface every relevant field, even when the user originally provided them — they may have changed their mind, mistyped, or expect you to derive defaults:
- From (sender account) — which configured Mail account will send. If unspecified, list available accounts with
list-accounts.shand ask which to use. - To — comma-separated list as it will be sent.
- Cc / Bcc — if any.
- Subject — exact text.
- Body — full text the user will see, not a paraphrase.
- Attachments — list of absolute paths (confirm they're the right files; check existence with
ls -laif uncertain).
For delete-email.sh, surface the message id, subject, sender, and target mailbox before confirming.
Only after explicit approval do you invoke the script. If the user requests changes, update the draft locally and re-confirm.
Reading, searching, archiving, marking read/unread, listing, and creating drafts (which stay open for the user to inspect) do NOT require this confirmation — they are read-only or non-destructive operations whose results the user can review before any final commit.
Suggested confirmation prompt for outbound mail
About to send this email — confirm before I proceed:
From: <sender>
To: <to>
Cc: <cc>
Subject: <subject>
Attachments: <path1>, <path2>
Body:
---
<full body>
---
Then ask: "Send as-is, edit, or cancel?"
Available Scripts
All scripts are in the ./scripts/ directory (relative to this SKILL.md). Execute them via bash.
Account & Mailbox Management (read-only)
| Script | Purpose | Arguments |
|---|---|---|
list-accounts.sh | List all email accounts | none |
list-mailboxes.sh | List mailboxes/folders | [account] (optional) |
get-unread-count.sh | Get unread email count | [account] [mailbox] (optional) |
Reading Emails (read-only)
| Script | Purpose | Arguments |
|---|---|---|
get-emails.sh | Get recent emails | [account] [mailbox] [limit] [include_content] [unread_only] |
get-email-by-id.sh | Get specific email by ID | <id> [account] [mailbox] [include_content] |
search-emails.sh | Search emails | <query> [account] [mailbox] [limit] |
Sending & Composing
| Script | Purpose | Arguments | Confirm? |
|---|---|---|---|
send-email.sh | Send an email | <to> <subject> <body> [cc] [bcc] [from] [attachments] | YES |
send-draft.sh | Send front-most draft | none | YES |
create-reply-draft.sh | Create reply to email | <message_id> <body> [reply_all] [account] [mailbox] [attachments] | YES |
create-draft.sh | Create a draft email (stays open for review) | <subject> <body> [to] [cc] [bcc] [from] [attachments] | optional |
[attachments] is a comma-separated list of absolute file paths. Each script verifies the files exist before composing the message; if any path is missing the script aborts with ERROR:Attachment not found: <path>.
Email Management
| Script | Purpose | Arguments | Confirm? |
|---|---|---|---|
delete-email.sh | Delete an email | <message_id> [account] [mailbox] | YES |
archive-email.sh | Archive an email | <message_id> [account] [mailbox] [archive_mailbox] | optional |
mark-read.sh | Mark email as read | <message_id> [account] [mailbox] | no |
mark-unread.sh | Mark email as unread | <message_id> [account] [mailbox] | no |
Output Format
Scripts use delimiters for structured output:
<<>>separates fields within a record|||separates multiple recordsERROR:prefix indicates an error message
Email Record Format
id<<>>subject<<>>sender<<>>to<<>>cc<<>>bcc<<>>dateSent<<>>isRead<<>>content|||
Usage Examples
List accounts
./scripts/list-accounts.sh
Get recent emails from INBOX
./scripts/get-emails.sh "" "INBOX" 10 false false
Search emails
./scripts/search-emails.sh "meeting notes" "" "" 20
Send an email (only after user confirmation!)
./scripts/send-email.sh "[email protected]" "Subject" "Body text"
Send with CC, BCC, sender, and attachments
./scripts/send-email.sh \
"[email protected]" \
"Subject" \
"Body" \
"[email protected]" \
"[email protected]" \
"[email protected]" \
"/path/to/report.pdf,/path/to/diagram.png"
Create a draft with attachment
./scripts/create-draft.sh \
"Draft Subject" \
"Draft body" \
"[email protected]" \
"" "" "" \
"/path/to/notes.md"
Reply to an email with an attachment (confirmation required)
./scripts/create-reply-draft.sh 12345 "Thanks for your message!" false "iCloud" "INBOX" "/path/to/answer.pdf"
Parsing Output
When receiving email records, parse them like this:
- Split by
|||to get individual records - Split each record by
<<>>to get fields - Fields are: id, subject, sender, to, cc, bcc, dateSent, isRead, content
Notes
- Scripts require macOS with Apple Mail configured.
- Apple Mail must have at least one account set up.
- First run may trigger macOS permission prompts for automation.
- Empty optional arguments should be passed as empty strings
"". - For scripts that take arrays (multiple recipients or attachments), pass comma-separated values.
- Attachment paths must be absolute, and the files must exist before invoking the script.
Reference
For advanced AppleScript patterns and customization, see ./reference/applescript-patterns.md.