send-email
Compose and send a one-off email to a named recipient via Resend - written in the operator's voice, then sent in-run through the shared send caps with an operator audit copy
git clone --depth 1 https://github.com/aeonfun/aeon /tmp/send-email && cp -r /tmp/send-email/skills/send-email ~/.claude/skills/send-emailSKILL.md
> **${var}** — who to email and why, e.g. `to=jane@acme.com | subject=Intro | about=propose a 20-min call on X`. Freeform also works ("email jane@acme.com to follow up on yesterday's demo"). `cc=` is optional. The reply-shape `revise:<instruction>` (Telegram force-reply, e.g. `revise:make it warmer`) refines the **last composed draft for review only — it never sends**.
Read `soul/` (for voice) and `memory/MEMORY.md` (for context) before composing.
## What this does
Composes a single, purposeful email and sends it **in-run** via Resend (`./secretcurl`), gated by the shared send caps + kill-switch and logged to the shared ledger `memory/email-log.json`. The send is irreversible, so it's the skill's **final** action, behind a set of fail-closed checks (see "Send (in-run)" below): a skipped or failed check means *do not send*, never *send anyway*. This is the general-purpose sibling of `disclosure-emailer` (vuln-scanner Arm C) — same caps + audit CC, any recipient and purpose instead of only vuln maintainers.
This is **not** a bulk or cold-outreach tool. One deliberate recipient per run, with a genuine reason to write. If the request reads as mass-mailing, list-blasting, or spam, refuse and log `SEND_EMAIL_REFUSED: not a 1:1 purposeful email`.
## Steps
### Revise intercept (Telegram force-reply — re-stage for review only, NEVER auto-send)
**Before anything else**, if `${var}` starts with `revise:`, the operator replied to a "refine this email?" prompt. Handle it here and **end the run** — the normal compose/send flow below does NOT run, and **nothing is ever sent**:
1. **Strip the prefix.** The instruction is `${var#revise:}` (keep any inner colons), e.g. `make it warmer`, `shorten to 3 lines`, `drop the meeting ask`.
2. **Load the last draft** from `memory/drafts/send-email-latest.md` (the review copy the normal run saves in step 4). If it's missing or empty, there's nothing to refine: send `./notify "Nothing to revise yet — compose an email first, then reply here to refine it."` and end the run.
3. **Regenerate** the email applying the instruction — re-read `soul/` for voice; keep the same recipient / cc / subject unless the instruction changes them; keep the body as the exact send-ready text (operator-only notes stay out).
4. **Re-stage for REVIEW ONLY.** Overwrite `memory/drafts/send-email-latest.md` with the revised draft. **Do NOT run the Send step.** A `revise:` reply never sends — the operator confirms a real send by invoking send-email normally (which re-composes and sends in-run).
5. **Notify** the operator with the full revised draft for review — multi-line ⇒ `./notify -f <file>`:
```
revised draft (not sent) → <to>: <subject>
<body>
```
6. **Re-offer** a further revision (the operator is iterating — skip the daily dedup guard here):
```bash
./notify "Want another pass? Reply with a change and I'll revise the draft again (still won't send)." \
--force-reply --placeholder "e.g. make it warmer" \
--context "send-email::revise"
```
7. **Log** `- SEND_EMAIL_REVISED (draft re-staged for review, not sent)` under a `### send-email` heading in `memory/logs/${today}.md`, then **end the run**.
Otherwise (no `revise:` prefix), run the normal flow:
1. **Parse the request** from `${var}`: `to` (required — one valid email address), optional `cc`, optional `subject`, and the `about` (the goal / what to say). If `to` or the purpose is missing, check `memory/outreach.md` for a queued request; if still nothing, log `SEND_EMAIL_SKIP: no recipient/purpose` and stop.
2. **Sanity-check the recipient.** A single, plausible, individual address with a real reason to be contacted. Refuse scraped addresses, list blasts, or anything spam-shaped → `SEND_EMAIL_REFUSED`.
3. **Compose the email** — plain text, in the operator's voice (`soul/SOUL.md` + `soul/STYLE.md`; neutral tone if soul is empty). Short, specific, one clear ask or message; add a subject if none was given. The body is exactly what gets sent — keep any reasoning or operator-only notes OUT of it (those live only in the log).
4. **Save a review copy** of the composed email (human-readable: to / cc / subject / body) to `memory/drafts/send-email-latest.md` (overwrite; `mkdir -p memory/drafts`). This is the stable path a later `revise:` reply reloads — it is **not** the send path, so a revision refines this copy and never re-sends. Set `SLUG` = recipient-local-part + a short subject hash (the ledger dedup + idempotency key).
### Send (in-run)
The send is the skill's **final** action and is **fail-closed**: apply every check below in order, and any check that fails, is unset, or errors ⇒ **do not send** — log the reason and stop. Never fall through to sending. Only `./secretcurl`, `jq`, `python3`, `grep`, `date`, `echo`, and `Write` are available; no `mv`/`awk`/`sha256sum`.
1. **Kill-switch.** If `$DISCLOSURE_EMAIL_PAUSED` is one of `1/true/yes/on` → `SEND_EMAIL_SKIP: paused`, stop.
2. **Config.** Presence-check with the `${VAR:+x}` form — a **bare** `$RESEND_API_KEY` trips the secret-expansion analyzer and falsely reads as unset (same idiom `narrative-tracker` documents). If either is unset → `SEND_EMAIL_SKIP: resend not configured`, stop (nothing sent, nothing lost):
```bash
{ [ -n "${RESEND_API_KEY:+x}" ] && [ -n "${RESEND_FROM:+x}" ]; } || { echo "SEND_EMAIL_SKIP: resend not configured"; exit 0; }
```
3. **Ledger + daily cap.** Seed `memory/email-log.json` to `[]` if missing/corrupt, then stop if the count is unreadable (**fail closed**) or today's budget is spent (cap default 1):
```bash
TODAY=$(date -u +%F)
SENT_TODAY=$(jq --arg d "$TODAY" '[.[]|select((.sent_at//"")|startswith($d))]|length' memory/email-log.json 2>/dev/null)
case "$SENT_TODAY" in ''|*[!0-9]*) echo "SEND_EMAIL_SKIP: ledger unreadable"; exit 0;; esac
[ "$SENT_TODAY" -lt "${DISCLOSURE_EMAIL_DAILY_CAP:-1}" ] || { echo "SEND_EMAIL_SKIP: daily cap"; exit 0; }
```
4. **Dedup.** Stop unless the ledger check *cleSet up and run an Aeon agent instance — get started from scratch, pick which skills to turn on or install more from packs, reschedule or change what runs, edit what an existing skill does, fix a skill that isn't firing, set the STRATEGY.md north star and soul/ voice, turn a coding-agent chat into a scheduled Aeon skill, and mine past coding-agent conversations for recurring work worth automating as a skill. Use when the user mentions Aeon, aeon.yml, an Aeon skill / instance / routine / pack, asks to schedule, enable, edit, or debug an agent that runs on a cron, or asks what of their repeated/manual work Aeon could take over.
Mention/keyword sweep on social platforms for [REPLACE: KEYWORDS] — trends, sentiment, top posts
5 concrete real-life actions, leverage-scored against open loops with specificity and anti-fluff gates
Static config-correctness linter for this instance - catches the silent-failure class (unquoted schedules, duplicate keys, unconfigured skills, mode typos, broken requires/MCP refs) that no run-based health skill can see. Notifies only on problems.
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.
Write a publication-ready article in one of three angles - a trending long-form piece, a watched-repo thesis, or a project-through-a-lens essay. Optional Replicate hero image with --visual.
Automatically merge open PRs that have passing CI, no blocking reviews, and no conflicts
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.