Agent skill · data analytics · sundial-org

apple-mail-search-2

Fast Apple Mail search via SQLite on macOS. Search emails by subject, sender, date, attachments - results in ~50ms vs 8+ minutes with AppleScript. Use when asked to find, search, or list emails.

Why this skill is useful

Adds a fast SQLite-based search tool for Apple Mail that significantly reduces search time compared to existing methods.

What it needs

Requires sqlite3 installed locally. About 2k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.

What this skill does

Apple Mail Search Search Apple Mail.app emails instantly via SQLite. ~50ms vs 8+ minutes with AppleScript. Installation Usage Options Examples Why This Exists Method Time for 130k emails -------- --------------------- AppleScript iteration 8+ minutes Spotlight/mdfind Broken since Big Sur SQLite (this tool) ~50ms Apple removed the emlx Spotlight importer in macOS Big Sur. This tool queries the Envelope Index SQLite database directly. Technical Details Database: ~/Library/Mail/V{9,10,11}/MailData/Envelope Index Key tables: messages - Email metadata (dates, flags, FKs) subjects - Subject lines addresses - Email addresses and display names recipients - TO/CC mappings attachments - Attachment filenames Limitations: Read-only (cannot compose/send) Metadata only (bodies in .emlx files) Mail.app only (not Outlook, etc.) Advanced: Raw SQL For custom queries, use sqlite3 directly: License MIT

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills sundial-org/apple-mail-search-2

View the source on GitHub

Browse the @skills marketplace