Agent skill

Apple Mail

by mitsuhiko in mitsuhiko/agent-stuff

Search, read, and extract attachments from Apple Mail's local storage.

Apache-2.0Auto-check passed

Install Apple Mail

skills CLI
$ npx skills add mitsuhiko/agent-stuff --skill apple-mail -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mitsuhiko/agent-stuff apple-mail --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mitsuhiko/agent-stuff.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/apple-mail .claude/skills/apple-mail && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apple-mail
GitHub stars
3.2k
Token cost
~669 tokens
SKILL.md length
209 words
Files
2
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

Search, read, and extract attachments from Apple Mail's local storage.

  • SKILL.md covers Tool, Quick Reference, Search Options and Output Format, plus 1 more section
  • Runs Shell scripts from its folder

What it does

Apple Mail is an agent skill from mitsuhiko/agent-stuff. Search, read, and extract attachments from Apple Mail's local storage. Query emails by sender, recipient, subject, body, date, mailbox, and flags. Read raw RFC822 messages and extract file attachments.

Its SKILL.md is about 670 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `apple-mail.sh`).

The repository describes itself as: These are commands I use with agents, mostly Claude. The licence is Apache-2.0.

Example prompts

  • “/apple-mail”

Requirements

  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit 0865c84. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Apple Mail loads about 669 tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 209 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~669

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mitsuhiko/agent-stuff at commit 0865c84, republished under its Apache-2.0 licence (© mitsuhiko). 209 words, ~669 tokens.

Download SKILL.mdSave it as .claude/skills/apple-mail/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
apple-mail
description
Search, read, and extract attachments from Apple Mail's local storage. Query emails by sender, recipient, subject, body, date, mailbox, and flags. Read raw RFC822 messages and extract file attachments.

Apple Mail Skill

Search, read, and extract attachments from Apple Mail's local storage on macOS.

Tool

apple-mail.sh — a bash script that queries the Apple Mail SQLite envelope index and reads .emlx files from disk. Read-only — it never modifies mail data.

Quick Reference

bash
TOOL=~/Development/agent-stuff/skills/apple-mail/apple-mail.sh

# Search emails
$TOOL search --from "peter@" --subject "dinner" --limit 5
$TOOL search --after 2026-02-01 --has-attachment
$TOOL search --body "invoice" --mailbox "INBOX" --unread
$TOOL search --to "armin@" --before 2025-12-31

# Show message metadata, recipients, attachments, and summary
$TOOL info 783660

# Read the raw RFC822 email (headers + body)
$TOOL read 783660

# Extract attachments to a temp directory (prints the path)
$TOOL attachment 783660                          # all attachments
$TOOL attachment 783660 "Rechnung.pdf"           # specific file

# List all mailboxes with counts
$TOOL mailboxes

Search Options

FlagDescription
--from <addr>Sender address substring
--to <addr>Recipient address substring
--subject <text>Subject substring
--body <text>Body/summary text substring
--mailbox <name>Mailbox URL substring (e.g. INBOX, Sent, Trash)
--after <YYYY-MM-DD>Received after date
--before <YYYY-MM-DD>Received before date
--unreadOnly unread messages
--flaggedOnly flagged messages
--has-attachmentOnly messages with attachments
--limit <n>Max results (default: 20)

Output Format

  • search returns pipe-delimited table with header row: id|sender|sender_name|subject|received|status|flagged|mailbox|attachments
  • info returns structured metadata sections
  • read outputs raw RFC822 email to stdout
  • attachment prints the temp directory path to stdout, file listing to stderr

Notes

  • Message IDs are Apple Mail internal ROWIDs (integers), shown in the id column
  • .partial.emlx files contain headers only (body not downloaded); read warns about this
  • Attachments are copied to a temp directory under /tmp/; clean up when done
  • The body search queries the summaries table (Apple Mail's plaintext preview), not the full email body
  • Mailbox URLs are percent-encoded (e.g., %5BGmail%5D = [Gmail], %20 = space)
  • Deleted messages are excluded from search by default

© mitsuhiko, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/apple-mail of mitsuhiko/agent-stuff.

  • SKILL.md
  • apple-mail.sh

Open the folder on GitHubat commit 0865c84

Compare with similar skills

Apple Mail next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apple Mail compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apple Mail this skillmitsuhiko/agent-stuff3.2k—~669Automated safety check: PassApache-2.0
Apple Mailsundial-org/awesome-openclaw-skills663—~1.5kAutomated safety check: PassNone
Extractalirezarezvani/claude-skills28k—~1.4kAutomated safety check: PassMIT
Apple Remindersopenclaw/openclaw392k1 repos~760Automated safety check: PassMIT
Gh Attachsickn33/agentic-awesome-skills47k1 repos~1.6kAutomated safety check: PassMIT
Brand Extractnexu-io/open-design100k—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Apple Mail

    sundial-org/awesome-openclaw-skills

    Apple Mail.app integration for macOS. An agent skill from sundial-org/awesome-openclaw-skills.

    663 GitHub stars~1.5k tokensUpdated 7 mo ago
    Productivity & AutomationAuto-check passed
  • Extract

    alirezarezvani/claude-skills

    Turn a proven pattern or debugging solution into a standalone reusable skill with SKILL.md, reference docs, and examples.

    28k GitHub stars~1.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Apple Reminders

    openclaw/openclaw

    List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

    392k GitHub starsUsed in 1 repo~760 tokens
    Productivity & AutomationAuto-check passed
  • Gh Attach

    sickn33/agentic-awesome-skills

    Upload and download GitHub user-attachments (screenshots, PDFs, zips, videos) from the terminal; use when asked to attach or embed a file in a PR, issue, or comment, or download an attachment URL.

    47k GitHub starsUsed in 1 repo~1.6k tokens
    Documents & OfficeAuto-check passed
  • Brand Extract

    nexu-io/open-design

    Extract a complete Brand Kit from a live website by driving the in-app browser.

    100k GitHub stars~3.1k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Apple Container

    sickn33/agentic-awesome-skills

    Build, run, and manage OCI/Linux containers as lightweight per-container VMs on Apple-silicon macOS using Apple's open-source container CLI, no Docker daemon required.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    DevOps & CloudAuto-check passed

More from mitsuhiko/agent-stuff

All 16 skills in this repo
  • Anachb

    mitsuhiko/agent-stuff

    Austrian public transport (VOR AnachB) for all of Austria. An agent skill from mitsuhiko/agent-stuff.

    3.2k GitHub starsUsed in 2 repos~1.2k tokens
    Auto-check passed
  • Librarian

    mitsuhiko/agent-stuff

    Cache and refresh remote git repositories under ~/.cache/checkouts/<host/<org/<repo so future references can reuse a local copy.

    3.2k GitHub starsUsed in 1 repo~519 tokens
    Auto-check passed
  • Web Browser

    mitsuhiko/agent-stuff

    Automate and interact with web pages through Chrome or Chromium using the Chrome DevTools Protocol (CDP): navigate, click, fill forms, inspect content, take screenshots, and debug console or network…

    3.2k GitHub stars~1.5k tokensUpdated 11 days ago
    Auto-check: warnings
  • Google Workspace

    mitsuhiko/agent-stuff

    Access Google Workspace APIs (Drive, Docs, Calendar, Gmail, Sheets, Slides, Chat, People) via local helper scripts without MCP.

    3.2k GitHub stars~919 tokensUpdated 11 days ago
    Auto-check passed
  • Oebb Scotty

    mitsuhiko/agent-stuff

    Austrian rail travel planner (ÖBB Scotty). An agent skill from mitsuhiko/agent-stuff.

    3.2k GitHub stars~2.4k tokensUpdated 11 days ago
    Auto-check passed
  • Sentry

    mitsuhiko/agent-stuff

    Fetch and analyze Sentry issues, events, transactions, and logs.

    3.2k GitHub stars~1.8k tokensUpdated 11 days ago
    Auto-check passed

Questions about Apple Mail

What does Apple Mail do?

Search, read, and extract attachments from Apple Mail's local storage. Apple Mail is an agent skill from mitsuhiko/agent-stuff. Search, read, and extract attachments from Apple Mail's local storage.

How do I install Apple Mail in Claude Code?

Run `npx skills add mitsuhiko/agent-stuff --skill apple-mail -a claude-code`. Or copy the skill folder (skills/apple-mail in mitsuhiko/agent-stuff) into .claude/skills/apple-mail in your project. Claude Code loads it when a task matches its description.

How do I install Apple Mail in Codex?

Run `npx skills add mitsuhiko/agent-stuff --skill apple-mail -a codex`. Or copy the skill folder (skills/apple-mail in mitsuhiko/agent-stuff) into .agents/skills/apple-mail in your project. Codex loads it when a task matches its description.

Can I use Apple Mail in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mitsuhiko/agent-stuff --skill apple-mail -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apple-mail, .gemini/skills/apple-mail, .github/skills/apple-mail and .opencode/skills/apple-mail in your project.

What does Apple Mail need to run?

Going by SKILL.md and its folder, Apple Mail needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does Apple Mail access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Apple Mail safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Apple Mail use?

Apple Mail is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apple Mail use?

About 669 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Apple Mail?

Skills that share tags, products or a category with Apple Mail: Apple Mail (sundial-org/awesome-openclaw-skills, 663 stars), Extract (alirezarezvani/claude-skills, 28k stars), Apple Reminders (openclaw/openclaw, 392k stars) and Gh Attach (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apple Mail?

mitsuhiko (a GitHub user) maintains it in mitsuhiko/agent-stuff, which has 3,179 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 27, 2026.

Source: mitsuhiko/agent-stuff on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.