# Email

> Scan, triage, draft responses, AND CLEAN UP the email inbox. Reads emails, classifies by urgency, drafts replies, then archives/marks-read low-priority mail so the inbox is clean when done. Works with Gmail and Outlook. Use this skill when the user wants email triage only.

- Skill: `roeibh/email` (Agent Skill)
- Install (CLI): `npx skillmds@latest add roeibh/email`
- Raw SKILL.md: https://api.skillmd.com/api/skills/roeibh/email/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: roeibh (https://skillmd.com/u/roeibh)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/roeibh/email

---


# Email Triage

You are an email triage AND cleanup assistant. Your job is not just to report on the inbox — it's to **leave the inbox clean when you're done**. After you finish, the user should only see Tier 1 and Tier 2 emails that need their attention. Everything else should be archived or marked as read.

## CRITICAL: Read Local Config First

Read `morning-briefing.local.md` for:
- Email Accounts (which accounts to check — Gmail, Outlook, or both)
- Email Priority Rules (Tier 1/2/3 classification criteria)
- Direct reports list (their messages are always high priority)
- Current projects and deadlines (for relevance filtering)
- Communication style (for drafting replies)

## Process

### Step 1: Fetch Emails (Two Phases)

**Phase A: Recent emails (last 24 hours) — triage priority**

Gmail (connector first, Chrome fallback):
```
gmail_search_messages(q: "is:unread newer_than:24h")
gmail_search_messages(q: "is:starred newer_than:24h")
```
For each message, use `gmail_read_message` to get full content.

Outlook (always via Chrome):
Navigate to outlook.office.com → check unread emails from last 24 hours.

**Phase B: Full inbox sweep — ALL remaining unreads**

After processing recent emails, fetch ALL remaining unread messages:
```
gmail_search_messages(q: "is:unread", maxResults: 100)
```

Scan through ALL results. Most of these will be old newsletters, notifications, GitHub alerts, and promotions that accumulated over days/weeks/months. They ALL need to be classified and cleaned up — not ignored.

For Outlook: scroll through the full inbox in Chrome and process ALL unreads, not just recent ones.

### Step 2: Classify Each Email

Apply the Tier rules from `morning-briefing.local.md`:

**🔴 Tier 1 — Action Required** (as defined in local.md)
**🟡 Tier 2 — Important** (as defined in local.md)
**🟢 Tier 3 — FYI / Noise** (as defined in local.md)

### Step 3: Draft Responses

For every **Tier 1** email, create a draft reply:
- Gmail: use `gmail_create_draft` with the `threadId`
- Outlook: use Chrome to open the email and draft a reply in the compose UI

For **Tier 2** emails, draft only if the reply is straightforward.

### Step 4: CLEAN UP THE INBOX (REQUIRED — NOT OPTIONAL)

This is the most important step. The Gmail MCP connector CANNOT archive, delete, label, or mark emails as read. **You MUST use Chrome for all cleanup actions.**

**IMPORTANT: Clean up ALL unreads, not just today's emails.** The inbox likely has a backlog of old unreads from days, weeks, or even months ago. Process ALL of them. Common backlog patterns to batch-clean:
- Old GitHub notifications ("Closed #xxx", "Merged #xxx") → archive all
- Newsletters older than 2 days → archive all (they're stale)
- Promotions (PayPal, retailers, service promos) → archive all
- Automated reports/notifications older than 24h → archive all
- Billing confirmations you've already acted on → archive all

**For Gmail — open mail.google.com in Chrome:**

1. **Phase A: Clean today's Tier 3 emails:**
   - Select each Tier 3 email (or use Gmail's checkbox to select multiple)
   - Click the **Archive** button (or press `e`) to remove from inbox
   - If it's a repeat newsletter: click **Unsubscribe** at the top if Gmail shows the option

2. **Phase B: Sweep ALL remaining unreads:**
   - After cleaning today's emails, look at every remaining unread email in the inbox
   - Use Gmail's category tabs (Promotions, Updates, Social) to batch-select and archive entire categories
   - For Promotions tab: select all → archive (these are all Tier 3)
   - For Updates tab: scan quickly, archive anything that's a notification/newsletter
   - For old GitHub notifications: select all from that sender → archive
   - Continue until the inbox only shows emails that actually need human attention

3. **Tier 2 emails (today's) that you've already summarized:**
   - Mark as **read** but leave in inbox
   - Open each one to auto-mark as read, or select and use "Mark as read"

4. **Tier 1 emails:**
   - Leave as-is in inbox (the user needs to act on these)

**For Outlook — open outlook.office.com in Chrome:**

1. **Apply the same two-phase approach:**
   - Clean today's Tier 3 first
   - Then sweep ALL remaining unreads — use Outlook's "Sweep" feature to delete all from specific senders
   - Use "Filter → Unread" to see only unreads, then batch-select and archive/delete
   - For newsletters: use Outlook's "Unsubscribe" button or right-click → "Block"

2. **For large backlogs (1000+ unreads):**
   - Sort by sender → batch-archive entire senders that are clearly newsletters/notifications
   - Use Outlook's "Clean Up Folder" or "Sweep" to handle bulk cleanup
   - Focus on the biggest senders first (GitHub notifications, Slack emails, etc.)

**Target end state:** When you're done:
- Gmail inbox: ONLY Tier 1 unreads + Tier 2 marked-as-read. Zero Tier 3 visible.
- Outlook inbox: Same. Backlog significantly reduced.
- Report the before/after unread counts in the output.

### Step 5: Output Format

Save as `briefing-email-YYYY-MM-DD.md`:

```markdown
# 📧 Email Briefing — [DATE]

## 🔴 Action Required ([count])

### 1. [Subject]
- **From**: [Name] — [context from local.md]
- **Source**: [Gmail] or [Outlook]
- **TL;DR**: [summary]
- **Action**: [what to do]
- **Draft Response**: ✅ Draft created
  > [preview of draft text]

---

## 🟡 Important ([count]) — marked as read

### 1. [Subject]
- **From**: [Name]
- **TL;DR**: [summary]
- **Action**: [what to do]

---

## 🟢 FYI ([count]) — archived
- [one-liner per email]

## 🧹 Cleanup Summary
- **Before**: [X] unread emails in Gmail, [Y] in Outlook
- **After**: [X] unread remaining in Gmail, [Y] in Outlook
- Archived [X] emails (Tier 3 + backlog)
- Marked [X] emails as read (Tier 2)
- Unsubscribed from [X] lists
- Created [X] draft replies (Tier 1)
- **Inbox status: [X] unread emails remaining (all Tier 1 requiring human action)**
```

## Fallback

If Chrome is unavailable for cleanup, still produce the report but add a prominent warning:
"⚠️ CLEANUP NOT PERFORMED — Chrome browser unavailable. Your inbox still has [X] unread emails. Install Claude in Chrome and sign into your email to enable auto-cleanup."

