agentleFS
jonathanmalkinjonathanmalkin/jules/.claude/skills/send-email/SKILL.md

send-email

Skill65 starsChanged 7 months agoMITView on GitHub

Send email to [Your Name] via Resend API. Use when user says "email me", "send me an email", "send to my inbox", "email this to me", "send this to my email", or wants something delivered to email. Locked to [Your Name]'s gmail. NOT for Slack messages, DMs, or any other messaging. Do NOT use for "message me", "DM me", or "send to Slack".

  • Reads credentials

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use aeon-update, auto-workflow and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • aaronjmarsSkill

    aeon-update

    Pull framework updates from the upstream Aeon repo into this instance - 3-way merges canon's new commits into a PR, never clobbering operator config.

    Also in 4 projects that use this

  • aaronjmarsSkill

    auto-workflow

    Two-mode aeon.yml workflow builder - analyze inspects URLs and emits a tiered, signal-verified skill-enablement plan plus an aeon.yml diff; enable flips slugs to enabled:true and opens a PR.

    Also in 4 projects that use this

  • +10 more from aaronjmars

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before sending, check how many emails have been sent today:

    line 60
  2. Distinctive:

    If at 3/3, inform the user the limit is hit and suggest Slack as an alternative.

    line 68
  3. Very specific:

    Markdown content: Write clean markdown. build-digest-email.sh handles conversion.

    line 73
  4. Distinctive:

    Length: No hard limit, but emails should be scannable.

    line 74
  5. Distinctive:

    No manual key handling needed.

    line 89
  6. Very specific:

    Every send (success or failure) is logged to ~/.claude/email-send-log.jsonl.

    line 93

“Common” is measured: kept by at least 6 in 10 of the 23 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

Critical Constraints

  • Recipient is hardcoded. [your-email]. Cannot be changed. Cannot email anyone else.
  • Rate limit: 3 emails per calendar day. Exit code 2 = rate limit hit. Do not retry.
  • From address: Jules <playbook@[previous-domain]> (verified Resend sender, still active post-rebrand).

Sending Email

Two paths: HTML (rich formatting via markdown pipeline) and plain text (quick notifications).

HTML email (structured content, reports, summaries)

Pipe markdown through build-digest-email.sh into jules-send-email.sh:

echo "## Summary\n\n- Point one\n- Point two\n\n**Key takeaway:** Thing." \
  | bash .claude/scripts/build-digest-email.sh "Report Title" \
  | bash .claude/scripts/jules-send-email.sh --subject "Subject Line" --html -

build-digest-email.sh converts markdown to branded HTML with the caramel/cream template. Pass the report title as the first argument (appears in the header bar). Reads markdown from stdin, outputs HTML to stdout.

Plain text email (quick notes, reminders, notifications)

bash .claude/scripts/jules-send-email.sh --subject "Reminder" --body "Follow up with Michael from AITX this week."

HTML from a file

bash .claude/scripts/jules-send-email.sh --subject "Subject" --html /path/to/body.html

Dry run (preview without sending)

bash .claude/scripts/jules-send-email.sh --subject "Test" --body "anything" --dry-run

Shows recipient, from address, subject, and today's send count. Does not consume a send.

When to Use HTML vs Plain Text

ContentPath
Session notes, briefings, reports, summariesHTML (markdown pipeline)
Simple reminders, quick notifications, one-linersPlain text (--body)
Anything with headers, lists, tables, or code blocksHTML (markdown pipeline)

Rate Limit Check

Before sending, check how many emails have been sent today:

grep -c "\"date\":\"$(date +%Y-%m-%d)\"" ~/.claude/email-send-log.jsonl 2>/dev/null || echo 0

Report to user: "X/3 emails sent today."

If at 3/3, inform the user the limit is hit and suggest Slack as an alternative.

Composing Guidance

  • Subject lines: Specific and scannable. "Session Notes: Quiz Migration" not "Update". [Your Name] filters by subject.
  • Markdown content: Write clean markdown. build-digest-email.sh handles conversion. Tables, code blocks, headers, lists all work.
  • Length: No hard limit, but emails should be scannable. Use headers to break up long content.
  • When writing raw HTML (not using the markdown pipeline): consult references/html-best-practices.md for email client CSS constraints.

Error Handling

Exit CodeMeaningAction
0Sent successfullyReport the email ID and today's count
1Missing args, API key not found, or HTTP errorCheck the error message. API key: container has RESEND_API_KEY in env; Mac uses 1Password (op://Dev Secrets/Quiz App - All Env/RESEND_API_KEY)
2Daily rate limit (3/day) reachedInform user. Suggest Slack. Do not retry.

API Key Resolution

The send script uses RESEND_API_KEY from the environment. The overnight batch injects it via op read at startup. For manual runs, the service account token in the shell environment handles it automatically.

No manual key handling needed.

Send Log

Every send (success or failure) is logged to ~/.claude/email-send-log.jsonl. Each entry includes date, time, subject, HTTP status, and today's count. This is the rate limiter's data source.

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.