automating-mail

automating-mail is a skill for Claude Code, Codex from SpillwaveSolutions/automating-mac-apps-plugin. It costs 62 tokens per session (809 once invoked), scanned A, original, MIT.

A workflow for automating Apple Mail on macOS with JavaScript for Automation, Apple's scripting system for controlling applications.

In plain words
What is it for?
It helps inspect accounts and mailboxes, filter messages, compose emails, add attachments, and use the Mail interface for actions that scripts cannot handle directly.
Why use it?
It reduces repetitive email work and provides a way to handle tasks that are difficult to perform manually in large batches.

Skill for Claude CodeCodex

Part of the automating-mac-apps plugin — 16 skills, 10 commands, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/spillwavesolutions/automating-mac-apps-plugin/automating-mail
Any agent
npx skills add SpillwaveSolutions/automating-mac-apps-plugin --skill automating-mail
Clone the repo
git clone --depth 1 https://github.com/SpillwaveSolutions/automating-mac-apps-plugin

Made for: Claude Code, Codex.

Or install automating-mac-apps, the plugin that ships this one along with the rest of its 16 skills, 10 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for automating-mail

README.md
[![agentmods](https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-mail.svg)](https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-mail)
Your own site
<a href="https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-mail"><img src="https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-mail.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.00809
Opus 5 $0.00031 $0.00404
Sonnet 5 $0.00012 $0.00162
Haiku 4.5 $0.00006 $0.00081

Measured 5d ago against content hash fead01817076, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

automating-mail scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/create_email.py, scripts/create_mail_rule.py, scripts/extract_emails_to_contacts.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/automating-mac-apps-plugin/skills/automating-mail/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Automating Apple Mail (JXA-first, AppleScript discovery)

Contents

Relationship to the macOS automation skill

  • Use automating-mac-apps for permissions, shell, and UI scripting guidance.
  • PyXA Installation: See automating-mac-apps skill (PyXA Installation section).

Core Framing

  • Mail dictionary is AppleScript-first; discover in Script Editor.
  • Objects are specifiers: read via method calls (message.subject()), modify via assignments (message.readStatus = true).
  • ObjC bridge available for advanced filesystem operations.

Workflow (default)

  1. Ensure Mail configured and automation permissions enabled.
  2. Discover terms in Script Editor (Mail dictionary).
  3. Prototype minimal AppleScript command.
  4. Port to JXA with defensive checks.
  5. Use batch reads for performance.
  6. Use UI scripting for signature and UI-only actions.

Quick Start Examples

Read inbox (JXA):

const Mail = Application('Mail');
const message = Mail.inbox.messages[0];
console.log(message.subject());

Compose message (JXA):

const msg = Mail.OutgoingMessage({
  subject: "Status Update",
  content: "All systems go."
});
Mail.outgoingMessages.push(msg);
msg.visible = true;

PyXA alternative:

import PyXA
mail = PyXA.Mail()
inbox = mail.inboxes()[0]
message = inbox.messages()[0]
print(f"Subject: {message.subject()}")

Validation Checklist

  • Automation permissions granted (System Settings > Privacy > Automation)
  • Inbox access works: Mail.inbox.messages.length
  • Message property reads return expected values
  • Composition creates visible draft
  • Batch operations complete without errors

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 89 lines · 62 tokens per session scan A fead01817076

Subscribe to this mod's changes

automating-mail is a skill published in the GitHub repository SpillwaveSolutions/automating-mac-apps-plugin (40 stars, last pushed 14d ago), licensed MIT. It adds 62 tokens to every session and 809 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

import-audio

Moves audio files to the correct album location with proper path structure. Use when the user has downloaded WAV files from Suno or other sources that need to be organized.

bitwize-music-studio/claude-ai-music-skills · 37 tokens

catch

Shape output for a human working through agents. Use on every response, out to and including casual conversation, even when the user did not ask for brevity.

saadshahd/moo.md · 34 tokens

lark-workflow-standup-report

日程待办摘要:编排 calendar +agenda 和 task +get-my-tasks,生成指定日期的日程与未完成任务摘要。适用于了解今天/明天/本周的安排。.

DropFan/claude-code-plugins · 53 tokens

lark-attendance

飞书考勤打卡:查询自己的考勤打卡记录.

DropFan/claude-code-plugins · 19 tokens

lark-im

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件(支持大文件分片下载)、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。.

DropFan/claude-code-plugins · 147 tokens

lark-workflow-meeting-summary

会议纪要整理工作流:汇总指定时间范围内的会议纪要并生成结构化报告。当用户需要整理会议纪要、生成会议周报、回顾一段时间内的会议内容时使用。.

DropFan/claude-code-plugins · 55 tokens