Skip to content
Back to skills

Email Triage

ASecurity

Classify a batch of emails into action categories (reply now, reply later, archive, delete, unsubscribe) and surface unsubscribe candidates. Use when you have an exported inbox CSV to triage after a busy week, an inbox-zero reset, or an unsubscribe pass.

  • 1,271 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
ai-agentspythongobashsecurity

Works with

  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add borghei/Claude-Skills --skill email-triage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Email Triage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Email Triage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/borghei-email-triage/badge)](https://www.skillsdirectory.com/skills/borghei-email-triage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: email-triage
description: >
  Classify a batch of emails into action categories (reply now, reply later,
  archive, delete, unsubscribe) and surface unsubscribe candidates. Use when
  you have an exported inbox CSV to triage after a busy week, an inbox-zero
  reset, or an unsubscribe pass.
license: MIT + Commons Clause
metadata:
  version: 1.0.0
  author: borghei
  category: personal-productivity
  domain: inbox
  updated: 2026-05-04
  python-tools: email_classifier.py
  tech-stack: email, productivity
  tags:
    - email
    - inbox-zero
    - triage
    - unsubscribe
    - productivity
---

# Email Triage

Classify a batch of email subjects + senders into action buckets and surface inbox-zero candidates.

---

## Keywords

email, inbox, inbox zero, triage, unsubscribe, mailing list, mailbox, gmail, outlook, productivity

---

## Clarify First

Before triaging, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

- **Inbox export fields:** subject, sender, snippet drive classification accuracy; missing columns degrade the buckets.
- **Priority / VIP senders:** who should always land in reply_now regardless of content. The classifier has no VIP option, so the assistant moves mail from these senders into reply_now when reviewing its output.
- **Unsubscribe tolerance:** purge all marketing vs keep newsletters you value; sets how aggressive the unsubscribe/delete buckets are.

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

---

## Quick Start

1. Export inbox to CSV with columns: `subject,sender,snippet,received_at`
2. Run: `python3 scripts/email_classifier.py inbox.csv`
3. Review action buckets; act on each in order

---

## Core Workflows

### Workflow 1: Weekly Inbox Triage
1. Export the past week's inbox
2. Run classifier
3. Action in order: reply-now → reply-later (move to follow-up folder) → archive → unsubscribe → delete
4. Apply Gmail filters (see `assets/gmail_filter_template.md`) so future similar emails route automatically

Time varies with inbox size; measure your first pass and budget from that.

### Workflow 2: Unsubscribe Pass
1. Run classifier; review unsubscribe candidates
2. Unsubscribe in batch (allow some days for senders to process the request)
3. For senders that don't honor, set Gmail filter to auto-delete

Keep passes short and time-boxed.

### Workflow 3: Inbox-Zero Reset
1. Apply the full inbox-zero method from `references/inbox_zero_method.md`
2. Move every email older than 30 days to archive (anything you still need can be found later via search)
3. Triage the remaining recent emails using the classifier

Plan a one-time block for the reset, then a short weekly pass to maintain it.

---

## Tools

### email_classifier.py

Classifies email rows into action buckets using rule-based pattern matching on sender domain, subject line, and snippet.

```bash
python3 scripts/email_classifier.py assets/flawed_inbox.csv
python3 scripts/email_classifier.py inbox.csv --format json
```

Real output (excerpt) for `assets/flawed_inbox.csv`:

```
Email Triage: read 7 emails
Buckets: reply_now 1, archive 1, unsubscribe 3, delete 1, review 1

[reply_now] "URGENT: contract needs signature" from legal@client.example.com
    fix: Reply today, or snooze with a dated reminder. ...
[review] "Hello" from someone
    fix: Read it and file it by hand; no rule matched (no @ in sender, or no signal).
...
FIX 6 emails need action
```

Each finding quotes the subject and sender and gives a fix. Missing columns are reported, not
scored. `--json` is kept as an alias of `--format json`. Matching is keyword-based (an internal
heuristic, not a benchmark); promotional signals outrank a bare `?` in the subject.

**Exit codes:** `0` nothing needs action (only reply_later/archive), `1` at least one reply_now,
unsubscribe, delete or review email, `2` unusable input (missing, empty, non-UTF-8, or no
`subject`/`sender` header). Errors print one `BLOCKED:` line.

Action buckets:
- **reply_now** — direct addressing, time-sensitive language, named-person sender
- **reply_later** — informational threads, longer non-urgent
- **archive** — receipts, confirmations, completed transactions
- **unsubscribe** — newsletters, marketing, promotional
- **delete** — spam patterns, low-signal senders
- **review** — couldn't classify confidently

---

## Scope & Limitations

**In Scope:**
- Classification of an exported inbox CSV into `reply_now`, `reply_later`, `archive`, `unsubscribe`, `delete` and `review` buckets (`email_classifier.py`).
- Rule-based matching on sender domain, subject line and snippet.
- Weekly triage, unsubscribe-pass and inbox-zero reset workflows, with Gmail filter recipes in `assets/gmail_filter_template.md`.
- The inbox-zero method and daily routine in `references/inbox_zero_method.md`.

**Out of Scope:**
- Connecting to Gmail, Outlook or any mailbox. The skill does not read, move, delete or unsubscribe from mail.
- Drafting replies to the emails it classifies.
- Turning action emails into tasks and running the wider capture habit (see `personal-productivity/capture/`).
- Security analysis of phishing or malicious email.

**Important Caveats:**
- Input is a CSV the user exports. Missing sender or snippet columns lower accuracy.
- Classification is keyword and pattern based and can misfile mail. The `review` and `reply_now` buckets need a human check before acting.
- The script has no setting for VIP or priority senders. Those are applied by hand when reviewing the output.
- The filter recipes are written for Gmail. Other mail clients need their own rules.

---

## Reference Guides

- **`references/inbox_zero_method.md`** — Method, daily routine, common pitfalls

---

## Templates

- **`assets/gmail_filter_template.md`** — Common Gmail filter recipes for the action buckets above

---

## Best Practices

- **The 2-minute rule:** if a reply takes < 2 minutes, do it now.
- **Don't archive instead of unsubscribing.** Recurring senders compound — kill the source.
- **Process in batches.** Constant inbox checking destroys focus more than email itself.
- **Inbox is not a to-do list.** Move action items to a real task tool.

Files in this skill

  • SKILL.md3.2 KB
  • assets/gmail_filter_template.md2.3 KB
  • references/inbox_zero_method.md3.7 KB
  • scripts/email_classifier.py6.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.