agentleFS
sweetrbsweetrb/apple-mail-mcp/skills/apple-mail/SKILL.md

apple-mail

Skill84 starsChanged 2 months agoMITView on GitHub

Use this skill when the user wants to manage Apple Mail on macOS - reading, searching, sending, replying to, forwarding, and organizing emails and mailboxes. This skill provides access to Apple Mail through MCP tools.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. CodeWithBehnam/cc-docs★ 2same name
    2. eins78/agent-skills★ 2same name
    3. alfredourena/skills★ 0same name
    4. gaofeng21cn/opl-skills★ 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.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user:

    line 12
  2. Distinctive:

    When the user wants to see their inbox:

    line 137
  3. Distinctive:

    When the user wants to find specific emails:

    line 149
  4. Distinctive:

    When the user wants to see email content:

    line 161
  5. Distinctive:

    When the user wants to send an email:

    line 170
  6. Distinctive:

    When the user wants to respond to emails:

    line 182
  7. Distinctive:

    When the user wants to organize:

    line 197
  8. Very specific:

    Message IDs: All message operations require an ID.

    line 212
  9. Very specific:

    Account Selection: Read tools (list-messages, search-messages) cover all accounts when account is omitted.

    line 214
  10. Very specific:

    Draft vs Send: Use create-draft when the user wants to review before sending.

    line 215
  11. Very specific:

    Backslash Escaping: When email content contains backslashes, escape them as \\ in the JSON.

    line 216
  12. Distinctive:

    "Failed to send": Check network connection and Mail.app configuration.

    line 224
  13. Very specific:

    Use reply-to-message with the original message id for replies.

    line 263

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Apple Mail Skill

This skill enables you to manage Apple Mail on macOS through natural language. Use it whenever the user mentions email, wants to send messages, or needs to read, search, or organize their inbox.

When to Use This Skill

Use this skill when the user:

  • Wants to check their email or inbox
  • Asks to find or search for emails
  • Wants to read a specific email message
  • Needs to send an email or reply to one
  • Wants to create a draft email for review
  • Asks to forward an email to someone
  • Wants to mark emails as read/unread or flag them
  • Asks to delete or move emails
  • Mentions Apple Mail, Mail app, inbox, or "my email"

Available Tools

Message Operations

ToolPurpose
list-messagesList messages in a mailbox (all mailboxes if omitted)
search-messagesFind messages by sender or subject (query), or by body text (body, IMAP backend)
get-messageRead the full content of a message
get-message-headersRead a message's raw RFC 5322 headers (author's Date:, Message-ID, threading ids, Received: trace) without the body
get-message-rfc822Acquire the complete original RFC 822 bytes over IMAP — untouched, with uid/uidValidity/internalDate/flags/RFC822.SIZE and a SHA-256 — for an archival or forensic .eml (imap: ids only; read-only: EXAMINE + BODY.PEEK[]; inline up to 6 MiB, savePath up to 25 MiB)
get-threadGet the full conversation thread for a message
send-emailSend a new email immediately
send-serial-emailSend personalized copies to many recipients (mail merge with {{Key}} placeholders)
create-draftSave an email to Drafts for review
reply-to-messageReply to a message (supports reply-all)
forward-messageForward a message to new recipients
mark-as-readMark a message as read
mark-as-unreadMark a message as unread
flag-messageFlag a message for follow-up (optional color)
unflag-messageRemove flag from a message
delete-messageMove a message to Trash
move-messageMove a message to a different mailbox
resolve-message-idConvert imap: ids to numeric Mail.app ids for the AppleScript reply/forward path. Direct SMTP replies and forwards accept imap: ids without conversion. Not needed for flag colors: since 2.10.0 flag-message/batch-flag-messages write the color over IMAP directly
list-attachmentsList a message's attachments (name, MIME type, size)
save-attachmentSave an attachment to disk
fetch-attachmentFetch an attachment's bytes inline as base64

Batch Operations (1-100 ids per call)

ToolPurpose
batch-delete-messagesMove multiple messages to Trash
batch-move-messagesMove multiple messages to a mailbox
batch-mark-as-readMark multiple messages as read
batch-mark-as-unreadMark multiple messages as unread
batch-flag-messagesFlag multiple messages (optional color)
batch-unflag-messagesRemove flags from multiple messages

Mailbox Operations

ToolPurpose
list-mailboxesList all mailboxes/folders in an account
get-unread-countGet count of unread messages
create-mailboxCreate a new mailbox/folder
delete-mailboxDelete a mailbox
rename-mailboxRename a mailbox

Account Operations

ToolPurpose
list-accountsList configured email accounts

Smart Mailbox Operations

Smart mailboxes are criteria-based virtual views, not real folders — use these when the user wants a saved filter/search rather than moving mail. They work on localized macOS because they edit SyncedSmartMailboxes.plist directly (backed up and atomic; existing smart mailboxes are never rewritten).

ToolPurpose
list-smart-mailboxesList smart mailboxes and their criteria
create-smart-mailboxCreate one (needs at least one of fromContains / subjectContains / bodyContains)
delete-smart-mailboxDelete one by name
create-newsletter-smart-mailboxesPropose "NL: <sender>" views for newsletter senders — defaults to dryRun: true; pass dryRun: false to actually create them

Requires Full Disk Access for the Node runtime (~/Library/Mail is TCC-protected); without it these report "no smart mailboxes" rather than a permission error. Changes appear the next time Mail is launched — have the user quit Mail first for reliable results. These tools never quit or restart Mail themselves.

Rules

ToolPurpose
list-rulesList Mail rules and their enabled state
create-ruleCreate a Mail rule (conditions + actions)
enable-ruleEnable a rule by name
disable-ruleDisable a rule by name
delete-ruleDelete a rule by name

Contacts

ToolPurpose
search-contactsLook up people in macOS Contacts to find their email addresses

Templates

ToolPurpose
save-templateCreate or update a reusable email template
list-templatesList saved templates
get-templateRead a template's full contents
use-templateCompose a draft from a template (with overrides)
delete-templateDelete a template

Diagnostics

ToolPurpose
health-checkVerify Mail.app connectivity
doctorDiagnose setup problems (permissions, accounts, IMAP/SMTP) with remediation steps
get-mail-statsGet message and unread statistics (one IMAP STATUS per mailbox — the priciest read; a partial: true result means the totals are floors, see failedAccounts)
get-sync-statusCheck whether Mail.app is running and syncing

Usage Patterns

Checking Email

When the user wants to see their inbox:

User: "Check my email"
Action: Use list-messages with mailbox="INBOX"

User: "Do I have any unread emails?"
Action: Use get-unread-count, then list-messages if they want details

Finding Emails

When the user wants to find specific emails:

User: "Find emails from Sarah"
Action: Use search-messages with query="Sarah"

User: "Search for emails about the project deadline"
Action: Use search-messages with query="project deadline"

Reading Emails

When the user wants to see email content:

User: "Show me that email from John"
Action: First search-messages to find it, then get-message with the ID

Sending Emails

When the user wants to send an email:

User: "Send an email to bob@example.com about the meeting"
Action: Use send-email with to=["bob@example.com"], appropriate subject and body

User: "Draft an email to the team" (wants to review first)
Action: Use create-draft, then tell user to review in Mail.app

Replying and Forwarding

When the user wants to respond to emails:

User: "Reply to that email"
Action: Use reply-to-message with the message ID and body

User: "Reply all with my thoughts"
Action: Use reply-to-message with replyAll=true

User: "Forward this to my colleague"
Action: Use forward-message with the message ID and recipient

Organizing Email

When the user wants to organize:

User: "Mark that as read"
Action: Use mark-as-read with the message ID

User: "Move these newsletters to Archive"
Action: Use move-message with mailbox="Archive"

User: "Delete that spam"
Action: Use delete-message with the message ID

Important Guidelines

  1. Message IDs: All message operations require an ID. Get IDs from list-messages or search-messages first.
  2. Recipient Arrays: The to, cc, and bcc parameters must be arrays, even for single recipients: ["email@example.com"]
  3. Account Selection: Read tools (list-messages, search-messages) cover all accounts when account is omitted; other operations default to Mail's default account (first enabled account as fallback). Use the account parameter to target a specific one.
  4. Draft vs Send: Use create-draft when the user wants to review before sending. Recommend this for important emails.
  5. Backslash Escaping: When email content contains backslashes, escape them as \\ in the JSON.
  6. macOS Only: This skill only works on macOS systems.

Error Handling

  • "Message not found": The message ID may be invalid or the message was deleted. Use search-messages to find it again.
  • "Permission denied": User needs to grant automation permission in System Settings > Privacy & Security > Automation. Run the doctor tool for a full diagnosis.
  • "Account not found": Account names are case-sensitive. Use list-accounts to see exact names.
  • "Failed to send": Check network connection and Mail.app configuration.

Examples

Quick inbox check

User: "Any important emails today?"
→ list-messages to see recent messages
→ Summarize senders and subjects for user

Email workflow

User: "Reply to Sarah's email about the budget"
→ 1. search-messages query="Sarah budget"
→ 2. get-message to read content
→ 3. reply-to-message with user's response

Safe sending pattern

User: "Send an email to the client about the delay"
→ 1. create-draft with the composed email
→ 2. Tell user: "I've created a draft. Please review it in Mail.app before sending."

Multi-account usage

User: "Check my work email"
→ 1. list-accounts to find work account name
→ 2. list-messages with account="Work Exchange"

Preserve reply threading and delivery format

Use reply-to-message with the original message id for replies. send-email creates a new conversation; a Re: subject alone does not create threading headers. For clean sending, use transport: "smtp" on reply/forward (requires SMTP setup). Composite imap: sources are read directly, without Mail.app synchronization. Once SMTP is selected, errors do not silently switch delivery backends. Explicit transport: "applescript" keeps the native alternative, including its known quote-wrapping limitation. For drafts, use send: false with transport omitted or applescript, not smtp. Read the returned transport; SMTP success may also include the sent messageId.

SMTP forwards need a readable plain-text original. HTML-only IMAP messages and failed Mail.app body reads are rejected before sending, so the original content cannot silently disappear. Explicit AppleScript forwarding remains available; do not retry through it automatically. Original attachments are not reattached by the plain-text SMTP forward path.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.