From automating-mac-apps
Automates Apple Mail via JXA with AppleScript dictionary discovery. Use when asked to "automate email", "send mail via script", "JXA Mail automation", or "filter email messages". Covers accounts, mailboxes, batch message filtering, composition, attachments, and UI fallback.
How this skill is triggered — by the user, by Claude, or both
Slash command
/automating-mac-apps:skills/automating-mailThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Relationship to macOS automation skill](#relationship-to-the-macos-automation-skill)
references/attachment-extraction.mdreferences/html-data-merge.mdreferences/html-signature-workflow.mdreferences/mail-advanced.mdreferences/mail-basics.mdreferences/mail-dictionary.mdreferences/mail-pyxa-api-reference.mdreferences/mail-recipes.mdreferences/mail-rules.mdreferences/mailbox-archiver.mdscripts/create_email.pyscripts/create_mail_rule.pyscripts/extract_emails_to_contacts.pyscripts/search_and_archive.pyscripts/set_up_mail_automation.pyscripts/set_up_mail_automation.shautomating-mac-apps for permissions, shell, and UI scripting guidance.automating-mac-apps skill (PyXA Installation section).message.subject()), modify via assignments (message.readStatus = true).Read inbox (JXA):
const Mail = Application('Mail');
const message = Mail.inbox.messages[0];
console.log(message.subject());
Compose message (JXA):
const msg = Mail.OutgoingMessage({
subject: "Status Update",
content: "All systems go."
});
Mail.outgoingMessages.push(msg);
msg.visible = true;
PyXA alternative:
import PyXA
mail = PyXA.Mail()
inbox = mail.inboxes()[0]
message = inbox.messages()[0]
print(f"Subject: {message.subject()}")
Mail.inbox.messages.lengthautomating-mail/references/mail-basics.mdautomating-mail/references/mail-recipes.mdautomating-mail/references/mail-advanced.mdautomating-mail/references/mail-dictionary.mdautomating-mail/references/mail-rules.mdautomating-mail/references/html-signature-workflow.mdautomating-mail/references/attachment-extraction.mdautomating-mail/references/mailbox-archiver.mdautomating-mail/references/html-data-merge.mdautomating-mail/references/mail-pyxa-api-reference.mdnpx claudepluginhub SpillwaveSolutions/automating-mac-apps-plugin --plugin automating-mac-appsManages Apple Mail on macOS: reading, searching, sending, replying, forwarding, and organizing emails and mailboxes via MCP tools.