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.
curl -O https://raw.githubusercontent.com/TG-Techie/apple-mail-mcp/main/.claude/skills/performance-patterns/SKILL.mdgit clone --depth 1 https://github.com/TG-Techie/apple-mail-mcpWrote 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.
[](https://agentmods.dev/skills/tg-techie/apple-mail-mcp/performance-patterns)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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 |
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.
- 7d ago Changed · -4 lines 9dfd9cb97e06
- 29d ago Changed · +54 lines · +7 tokens per session 2871a84a0d11
- 1mo ago First seen · 86 lines · 50 tokens per session scan A 650c24f6ed8f
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.
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…
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
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…
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.
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…
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…