apple-mail-mcp: Skill for Claude Code

.claude/skills/performance-patterns/SKILL.md

performance-patterns is a skill for Claude Code from TG-Techie/apple-mail-mcp. It costs 57 tokens per session (2,950 once invoked), scanned A, a copy of performance-patterns, MIT.

A guide to making Apple Mail automation faster by reducing the number of separate AppleScript processes and filtering messages inside Mail.app. AppleScript is macOS’s scripting language for controlling apps.

In plain words
What is it for?
It is for optimizing Apple Mail MCP operations, diagnosing slow searches, adding filters, and choosing batch operations for reading or changing many messages.
Why use it?
It helps avoid delays caused by starting many scripts or fetching large mailboxes before filtering them.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is TG-Techie/apple-mail-mcp's own configuration. It tells Claude Code how to work on apple-mail-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything apple-mail-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TG-Techie/apple-mail-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TG-Techie/apple-mail-mcp/main/.claude/skills/performance-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/TG-Techie/apple-mail-mcp

Made for: Claude Code.

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 performance-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/tg-techie/apple-mail-mcp/performance-patterns/github.svg)](https://agentmods.dev/skills/tg-techie/apple-mail-mcp/performance-patterns)
Your own site
<a href="https://agentmods.dev/skills/tg-techie/apple-mail-mcp/performance-patterns"><img src="https://agentmods.dev/badge/skills/tg-techie/apple-mail-mcp/performance-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/tg-techie/apple-mail-mcp/performance-patterns"><img src="https://agentmods.dev/badge/skills/tg-techie/apple-mail-mcp/performance-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,950 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.00057 $0.02950
Opus 5.5 $0.00023 $0.01180
Sonnet 5.5 $0.00011 $0.00590
Haiku 4.5 $0.00006 $0.00295

Measured 7d ago against content hash 9dfd9cb97e06, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-patterns 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 7d ago.

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.

Origin

This is a copy

100% identical to performance-patterns — 98 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/performance-patterns/SKILL.md · 136 lines

How it starts

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

Apple Mail MCP Performance Patterns

The Core Insight

Two costs dominate: the subprocess and the Apple event. Each osascript call costs 100-300ms regardless of what it does, so work is batched into one script. Inside a script, each Apple event to Mail costs about 15 ms (measured 2026-09-27), so a script that reads one property of one message at a time spends 15 ms per property per message. Mail answers a property for many messages in one event; see "Reading many messages at once".

Known Operation Timings

Operation Time Notes
Single osascript call overhead 100-300ms Minimum cost per subprocess
One Apple event inside a script ~15 ms e.g. subject of msg; 813 ms for 50 messages read one at a time
search_messages, AppleScript path ~1 s for 50 rows, ~0.5 s for 10, ~0.3 s for a subject filter matching nothing; ~1.5 s for a text filter that read a day's bodies for 20 rows, when no body was slow Test account's INBOX, 2026-09-27; see "How the search reads"
get_message (single) <1s Direct ID lookup
draft_send ~1-2s, plus a draft read and removal The ~1-2s is Mail.app compose + send; reading the draft first and removing it after are further osascript calls
update_message (bulk read/flag) ~1-2s Single script for N messages via bulk_repeat_block
update_message (move) ~1-3s Varies by account type (Gmail slower)
save_attachments ~2-5s Depends on attachment count/size

Reading many messages at once

Measured 2026-09-27 on the test account (iCloud), read-only, timed inside the script with NSDate. How these scale on mailboxes much larger than the test account's is not measured.

Read Cost
subject of messages of mb (every message, one event) 16-26 ms for the whole INBOX
sender / date received of every message ~25-32 ms
read status / flagged status of every message ~15 ms
message id of every message ~0.13 ms a message
properties of to recipients of messages of mb ~0.3-0.4 ms a message
mail attachments of messages of mb ~0.68 ms a message
subject of messages a thru b of mb (a range) ~10 ms + 1.3 ms a message: 70 ms for 50, 250-285 ms for 200, 512 ms for 400
subject of <a list of message references> refused, error -1728: AppleScript does not distribute a property over a list
a reference to («class mssg» id X of mb) no event (0.07 ms); set r to «class mssg» id X of mb costs one (~16 ms)
content of messages a thru b of mb what each message's body costs, plus ~11 ms an event less than reading them one at a time; see below

Read the full file on GitHub · 136 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. 7d ago Changed · -4 lines 9dfd9cb97e06
  2. 29d ago Changed · +54 lines · +7 tokens per session 2871a84a0d11
  3. 1mo ago First seen · 86 lines · 50 tokens per session scan A 650c24f6ed8f

Subscribe to this mod's changes

performance-patterns is a skill published in the GitHub repository TG-Techie/apple-mail-mcp (0 stars, last pushed 7d ago), licensed MIT. It adds 57 tokens to every session and 2,950 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to performance-patterns, differing in 98 lines, and is treated as a copy.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens