Skip to content

/mail

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

shell
$ 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.
  • You can call itInvoke it directly when you want it.
  • Slash command/mail
How auto-invocation works

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"`
Read it on GitHub ↗
Ships withbendrucker-claude

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

Get the whole plugin, auto-invoked
Stats
15
Stars
0
Views
1
Forks
Active
Maintenance
TypeScript
Language
MIT
License
14h ago
Last commit
1y ago
Created

Repo: bendrucker/claude