/apple-mail:email-attachmentsfrom apple-mail
This skill should be used when the user asks to "list attachments on messages about X", "save this PDF from email", "which invoices have ZIP files", or needs disk-safe attachment extraction. Uses bounded search_emails (has_attachments filters) to collect message_ids first, then list_email_attachments, save_email_attachment, get_email_by_id for confirmation, and optionally export_emails for bundles. Discovery-only; pass subject_keyword to search_emails when ids are unknown; never pass subject_keyword to list_email_attachments or save_email_attachment. Do NOT use when the real goal is writing responses (email-drafting), diagnosing slow accounts (apple-mail-operator), bulk deleting mail (email-archive-cleanup), or designing folder hierarchies (mailbox-taxonomy).
Ships in apple-mail. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Attachment-focused traversal with deliberate filesystem hygiene. Never save into sensitive system paths; the MCP blocks known dangerous destinations; still confirm user intention.
| Signal | Skill |
|---|---|
| "Save attachment ..." | Here |
| "What files shipped with invoice thread?" | Here |
| "Reply summarizing attachments" | Start here for inventory → email-drafting |
Prefer known message_id from upstream search/list.
Otherwise:
search_emails(subject_keyword="...", has_attachments=true, recent_days=7, limit=20)
Use the subject search above only as a degraded discovery path after confirming no exact id is available. Review the results and collect message_id before listing or saving attachments.
For true full-inbox attachment audits (rare), page bounded search_emails(has_attachments=True, recent_days=..., limit=50, offset=N) calls instead of unbounded recent_days; full_inbox_export is disabled (UNBOUNDED_EXPORT_DISABLED) and is not an audit path.
Widen timeframe only after checking performance.
Prefer ids from step 1:
list_email_attachments(message_ids=["12345", "12346"], mailboxes=["INBOX", "Sent"],
max_results=10, output_format="json")
If ids are unknown, run bounded discovery first, then call by reviewed ids:
list_email_attachments(message_ids=["12345"], max_results=10)
unresolved_message_ids has two causes, and the wrong mailbox is only one of them. The other is max_results (default 50): it caps how many messages the scan inspects, and the counter is global across every mailbox in the call, so once the cap is reached the scan stops and every remaining id lands in unresolved_message_ids — indistinguishable from an id that was genuinely absent. The examples above pass max_results=10, which is exhausted by an eleventh id. When ids you know exist come back unresolved, raise max_results or split the batch before concluding they are elsewhere.
Attachments live wherever the message lives, and this tool only searches the mailboxes you name. The default is the account inbox alone, so an id in Sent Items, Archive, or a project folder resolves nowhere and comes back in unresolved_message_ids. Pass the mailbox each id came from: mailbox="Archive" for one, or mailboxes=["INBOX", "Sent", "Archive"] for several. "All" is rejected on both parameters; name the mailboxes explicitly. Discovery rows from search_emails / list_inbox_emails and members of a get_email_thread result each carry their own mailbox, so collect ids and mailboxes in the same pass.
Never report "no attachments" from an empty listing alone. In JSON, check complete first: it is true only when every requested id resolved and no mailbox failed. When it is false, read unresolved_message_ids (ids that were never seen — wrong mailbox, or the max_results cap) and errors, which is a merged list: a mailbox that failed to resolve or threw (which does not abort the other mailboxes), plus, whenever anything is unresolved, one N of M requested message id(s) were not found in the searched mailbox(es): ... line. A resolved message with genuinely zero attachments appears in resolved_message_ids and renders as No attachments; that is the only evidence that supports saying so. Text mode carries the same facts as a Mailboxes searched: header and trailing PARTIAL: ⚠ lines.
See large-inbox-rules.md for the canonical pre-flight.
list_email_attachments and save_email_attachment require exact message_ids; use bounded search_emails(..., has_attachments=True) first when ids are unknown. JSON attachment listing returns each row's message_id, attachment_index, filename, and size. Treat message_id + attachment_index as the exact selector for saving. attachment_index is 1-based: the first attachment is 1, and save_email_attachment(attachment_index=0) is refused with Error: attachment_index must be a positive 1-based integer.
If duplicate or similar filenames exist, choose the row from list_email_attachments(..., output_format="json") and save with attachment_index.
save_email_attachment(message_ids=["12345"], attachment_index=2,
save_path="/Users/<user>/Documents/Finance/Quarterly.pdf")
Rules:
$HOME per server validation.attachment_index from JSON listing. attachment_name is compatible but ambiguous duplicate matches return a structured error.Echo saved path, approximate size expectation, optionally open file externally (outside MCP).
When batch exports help, optionally layer export_emails(message_ids=[...]) afterward. Use entire-mailbox exports only for mailbox-level evidence trails.
Recommend virus scanning posture for unsolicited archives; never auto-enable macros/ZIPs.
When attachments are paper briefs (R&R specs, reviewer packets), save under $HOME, then attach to the operator's research project issue per research-project-tracking.md.
| Issue | Guidance |
|---|---|
| Ambiguous filenames | Choose the row in JSON from list_email_attachments, then pass its message ID and attachment index |
| Password-protected zips | Note inability to introspect payload |
| Extremely large corp attachments | Mention Mail may choke; consider chunked manual download |
| Listing came back empty | Not proof of "no attachments". Check complete / unresolved_message_ids (JSON) or the PARTIAL: ⚠ lines (text), then retry naming the mailbox that holds the id and with a max_results at least as large as the id batch |
Attachment counts from get_email_thread | Per-item attachment_count is null when Mail could not read the list, which is not 0. Confirm with list_email_attachments before reporting a count |
email-drafting: cite attachment paths when emailing summaries.apple-mail-operator: if attachment listing times out due to account scope mishaps.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub agentic-assets/apple-mail-mcp --plugin apple-mail12 skills in this plugin
/apple-mail-archive-exportUse when the user asks to "back up an Apple Mail account", "recover my partial.emlx attachments", "search an offline mail archive", or "convert my mail for Thunderbird". Runs local scripts to snapshot the Mail cache, rebuild detached MIME payloads, verify the output, and create a SQLite search index. Also indexes verified EML and ICS plugin exports with a manifest. Route staged moves or trash to email-archive-cleanup./apple-mail-operatorThis skill should be used when the user asks "how does this Mail MCP work", "why is Mail slow", "set up Mail for the assistant", "list my accounts/mailboxes", "find an email quickly", or "export my mail in batches". Uses list_accounts, list_mailboxes, get_inbox_overview, search_emails, and export_emails. Do NOT use for sustained inbox-zero programs (see email-management), a 5–10 minute triage ritual (see inbox-triage), or drafting mail (see email-drafting)./calendar-operatorThis skill should be used when the user asks "what's on my calendar", "am I free Thursday", "add an event", "block time for this", "clean up my test calendar", or "which calendar tool should I use". Covers bounded reads, timezone handling, safe event creation, ID-first updates and deletes, and calendar management with list_calendars, list_events, create_event, delete_events, and manage_calendars. Do NOT use for coordinating meetings with other people or invitation workflows (see meeting-scheduler), and do NOT use for email work (see apple-mail-operator)./email-archive-cleanupThis skill should be used when the user asks to "archive old mail safely", "move everything from X sender" (screens out human correspondents unless confidently spam), "clear newsletters", "bulk mark read after export", "preview what would move with dry_run=True", or run staged cleanup campaigns. Uses search_emails, move_email(dry_run=True) preview → execute, update_email_status, export_emails, manage_trash (max_deletes cap), synchronize_account, and get_statistics when measuring progress. Do NOT use for taxonomy design sessions without execution (mailbox-taxonomy), proposing Mail filter rules copy (mail-rules-advisor only), drafting mail (email-drafting), or the 5-minute triage skim (inbox-triage)./email-draftingThis skill should be used when the user asks to "draft an email", "reply to this message", "forward this thread", "verify my draft", or needs compose workflows in Apple Mail with draft-safe defaults. Covers compose_email, reply_to_email, forward_email, create_rich_email_draft, manage_drafts, verify_draft, and verify_drafts with exact message ids for replies, standalone-draft guardrails, native reply defaults, signatures, and post-draft verification. Do NOT use for inbox triage (inbox-triage), Mail MCP setup (apple-mail-operator), folder taxonomy (mailbox-taxonomy), Mail rules (mail-rules-advisor), staged bulk moves (email-archive-cleanup), or attachment extraction (email-attachments)./email-managementThis skill should be used when the user asks to "help me get to inbox zero", "build a repeatable triage program", "coordinate a multi-week cleanup across mailboxes", "set up sustained email habits", or "I'm drowning in email" and needs a multi-week umbrella program coordinating triage, taxonomy, cleanup, drafting, and analytics, not a single pass. Uses get_inbox_overview, search_emails, move_email, update_email_status, manage_trash, and get_statistics; routes single-purpose work to the narrow sibling skill instead. Do NOT use for tooling-only onboarding (see apple-mail-operator), a single 5–10 minute read-first scan (inbox-triage), a one-shot bulk move/archive/delete campaign (email-archive-cleanup), folder-architecture redesign without execution (mailbox-taxonomy), Mail filter prose only (mail-rules-advisor), or drafting voice capture (email-style-profile before email-drafting).