| name | email-digest |
| description | AI-powered email digest — summarize, categorize, prioritize, and translate emails |
| allowed-tools | Bash, Read, Write, Glob, Grep |
Email Digest
Generate an intelligent digest of the user's emails. Fetches emails via mac_mail.py, then uses AI to summarize, categorize, prioritize, and optionally translate.
Setup
cd /Users/chensijie/Projects/claude-secretary && source venv/bin/activate
How to Produce a Digest
Step 1: Fetch Emails
Based on what the user asks, choose the right command:
python scripts/mac_mail.py list --account Stanford --unread --top 20 --preview
python scripts/mac_mail.py list --account Stanford --date 2026-03-25 --top 30 --preview
python scripts/mac_mail.py inbox --top 10
python scripts/mac_mail.py list --account Stanford --after 2026-03-20 --before 2026-03-27 --top 30
Use --preview to get body snippets. For emails that look important, fetch full content:
python scripts/mac_mail.py read MAIL_ID --account ACCOUNT
Step 2: Categorize
Assign each email to ONE category:
| Category | Description | Example |
|---|
| Action Required | Needs your direct response or action | Reply requests, review deadlines, data requests |
| Meeting/Event | Calendar invites, event notifications | Seminars, talks, meet & greets |
| Career/Opportunity | Jobs, grants, fellowships, expos | NSF calls, postdoc positions, career fairs |
| Academic | Papers, reviews, research updates | Journal notifications, review requests |
| Administrative | HR, IT, policy, compliance | Tax reminders, rotation schedules, I-9 |
| Mailing List | Department/group announcements | [radiation_oncology], [som_postdocs] |
| Newsletter/Promo | Publications, marketing, subscriptions | Springer, Nature, LinkedIn, Booking.com |
Step 3: Prioritize
Assign priority based on:
- HIGH: Has a deadline within 7 days, requires YOUR personal response, or is from a direct collaborator
- MEDIUM: Relevant to your work but no urgent action needed (seminars, opportunities, review requests)
- LOW: Newsletters, promotions, mailing list noise, automated notifications
Step 4: Present the Digest
Use this format:
Email Digest — [Date/Range] — [Account]
[N] emails total | [X] action required | [Y] unread
Action Required (HIGH)
| Sender | Subject | Action Needed | Deadline |
|---|
| ... | ... | ... | ... |
Meetings & Events (MEDIUM)
| Date/Time | Event | Location |
|---|
| ... | ... | ... |
Career & Opportunities
| Sender | Subject | Deadline |
|---|
| ... | ... | ... |
Academic
Administrative
Mailing List / Newsletters (LOW)
<collapsed summary — just count and top senders>
Step 5: Offer Follow-up Actions
After presenting the digest, suggest:
- Which emails to read in full (with
read command)
- Which emails can be batch-marked as read (with
mark read command)
- Any deadlines to note
Special Modes
Translation Mode
If user asks to translate, translate email subjects and previews to Chinese (or specified language) inline.
Weekly Summary Mode
If user asks for a weekly summary:
- Fetch emails for the week:
--after MONDAY --before SUNDAY
- Group by day, then by category
- Highlight: key threads, unresolved action items, upcoming deadlines
Focus Mode
If user says "only important" or "skip noise":
- Only show HIGH and MEDIUM priority
- Collapse everything else into a one-line count
Important Notes
- Always use
--preview when listing to get body snippets for better categorization
- For ambiguous emails, read the full content before categorizing
- The user is a Stanford postdoc in bioinformatics/radiation oncology — use this context for prioritization
- Default account is Stanford unless specified
- Keep the digest concise — the user wants to scan quickly, not read walls of text