skills/email-drafter/SKILL.md
Fetch unread emails, triage them, draft replies in the user's voice, and save as Gmail drafts for human review
npx skillsauth add sofer/.agents email-drafterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Process the user's unread emails into draft replies written in their voice. The twin fetches emails, filters out those that do not need a response, drafts replies using the user's voice profile and business knowledge (including Notion), and saves each draft to Gmail. Drafts are never sent -- the user reviews and sends them manually.
Before starting the steps below:
~/.agents/config/voice-profile.yaml for voice and tone rules.yaml files in ~/.agents/config/business-context/ for domain knowledgeSkill: gmail-fetch
Input: Query is:unread (or a user-provided query), max_results 20 (or user-provided), include_threads true
Output → emails
Read and follow the instructions in ~/.agents/skills/gmail-fetch/SKILL.md.
Fetch unread emails with thread context. If no emails are returned, report that there is nothing to process and stop (this is not an error).
Skill: none (inline judgement)
Input: emails from step 1
Output → actionable_emails
Review each email in emails and decide whether it needs a reply. Split the list into two groups:
Skip (no draft needed):
Include (draft a reply):
For each skipped email, record the subject, sender, and reason for skipping.
If no emails need a reply after triage, present the triage summary and stop.
Skill: email-voice-draft
Input: Each email from actionable_emails (one at a time), plus any user-provided reply_guidance
Output → draft_replies
For each email in actionable_emails, read and follow the instructions in ~/.agents/skills/email-voice-draft/SKILL.md.
Pass the email data as the email thread input:
from: the sendersubject: the subject linebody: the most recent message bodythread_history: prior messages in the thread (from thread_messages)thread_id: the Gmail thread IDmessage_id: the Gmail message ID (for reply threading)If the user provided reply_guidance, pass it through.
The email-voice-draft skill will load the voice profile and business context (already in context from the preamble), search Notion for relevant knowledge, and compose the reply.
Collect the draft_reply output from each invocation. If drafting fails for one email, record the error and continue with the remaining emails.
Skill: gmail-draft
Input: Each draft_reply from step 3 (one at a time)
Output → draft_confirmations
For each draft_reply, read and follow the instructions in ~/.agents/skills/gmail-draft/SKILL.md.
Pass the following fields:
to: recipient addresssubject: reply subject linebody: the draft reply textthread_id: Gmail thread ID (if present, so the draft is threaded correctly)in_reply_to: the message ID for reply headers (if present)Collect the confirmation (draft_id, summary) for each. If saving fails for one draft, record the error and continue with the remaining drafts.
Present a summary to the user:
Drafts created: list each draft with the recipient, subject, and any Notion pages that informed the reply.
Skipped: list each skipped email with the sender, subject, and reason.
Errors (if any): list any emails where drafting or saving failed, with the error detail.
Remind the user that all drafts are in their Gmail drafts folder for review. Nothing has been sent.
tools
Check whether Claude and Codex have equivalent access to shared agent resources, skills, hooks, plugins, MCP servers, permissions, startup behaviour, and provider-specific adapter config. Use when comparing agent environments, debugging missing capabilities after restart, or deciding whether to symlink a resource or configure a runtime.
testing
Record substantive skill use in an append-only local log. Use after choosing or invoking a non-system skill for real work, when a skill is inspected but not used, or when a skill fails to apply. Do not use for routine system skills or incidental file reads.
testing
Turn a vague or underspecified request into a self-contained problem statement. Use when the user has a rough idea, when a request would fail if handed directly to an agent, or before non-trivial work that needs shared understanding.
data-ai
Append a one-line learning to ~/.agents/learning-log.md. Use when the user types /learning, or when something genuinely worth remembering surfaced during work and the user confirms it should be captured.