inbox-zero
Purpose
Fetches unread IMAP headers, classifies them into triage buckets, and surfaces priority items for human review without mutating the mailbox.
Runbook
- Verify
IMAP_HOST, IMAP_USER, and IMAP_PASS are set. Never log or echo IMAP_PASS.
- Run
scripts/fetch-inbox.sh to retrieve unread email headers from INBOX.
- Inspect the unread count; if it is greater than
50, require explicit CONFIRM_LARGE_INBOX=1 before continuing.
- Run
scripts/triage.sh on the fetched JSON to classify emails.
- Print a triage summary: N priority, M routine, P deferred.
- For
priority items, print the full From, Subject, and Date values for operator review.
- Ask explicit approval before any future IMAP mutations such as marking read or moving mail.
Stop conditions
- Abort if
IMAP_HOST, IMAP_USER, or IMAP_PASS is unset.
- Never read message body content — only headers (
From, Subject, Date, Message-ID).
- Never move or delete emails without explicit approval.
- Abort if IMAP authentication or connection fails.
- On IronClaw, prefer
MOCK_MODE=1 because outbound IMAP may be sandboxed.
Output format
{
"total_unread": 12,
"priority": 2,
"routine": 8,
"deferred": 2,
"priority_items": [
{"from": "boss@company.com", "subject": "Action required: Q3 report", "date": "2024-06-15"}
]
}
Example invocations
IMAP_HOST=imap.gmail.com IMAP_USER=me@gmail.com IMAP_PASS=apppass skills/inbox-zero/scripts/run.sh
MOCK_MODE=1 skills/inbox-zero/scripts/run.sh
1---2name: inbox-zero3description: Email triage assistant for labels, drafts, and priority escalation.4---56# inbox-zero78## Purpose910Fetches unread IMAP headers, classifies them into triage buckets, and surfaces priority items for human review without mutating the mailbox.1112## Runbook13141. Verify `IMAP_HOST`, `IMAP_USER`, and `IMAP_PASS` are set. Never log or echo `IMAP_PASS`.152. Run `scripts/fetch-inbox.sh` to retrieve unread email headers from `INBOX`.163. Inspect the unread count; if it is greater than `50`, require explicit `CONFIRM_LARGE_INBOX=1` before continuing.174. Run `scripts/triage.sh` on the fetched JSON to classify emails.185. Print a triage summary: N priority, M routine, P deferred.196. For `priority` items, print the full `From`, `Subject`, and `Date` values for operator review.207. Ask explicit approval before any future IMAP mutations such as marking read or moving mail.2122## Stop conditions23241. Abort if `IMAP_HOST`, `IMAP_USER`, or `IMAP_PASS` is unset.252. Never read message body content — only headers (`From`, `Subject`, `Date`, `Message-ID`).263. Never move or delete emails without explicit approval.274. Abort if IMAP authentication or connection fails.285. On IronClaw, prefer `MOCK_MODE=1` because outbound IMAP may be sandboxed.2930## Output format3132```json33{34 "total_unread": 12,35 "priority": 2,36 "routine": 8,37 "deferred": 2,38 "priority_items": [39 {"from": "boss@company.com", "subject": "Action required: Q3 report", "date": "2024-06-15"}40 ]41}42```4344## Example invocations4546- `IMAP_HOST=imap.gmail.com IMAP_USER=me@gmail.com IMAP_PASS=apppass skills/inbox-zero/scripts/run.sh`47- `MOCK_MODE=1 skills/inbox-zero/scripts/run.sh`