Visual HTML batch triage interface
Generates and processes a visual HTML interface for batch triaging emails, enabling bulk decisions on inbox items via categories and actions.
When to use
Use this when you need to efficiently process a large volume of emails in bulk, categorizing and deciding actions (archive, delete, delegate) for many items at once.
How to invoke
manual via /chief-of-staff:batch, auto-invoked when relevant
npx claudepluginhub omarshahine/agent-plugins[--generate | --process | --digest | --retry | --reset | --full]Generate or process a visual HTML batch triage interface.
/chief-of-staff:batch # Generate HTML interface (incremental if state exists)
/chief-of-staff:batch --generate # Same as above
/chief-of-staff:batch --process # Process downloaded decisions
/chief-of-staff:batch --digest # Process reading digest decisions (archive/delete summarized emails)
/chief-of-staff:batch --retry # Retry failed items from last batch
/chief-of-staff:batch --reset # Clear sync state, full fetch
/chief-of-staff:batch --full # One-time full fetch, save new state
queryChanges for Fastmail; falls back to list_emails for other providers--reset clears state and re-fetches everything--full does a one-time full fetch but saves state for next timeHTML Interface Features:
Generated batch triage interface.
Summary:
- Top of Mind: 3 emails
- Deliveries: 5 emails
- Newsletters: 8 emails
- Financial: 4 emails
- Archive Ready: 6 emails
- Delete Candidates: 2 emails
- FYI: 12 emails
Total: 40 emails
Browser opened. Review emails, adjust actions, click 'Submit All'.
After submitting, run: /chief-of-staff:batch --process
Processing 40 decisions from batch-2026-02-02-abc123...
INLINE ACTIONS
--------------
Archive: 15 emails
- 8 to Financial
- 5 to Orders
- 2 to Travel
Delete: 5 emails
Keep: 2 emails (flagged)
DELEGATED BATCHES
-----------------
Parcel: 5 packages → Added to Parcel
Newsletters: 8 → Unsubscribed from 6, 2 failed
Reminders: 3 → Created in Apple Reminders
Calendar: 2 → Created events
SUMMARY
-------
Total: 40 decisions
Successful: 38
Failed: 2
Failed items saved for retry.
Processing 5 digest decisions...
DIGEST PROCESSING
-----------------
Archived: 3 emails (unflagged)
Deleted: 2 emails
Remaining in digest: 0 items
Decisions recorded as summarize_archive/summarize_delete.
CRITICAL: This command MUST delegate to sub-agents via the Task tool. Do NOT attempt to perform actions directly in this command.
Generate Mode (default or --generate):
Use the Task tool with:
subagent_type: "chief-of-staff:batch-html-generator"
model: sonnet
prompt: |
Generate the HTML batch triage interface.
Parameters:
- Look back: [days] days (default: 7)
- Limit: [N] emails (default: 100)
- Sync mode: [--reset | --full | (default: incremental if state exists)]
If --reset was passed: Clear sync-state.yaml before fetching. Full re-fetch.
If --full was passed: Do full fetch this time, save new state for future incremental.
Otherwise: Use incremental sync if sync-state.yaml has query_state.
IMPORTANT: If email MCP fails, report the error immediately.
Do NOT generate sample data or placeholder HTML.
Process Mode (--process):
Use the Task tool with:
subagent_type: "chief-of-staff:batch-processor"
model: sonnet
prompt: |
Process batch triage decisions from the downloaded JSON file.
Check these locations for the decisions file:
1. ~/Downloads/inbox-triage-decisions-*.json
2. Scratchpad directory
IMPORTANT:
- Check steering text for reply intent even if action is not "reply"
- Use reply_to_email with markdownBody for drafts
- Initialize data files from .example templates if missing
- Record all decisions to decision-history.yaml for learning
- CRITICAL: If any decisions have action "summarize", you MUST launch
the reading-digest-generator sub-agent AFTER writing reading-digest-state.yaml.
This generates the newspaper-style HTML digest and opens it in the browser.
Do NOT skip this step — the user expects the digest to appear automatically.
Digest Mode (--digest):
Use the Task tool with:
subagent_type: "chief-of-staff:batch-processor"
model: sonnet
prompt: |
Process reading digest decisions from the downloaded JSON file.
Check these locations for the decisions file:
1. ~/Downloads/reading-digest-decisions-*.json
2. Scratchpad directory
The decisions JSON will have type: "digest" with archive/delete actions per email.
For each decision:
- Archive: move to Archive folder, unflag the email
- Delete: delete the email
After processing, update reading-digest-state.yaml (remove processed items, add to history).
Record decisions as summarize_archive / summarize_delete in decision-history.yaml.
Retry Mode (--retry):
Use the Task tool with:
subagent_type: "chief-of-staff:batch-processor"
model: sonnet
prompt: |
Retry failed items from the previous batch.
Read failures from ~/.claude/data/chief-of-staff/batch-state.yaml and reprocess only those items.
Why Task tool is required: