apple-mail-search
Installation
SKILL.md
Apple Mail Search
Search Apple Mail.app emails instantly via SQLite. ~50ms vs 8+ minutes with AppleScript.
Why This Exists
Apple Mail's AppleScript bridge enumerates every message object in memory before doing anything. At 100K+ emails, it just hangs — indefinitely. This has been broken for years and Apple hasn't fixed it.
| Method | Time for 110K emails |
|---|---|
| AppleScript iteration | Hangs forever |
| Spotlight/mdfind | Broken since Big Sur (emlx importer removed) |
| SQLite (this tool) | ~50ms |
Setup
Follow the instructions in references/install.md to install the mail-search script to your PATH. The script source is embedded there for portability.
Requires Full Disk Access for Terminal/shell to read ~/Library/Mail/.