--- name: inbox-digest description: Use when the user asks to triage their inbox, for an email digest, "what needs my attention in email", or when a scheduled daily email routine runs. Sorts recent mail into Reply today, Waiting on you, FYI, and Safe to ignore, with drafts offered for replies. Read-only; never sends, archives, or deletes without approval. metadata: id: inbox-digest version: "1.0.0" author: BotPlaza --- # Inbox Digest > Know which five emails matter before you open your inbox. ## What it does Turn an overflowing inbox into a short list: what needs a reply today, what's waiting on you, what's worth knowing, and what can go. ## When to use - "Triage my inbox", "what did I miss in email", "daily email digest", "anything urgent?" - A scheduled routine (e.g. weekdays at 8:00 AM and 4:00 PM). ## Requires An email connector (Gmail, Outlook, or similar) with read access. If none is connected, say so and stop. Don't ask for a password. ## Schedule Default: Weekdays, 8:00 AM. Run it from a routine or scheduled task at that time; the user can change the time in the routine, not in this skill. ## Inputs | Setting | Default | Notes | |---|---|---| | `window` | since last digest, max 24 h | Or "last 3 days" after a vacation. | | `vip_senders` | none | People or domains that always rank first. | | `mute` | newsletters, receipts, social notifications | Categories to drop into Safe to ignore. | | `max_items` | 15 | Cap across all buckets. | | `draft_replies` | offer | `off`, `offer` (ask first), or `auto-draft` (save drafts, never send). | | `tone` | the user's own | Learn from their sent mail when drafting. | ## Steps 1. **Fetch** threads in the window from the inbox (skip spam and trash). Read the latest message in each thread plus enough history to understand it. 2. **Classify** each thread: - **Reply today:** a direct question or request to the user, a deadline within 48 hours, or anything from a VIP that asks for something. - **Waiting on you:** the user owes something but it isn't urgent, including threads where the user said "I'll get back to you". - **FYI:** worth knowing, no action (decisions made, status updates, confirmations). - **Safe to ignore:** muted categories, automated mail, cold outreach. 3. **Extract** for each actionable thread: sender, subject, the ask in one line, any deadline (in the user's timezone), and a link to the thread. 4. **Rank** within buckets: VIP, then deadline, then age. 5. **Draft** (if enabled): for Reply today items, write a short reply in the user's voice. Save as drafts only when the setting is `auto-draft`; otherwise show them inline and ask. 6. **Deliver** the digest in the format below. ## Output format ```markdown # Inbox digest · {date, time tz} {N} new threads · {R} need a reply today ## Reply today 1. **{Sender}**: {Subject}. {The ask in one line.} Due {deadline}. [Open]({thread link}) ## Waiting on you - **{Sender}**: {what you owe}, {age} ## FYI - {One-line summary} ({sender}) ## Safe to ignore ({count}) {Comma-separated senders or categories} *Reply "draft 1" to get a reply drafted, or "mute {sender}" to hide them next time.* ``` ## Edge cases - **Sensitive content** (medical, legal, HR, financial account numbers): summarize at the subject level only. - **Possible phishing** (urgent payment requests, credential links, lookalike domains): put in a separate "Looks suspicious" line and never click its links. - **Very long threads:** summarize the current state, not the history. - **Empty window:** reply "Inbox is clear since {time}." and stop. ## Boundaries Never send, archive, label, delete, unsubscribe, or forward without the user's explicit approval for that specific action.