AgentSkillsCN

email

交互式收件箱分类与邮件管理——高效实现收件箱清零。

SKILL.md
--- frontmatter
name: email
description: "Interactive inbox triage and email management - get to inbox zero efficiently"
last_updated: 2026-02-08
tools_required: [gmail, ticktick, AskUserQuestion, Read]
agent_type: main_agent

Email - Inbox Zero Workflow

Interactive email triage, drafting, and inbox management using Gmail MCP.

[GOAL]

Get {USER_NAME} to inbox zero efficiently: categorize, batch-process, draft replies, create tasks, and clean up newsletters. Preserve relationships and surface what matters.

[MODES]

Ask the user which mode (or infer from arguments):

ModeTriggerScope
A) Quick Scan (default)/emailLast 24h inbox only
B) Full Triage/email fullEntire inbox
C) Category Focus/email respondOne category (RESPOND, TASK, etc.)
D) Search & Process/email search <query>Matching emails
E) Newsletter Cleanup/email newslettersBulk newsletter management

[PROCESS]

1. Load Context (once per session)

code
Read: Cockpit/Chief-of-Staff.md          → active ventures, priorities, VIP contacts
Read: Cockpit/memory/topics/Contacts.md  → relationship context for drafting
Read: Cockpit/memory/topics/Email-Patterns.md → learned sender mappings

2. Ingest & Count

Use Gmail MCP for all reads:

code
gmail__search_emails  → scan inbox based on mode
gmail__list_emails    → get inbox listing

For Quick Scan: query: "is:inbox newer_than:1d" For Full Triage: query: "is:inbox" For Category Focus: filter by learned mappings For Search: use query from arguments

3. Present Overview

Show user a concise breakdown:

code
INBOX: 47 emails

  RESPOND (12)  - Direct questions/requests needing reply
  WAITING (3)   - Sent by user, no reply yet (last 7 days)
  TASK (8)      - Action items, no reply needed
  FYI (9)       - Informational, archive after scan
  NEWSLETTER (15) - Marketing, digests, subscriptions

VIP flagged: 4 (marked with *)

Start with RESPOND? [Y/n]

4. Batch Triage

Process in priority order: RESPOND > WAITING > TASK > FYI > NEWSLETTER

Present 5-10 emails at a time per category.

Before presenting RESPOND emails: Read each email via gmail__read_email to generate a proper summary. Don't just show the snippet - user needs enough context to decide without opening each one.

For each RESPOND email show:

code
[1] * Sarah Chen <sarah@client.com>                 ← * = VIP
    "Q1 deliverables timeline"
    ASKS: Whether Sprint 1 can start 3 Feb, wants confirmation on scope
    CONTEXT: Follow-up from Dec meeting, 3rd email in thread
    NEEDS: Decision on timeline + confirmation reply
    [D]raft  [T]ask  [F]YI  [W]aiting  [S]pam  [K]ip

Summary fields:

  • ASKS: What the sender wants (1 line, specific)
  • CONTEXT: Thread history, relationship, why it matters (1 line)
  • NEEDS: What user should do - reply, decide, review, etc. (1 line)

For non-RESPOND categories (FYI, NEWSLETTER, TASK), a one-line summary is enough - don't waste time reading every newsletter body.

VIP rules:

  • Contacts from Chief-of-Staff.md active ventures/clients → always VIP
  • Contacts from Contacts.md marked as key contacts → VIP
  • Family → VIP

5. Per-Email Actions

Based on user's choice:

ActionWhat Happens
[D]raftRead full thread via gmail__read_email, draft reply, present for approval
[T]askCreate TickTick task tagged #email with email context
[F]YIArchive (remove INBOX label via gmail__modify_email)
[W]aitingNote in WAITING tracker, suggest follow-up date
[S]pamReport spam + archive
[K]ipSkip, leave in inbox

6. WAITING Scan

After processing new emails, scan for stalled threads:

code
gmail__search_emails → query: "from:me newer_than:7d"

Cross-reference with inbox replies. Present stalled threads:

code
WAITING (no reply in 7+ days):

[1] To: James Wright
    Subject: Invoice follow-up
    Sent: 3 Feb → 5 days ago
    Suggest: Gentle nudge?
    [D]raft follow-up  [W]ait longer  [C]lose

7. Draft Generation

When drafting a reply:

  1. Read full thread: gmail__read_email (get thread context)
  2. Check Contacts.md for relationship notes on this person
  3. Match tone to relationship type (new/existing/client/application)
  4. Present draft to user:
code
TO: sarah@client.com
SUBJECT: Re: Q1 deliverables timeline

---
Hi Sarah,

Great to hear from you - hope the new year's treating you well.

[draft body...]

Speak soon,
{USER_NAME}
---

[S]end  [E]dit  [G]mail draft  [C]ancel

On approval:

  • Send: gmail__send_email (with threadId + inReplyTo for threading)
  • Gmail draft: gmail__draft_email (saves to Gmail drafts)
  • Edit: User provides changes, redraft
  • Cancel: Skip

8. Newsletter Processing (Mode E or final stage)

Present grouped by sender:

code
NEWSLETTER CLEANUP:

[1] Substack Digest (47 emails)
    [D]elete all + unsubscribe  [K]eep  [F]ilter (auto-archive future)

[2] TechCrunch Daily (23 emails)
    [D]elete all + unsubscribe  [K]eep  [F]ilter (auto-archive future)

On Delete + Unsubscribe:

  1. Confirm: "Delete X emails from [sender]? This is permanent."
  2. gmail__batch_delete_emails with message IDs
  3. If unsubscribe link found in email body, inform user to click it manually (browser action)

On Filter:

  • gmail__create_filter with sender criteria → skip inbox, apply label

9. Task Creation

For TASK category emails, create TickTick tasks:

code
ticktick__ticktick_create_task:
  title: "[Email] {action from email}"
  content: "From: {sender}\nSubject: {subject}\nAction: {extracted action}"
  dueDate: {suggested based on urgency}
  priority: {0-5 based on VIP/urgency}

Tag with #email so it's traceable.

10. Session Summary

After processing:

code
SESSION COMPLETE

Processed: 47 emails
  Replied: 5 (3 sent, 2 saved as drafts)
  Archived: 18
  Tasks created: 4
  Newsletters cleaned: 32 emails deleted, 3 filters created
  Skipped: 8
  Remaining in inbox: 8

Suggestions:
  - Create filter for [sender] (5+ archived emails)
  - Follow up with [person] by [date]
  - [person] hasn't replied in 10 days - consider nudge

Inbox count: 47 → 8

11. Update Memory

After each session, update:

code
Cockpit/memory/topics/Email-Patterns.md
  → New sender-to-category mappings user confirmed
  → Senders user always archives (future auto-categorize)
  → Senders user always responds to (VIP candidates)

Cockpit/memory/topics/Contacts.md
  → New contacts encountered
  → Updated last-interaction dates
  → Relationship notes from email context

[SAFETY]

  • Never send without explicit approval - always present draft first
  • Never delete without confirmation - state count and sender before batch delete
  • VIP contacts get extra attention - flag and suggest careful responses
  • Draft before send - user takes final action on all outbound
  • Thread correctly - always use threadId and inReplyTo for replies
  • Protect client identity in referrals - never name the client in broker/referral emails; describe generically until intro is agreed

[TOOL REFERENCE]

Reading & Writing (Gmail MCP)

ToolUse For
gmail__search_emailsInbox scan, query-based search
gmail__list_emailsDate-filtered listing
gmail__read_emailFull email + thread for drafting; also get RFC 2822 Message-ID header before replying
gmail__send_emailSend approved replies
gmail__draft_emailSave draft to Gmail
gmail__modify_emailArchive, label, mark read
gmail__batch_modify_emailsBulk archive/label
gmail__batch_delete_emailsNewsletter cleanup
gmail__create_filterAuto-archive rules
gmail__get_or_create_labelEnsure labels exist

Gmail MCP Parameter Gotchas

  • send_email: to must be an array ["email@example.com"], not a string
  • modify_email: uses messageId (not id) as parameter name
  • send_email threading: use gmail__read_email first to get RFC 2822 Message-ID for inReplyTo

Tasks (TickTick)

ToolUse For
ticktick__ticktick_create_taskAction-item emails → tasks

[IMPORTANT]

  • Batch, don't one-by-one - present 5-10 emails at a time for speed
  • Infer categories first, confirm with user - don't ask for every email
  • Learn from corrections - if user recategorizes, update Email-Patterns.md
  • Keep it fast - goal is inbox zero in minutes, not hours
  • Respect the thread - always check thread history before drafting
  • Cross-reference context - check Chief-of-Staff.md and Contacts.md for intel