apple-mail
БесплатноЗапускает вложенные скриптыНе проверенRead and interact with Apple Mail via osascript on macOS. Use when you need to: (1) List mail accounts, (2) List mailboxes/folders for an account, (3) Get…
от modbender★ 21 звезда на GitHubОб этом скилле
Apple Mail Skill
Overview
This skill enables interaction with Apple Mail on macOS through AppleScript (osascript). It provides capabilities to list accounts, browse mailboxes, retrieve message lists, and read full message content.
Prerequisites
- macOS system
- Apple Mail app installed and configured
- At least one mail account set up in Apple Mail
- Apple Mail must be running when using this skill
Quick Start
List Available Accounts
python3 {baseDir}/scripts/list_accounts.py
List Mailboxes for an Account
python3 {baseDir}/scripts/list_mailboxes.py "Account Name"
Get Messages from a Mailbox
# Get 10 most recent messages (default)
python3 {baseDir}/scripts/get_messages.py "Account Name" "INBOX"
# Get specific number of messages
python3 {baseDir}/scripts/get_messages.py "Account Name" "INBOX" --limit 20
Read Full Message Content
python3 {baseDir}/scripts/get_message_content.py "MESSAGE_ID"
Typical Workflows
Workflow 1: Browse Mail
- List accounts to see what's available
- Choose an account and list its mailboxes
- Get messages from desired mailbox
- Read full content of specific messages
Workflow 2: Search for Specific Messages
- Get messages from target mailbox with appropriate limit
- Review subjects and senders from the list
- Identify message IDs of interest
- Read full content of relevant messages
Script Reference
list_accounts.py
Lists all configured mail accounts in Apple Mail.
Output format: JSON array of account names
{
"accounts": ["iCloud", "Gmail", "Work"],
"count": 3
}
list_mailboxes.py <account_name>
Lists all mailboxes (folders) for a specific account.
Arguments:
account_name: Name of the mail account (from list_accounts.py)
Output format: JSON array of mailbox names
{
"account": "iCloud",
"mailboxes": ["INBOX", "Sent", "Drafts", "Trash", "Archive"],
"count": 5
}
get_messages.py <account_name> <mailbox_name> [--limit N]
Retrieves message list from a specific mailbox.
Arguments:
account_name: Name of the mail accountmailbox_name: Name of the mailbox (e.g., "INBOX", "Sent")--limit N: Optional, max number of messages to retrieve (default: 10)
Output format: JSON array with message metadata
{
"account": "iCloud",
"mailbox": "INBOX",
"messages": [
{
"id": "123456",
"subject": "Meeting Tomorrow",
"sender": "[email protected]",
"date_sent": "Monday, January 27, 2026 at 10:30:00 AM",
"date_received": "Monday, January 27, 2026 at 10:30:05 AM",
"read_status": false,
"message_size": 2048
}
],
"count": 1
}
get_message_content.py <message_id>
Retrieves full content of a specific message.
Arguments:
message_id: Message ID from get_messages.py output
Output format: JSON with full message details
{
"subject": "Meeting Tomorrow",
"sender": "[email protected]",
"content": "Hi, let's meet tomorrow at 2 PM...",
"date_sent": "Monday, January 27, 2026 at 10:30:00 AM"
}
Common Patterns
Pattern: Find Unread Messages
- Get messages from INBOX
- Filter results where
read_statusisfalse - Read content of unread messages
Pattern: Check Sent Messages
- List mailboxes to find "Sent" or "Sent Messages"
- Get messages from sent mailbox
- Review what was sent recently
Pattern: Search Multiple Mailboxes
- List all mailboxes for account
- Iterate through mailboxes of interest
- Get messages from each
- Aggregate and present results
Error Handling
All scripts output errors in a consistent format:
{
"error": "Error description",
"details": "Additional context if available"
}
Common errors:
- Apple Mail not running: Start the Mail app
- Invalid account name: Check spelling, account names are case-sensitive
- Invalid mailbox name: Use exact name from list_mailboxes.py
- Message not found: Message may have been deleted or moved
Important Notes
- Case sensitivity: Account and mailbox names are case-sensitive
- Mail app must be running: All scripts require Apple Mail to be open
- Permissions: First use may prompt for automation permissions in System Preferences
- Performance: Large mailboxes may take longer to query; use --limit to constrain results
- Message IDs: Message IDs are persistent unless the message is deleted
Limitations
- Only works on macOS
- Requires Apple Mail (doesn't work with other mail clients)
- Cannot send or delete messages (read-only operations)
- Cannot modify message properties (flags, folders, etc.)
- Limited to mailboxes directly under accounts (nested folders may not be accessible)
Установить apple-mail в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл apple-mail?
Read and interact with Apple Mail via osascript on macOS. Use when you need to: (1) List mail accounts, (2) List mailboxes/folders for an account, (3) Get messages from a specific mailbox, (4) Read message content. Works with Apple Mail app on macOS only.
Как установить скилл apple-mail?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл apple-mail запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic