agentleFS
IvanCamposIvanCampos/agents/skills/mailapp-send-email/SKILL.md

mailapp-send-email

Skill5 starsChanged 9 months agoMITView on GitHub

Send emails through the macOS Mail app using AppleScript. Use when a task requires composing or sending email via Mail.app (including to/cc/bcc, subject, body, or attachments), or when the user asks for Mail app automation or osascript-based email sending.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the bundled AppleScript to compose and optionally send Mail.app messages with structured inputs (to/cc/bcc/subject/body/attachments).

    line 9
  2. Very specific:

    Run the AppleScript via osascript with --to, --subject, and --body.

    line 12
  3. Very specific:

    Use these flags. Only --to, --subject, and --body are required.

    line 22
  4. Distinctive:

    Create a new outgoing message in Mail.app.

    line 32
  5. Very specific:

    If --attach is provided, add each file path as an attachment.

    line 34
  6. Distinctive:

    If Mail.app automation prompts appear, grant permissions in System Settings -> Privacy & Security -> Automation.

    line 37
  7. Distinctive:

    If attachments fail, ensure paths are absolute POSIX paths and the files exist.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Mail.app Send Email

Overview

Use the bundled AppleScript to compose and optionally send Mail.app messages with structured inputs (to/cc/bcc/subject/body/attachments).

Quick Start

Run the AppleScript via osascript with --to, --subject, and --body. Pass comma-separated lists for multiple recipients or attachments.

osascript /Users/ivancampos/.codex/skills/mailapp-send-email/scripts/send_mail.applescript \
  --to "test@test.com" \
  --subject "hello" \
  --body "testing"

Inputs

Use these flags. Only --to, --subject, and --body are required.

  • --to single email or comma-separated list
  • --cc optional comma-separated list
  • --bcc optional comma-separated list
  • --subject subject line
  • --body message body
  • --attach optional comma-separated POSIX file paths
  • --send optional true|false (default true, send immediately)

Behavior

  • Create a new outgoing message in Mail.app.
  • By default send immediately. If --send false, leave the draft visible for review.
  • If --attach is provided, add each file path as an attachment.

Troubleshooting

  • If Mail.app automation prompts appear, grant permissions in System Settings -> Privacy & Security -> Automation.
  • If attachments fail, ensure paths are absolute POSIX paths and the files exist.

Resources

scripts/

  • scripts/send_mail.applescript Create a Mail.app message with optional cc/bcc/attachments and optional immediate send.

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.