Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/dineshdb/pie/apple-mailnpx skills add dineshdb/pie --skill apple-mailgit clone --depth 1 https://github.com/dineshdb/pieWrote 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/dineshdb/pie/apple-mail)<a href="https://agentmods.dev/skills/dineshdb/pie/apple-mail"><img src="https://agentmods.dev/badge/skills/dineshdb/pie/apple-mail.svg" alt="Measured on agentmods" 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 | $0.00020 | $0.00432 |
| Opus 5 | $0.00010 | $0.00216 |
| Sonnet 5 | $0.00004 | $0.00086 |
| Haiku 4.5 | $0.00002 | $0.00043 |
Grade A, and why
apple-mail 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 4d 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.
What it actually says
Apple Mail
Search, read, and send emails through Apple Mail via osascript IPC. Routes through Mail.app's own process — no Full Disk Access needed.
Use --md for markdown rendering.
Usage
mail.py <command> [options] --md
search
mail.py search --from "newsletter@" --limit 10
mail.py search --mailbox "INBOX" --unread
mail.py search --subject "weekly" --after 2026-01-01
Flags: --from, --subject, --mailbox, --after, --before,
--unread, --flagged, --limit N
Output: pipe-delimited id|sender|subject|date
read
mail.py read <message_id>
Message ID is the Apple Mail message id string from search output.
send
mail.py send --to "[email protected]" --subject "Hello" --body "..."
mail.py send --to "[email protected]" --subject "Hello" --body-file body.txt
echo "body" | mail.py send --to "[email protected]" --subject "Hello"
accounts
mail.py accounts
Lists configured Mail accounts (name, type, emails).
perm
mail.py perm
Opens System Settings → Privacy & Security → Full Disk Access. (Not required for osascript commands, only for any SQLite-based tools.)
Notes
- Search only scans the specified mailbox (default: INBOX)
- Message IDs are Apple Mail
message idstrings (not ROWIDs) --fromand--subjectare substring filters applied in AppleScript- Mail.app must be running or launchable
- No TCC prompts — uses Apple Events IPC, not direct file access
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 72 lines · 20 tokens per session scan A b9281f319786
apple-mail is a skill published in the GitHub repository dineshdb/pie (2 stars, last pushed 3mo ago), licensed MIT. It adds 20 tokens to every session and 432 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
release
Create a new versioned release with changelog. Bumps version in code, updates CHANGELOG.md, commits, tags, and pushes using the repository release flow. GitHub Actions creates the release and uses only the current changelog section as release notes. Use when the user says "release", "cut a release", "bump version"…
qa
Regression test a San feature by name. Looks for a feature doc in docs/reference/ or docs/packages/2-feature/, runs automated Go tests and interactive tmux tests, then produces a pass/fail report. Use this skill when the user says "qa", "regression test", "test feature X", "verify feature", or references a feature…
openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
pi-sync
Daily upstream-sync job for the pi Go port — fetch upstream pi, triage every change since the recorded pin, port what's in scope, verify idiomatic + parity via independent reviews, update the ledger, and push. Use for "sync with upstream", "porting job", or as the scheduled daily run.
proactive-agent
Transform AI agents from task-followers into proactive partners that anticipate needs and continuously improve. Now with WAL Protocol, Working Buffer, Autonomous Crons, and battle-tested patterns. Part of the Hal Stack 🦞.
openspec-apply-change
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.