agentleFS
gaofeng21cngaofeng21cn/opl-skills/skills/apple-mail/SKILL.md

apple-mail

Skill0 starsChanged 6 days agoApache-2.0View on GitHub

Use only for Apple Mail or Mail.app tasks on macOS, including listing accounts and mailboxes, inspecting or searching messages, and reading, marking, archiving, moving, or deleting mail. Do not use for other Apple native apps, webmail, IMAP-only work, or generic macOS automation.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use this skill for webmail sites opened in a browser.

    line 19
  2. Very specific:

    After move or archive, Mail may assign a new internal numeric id.

    line 61
  3. Distinctive:

    Default to read-only exploration first.

    line 65
  4. Very specific:

    Before destructive actions (move, archive, delete), identify the exact target messages from recent or search.

    line 66
  5. Very specific:

    Prefer mailboxPath over mailbox when a folder name could be ambiguous.

    line 67

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Apple Mail

Overview

This skill is the macOS Mail.app entry point. It implements mail.* automation with JSON output designed for agent workflows.

When to Use

  • User asks to manage Apple Mail on this Mac
  • User wants to inspect inboxes, triage messages, archive clutter, or move mail between folders
  • User specifically wants local Mail.app behavior, not Gmail web UI or IMAP libraries

Do not use this skill for webmail sites opened in a browser.

Command Surface

The helper lives next to this skill at scripts/apple_apps.py.

Read-only commands:

python3 scripts/apple_apps.py mail accounts
python3 scripts/apple_apps.py mail mailboxes --account "iCloud"
python3 scripts/apple_apps.py mail recent --account "SYSU" --limit 1 --include-read
python3 scripts/apple_apps.py mail triage-meta --account "SYSU" --mailbox-path "INBOX" --limit 5 --include-read --on-date "2026-03-18"
python3 scripts/apple_apps.py mail search --account "SYSU" --query "invoice" --limit 20
python3 scripts/apple_apps.py mail search --account "SYSU" --query "Beta view" --limit 10 --include-read --include-body
python3 scripts/apple_apps.py mail read --id 141819 --account "SYSU" --mailbox-path "INBOX"

Mutation commands:

python3 scripts/apple_apps.py mail mark --id 141819 --account "SYSU" --mailbox-path "INBOX" --read true
python3 scripts/apple_apps.py mail move --id 141819 --account "SYSU" --mailbox-path "INBOX" --to-mailbox "Archive"
python3 scripts/apple_apps.py mail archive --id 141819 --account "SYSU" --mailbox-path "INBOX"
python3 scripts/apple_apps.py mail delete --id 141819 --account "SYSU" --mailbox-path "INBOX"

Workflow

  1. For daily inbox triage, start with triage-meta.
  2. For point lookups and thread recovery, use search.
  3. For one-message inspection, use recent.
  4. Capture the returned id, account, and mailboxPath.
  5. Pass those exact values into read, mark, move, archive, or delete.

Current Limits

  • The fastest path for daily message triage is triage-meta, which reads lightweight metadata from headers without loading message bodies.
  • search now prefers lightweight thread-aware matching when --include-body is not set. It can use subject, sender, recipients, message ids, and reply-chain headers to return both direct hits and nearby thread context.
  • search --include-body now uses a two-stage path: lightweight recall first, then body reads for only a small candidate set. This is much more practical for recent-thread recovery, but it is still not a full-mailbox text index.
  • recent is still useful for quick one-message inspection, especially recent --account ... --limit 1 --include-read.
  • read, mark, move, archive, and delete are verified for top-level mailbox paths such as INBOX and Archive.
  • After move or archive, Mail may assign a new internal numeric id; refresh it with another recent or read before the next mutation.

Safety Rules

  • Default to read-only exploration first.
  • Before destructive actions (move, archive, delete), identify the exact target messages from recent or search.
  • Prefer mailboxPath over mailbox when a folder name could be ambiguous.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.