Installation
SKILL.md
Email Automation via macOS Mail.app
This skill uses small bash scripts (AppleScript under the hood) to automate the native macOS Mail.app. Scripts live in the scripts/ subfolder and are intended to be called with parameters instead of editing AppleScript snippets inline.
Requirements
- Mail.app must be configured. Initially assume that it is.
- macOS will prompt for automation permissions the first time.
- ALWAYS confirm with the user before any write action (send, delete, archive, mark read).
Suggested workflow
Use these scripts as a small toolbox. The typical path is:
- Discover accounts and mailbox names with
list_accounts.sh. Treat this as the source of truth for localized mailbox names. - When you need a specific message, start with
list_recent.shorsearch_inbox.shto get IDs. - If the message is older, switch to
search_mailbox.shusing the exact mailbox name from step 1. - Use IDs for precise actions:
read_by_id.shto inspect,open_by_id.shto show in Mail.app,reply.shto draft a reply. - For write actions (
send.sh,archive_*.sh,delete.sh,mark_read.sh), always confirm with the user first and double-check the ID.