Skip to content
Development
Skill

/mail

Reading and managing Apple Mail via JXA. Use when working with email, archiving messages, or processing the inbox.

From plugin
bendrucker-claude
1685 skills10 agents1 MCP
Install
$ npx -y skills add bendrucker/claude --skill mail --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/mail

Context preview

The summary Claude sees to decide when to auto-load this skill.

Reading and managing Apple Mail via JXA. Use when working with email, archiving messages, or processing the inbox.

SKILL.md

mail.SKILL.md
name: mail
description: Reading and managing Apple Mail via JXA. Use when working with email, archiving messages, or processing the inbox.

Mail

Apple Mail automation via JXA (`osascript -l JavaScript`).

Archiving

Mail.app `delete()` moves messages to Trash, not Archive. There is no `archiveMailbox` property — find the archive mailbox by name per account.

See [archiving.md](archiving.md) for account detection, mailbox lookup, and batch archive patterns.

Reading

var app = Application("Mail");
var inbox = app.inbox();
var messages = inbox.messages();

Key properties: `subject()`, `sender()`, `dateReceived()`, `content()`, `mailbox().account()`.

Notes

  • JXA arrays from Mail may lack `.map()/.filter()` — use `Array.from()` or for-loops
  • `.whose()` selectors fail on child mailbox arrays — use for-loops
  • Launch Mail first if not running: `open -g -a "Mail"`
Ships withbendrucker-claude

My personal plugin marketplace for Claude Code, Anthropic's AI coding assistant.

Get the whole plugin

Other skills on bendrucker-claude.