Install
$ agentstack add skill-spillwavesolutions-automating-mac-apps-plugin-automating-mail ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Automating Apple Mail (JXA-first, AppleScript discovery)
Contents
- [Relationship to macOS automation skill](#relationship-to-the-macos-automation-skill)
- [Core Framing](#core-framing)
- [Workflow](#workflow-default)
- [Quick Start Examples](#quick-start-examples)
- [Validation Checklist](#validation-checklist)
- [When Not to Use](#when-not-to-use)
- [What to load](#what-to-load)
Relationship to the macOS automation skill
- Use
automating-mac-appsfor permissions, shell, and UI scripting guidance. - PyXA Installation: See
automating-mac-appsskill (PyXA Installation section).
Core Framing
- Mail dictionary is AppleScript-first; discover in Script Editor.
- Objects are specifiers: read via method calls (
message.subject()), modify via assignments (message.readStatus = true). - ObjC bridge available for advanced filesystem operations.
Workflow (default)
1) [ ] Ensure Mail configured and automation permissions enabled. 2) [ ] Discover terms in Script Editor (Mail dictionary). 3) [ ] Prototype minimal AppleScript command. 4) [ ] Port to JXA with defensive checks. 5) [ ] Use batch reads for performance. 6) [ ] Use UI scripting for signature and UI-only actions.
Quick Start Examples
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()}")
Validation Checklist
- [ ] Automation permissions granted (System Settings > Privacy > Automation)
- [ ] Inbox access works:
Mail.inbox.messages.length - [ ] Message property reads return expected values
- [ ] Composition creates visible draft
- [ ] Batch operations complete without errors
When Not to Use
- For cross-platform email automation (use IMAP/SMTP libraries)
- For bulk email sending (use transactional email services like SendGrid)
- When processing untrusted email content (security risk)
- For non-macOS platforms
What to load
- Mail JXA basics:
automating-mail/references/mail-basics.md - Recipes (filter, move, compose):
automating-mail/references/mail-recipes.md - Advanced patterns (batch ops, HTML, signatures):
automating-mail/references/mail-advanced.md - Dictionary translation table:
automating-mail/references/mail-dictionary.md - Rule scripts:
automating-mail/references/mail-rules.md - HTML + signature workflow:
automating-mail/references/html-signature-workflow.md - Attachment extraction pipeline:
automating-mail/references/attachment-extraction.md - Mailbox archiver:
automating-mail/references/mailbox-archiver.md - HTML data merge:
automating-mail/references/html-data-merge.md - PyXA API Reference (complete class/method docs):
automating-mail/references/mail-pyxa-api-reference.md
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: SpillwaveSolutions
- Source: SpillwaveSolutions/automating-mac-apps-plugin
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.