email-whiz

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Email Whiz

Email Whiz

Gmail inbox management via MCP. Read current labels and filters before taking action.

基于MCP的Gmail收件箱管理工具,执行操作前请先读取当前标签和过滤器配置。

Canonical Vocabulary

标准术语表

TermDefinition
4D+NDO / DELEGATE / DEFER / REFERENCE / NOISE — five triage buckets
inbox zeroState where inbox contains only items requiring action today
routineRepeatable time-boxed workflow (daily 5 min, weekly 15 min)
streakConsecutive days achieving inbox zero; stored in progress file
auto-ruleGmail filter created from behavioral pattern analysis
filterGmail rule that matches incoming email and applies actions
VIPSender who receives consistent replies and high-priority treatment
noiseAutomated or low-value email; candidate for filtering/deletion
engagementReply rate to a sender: replies sent ÷ emails received
bankruptcyInbox with 500+ unread or growing backlog — triggers staged recovery
confidenceHIGH >80% / MEDIUM 50-80% / LOW <50% — governs auto-rule actions
batch opSingle
gmail_batch_modify_emails
or
gmail_batch_delete_emails
call

术语定义
4D+N执行/委派/延后/参考/垃圾 — 五个邮件分类桶
inbox zero收件箱仅留存当日需处理事项的状态
routine可重复的限时工作流(每日5分钟,每周15分钟)
streak连续达成收件箱清零的天数,存储在进度文件中
auto-rule基于行为模式分析创建的Gmail过滤器
filter匹配入站邮件并执行对应操作的Gmail规则
VIP可获得稳定回复和高优先级处理的发件人
noise自动化发送或低价值邮件,适合过滤/删除
engagement对某发件人的回复率:发送回复数 ÷ 接收邮件数
bankruptcy收件箱有500+未读邮件或积压量持续增长,触发分阶段恢复流程
confidence高 >80% / 中 50-80% / 低 <50% — 管控自动规则的执行逻辑
batch op单次
gmail_batch_modify_emails
gmail_batch_delete_emails
调用

Dispatch

指令调度

$ARGUMENTS
Action
triage
Categorize inbox with 4D+N, batch process by category
inbox-zero
Daily/weekly routine, progress tracking, bankruptcy detection
filters
Pattern-detected filter suggestions with confidence scoring
auto-rules
Behavioral analysis → auto-create Gmail filters from templates
analytics
Volume trends, response times, sender frequency, timing patterns
newsletters
Subscription audit + unsubscribe plan
labels
Taxonomy analysis, merge/rename/delete recommendations
search <goal>
Natural language → Gmail search query
senders
VIP + noise identification
digest
Recent important email summary
cleanup
Archive candidates, duplicate detection, batch archiving
audit
Full inbox health report with score and action plan
(empty)Show this mode menu
Classification gate for ambiguous input: If
$ARGUMENTS
could match multiple modes, ask which the user wants before proceeding.

$ARGUMENTS
动作
triage
用4D+N框架对收件箱分类,按类别批量处理
inbox-zero
每日/每周例行流程,进度追踪,积压预警检测
filters
基于模式识别生成带置信度评分的过滤器建议
auto-rules
基于行为分析从模板自动创建Gmail过滤器
analytics
数量趋势、响应时间、发件人频率、时间模式分析
newsletters
订阅审计 + 退订计划
labels
分类体系分析,提供合并/重命名/删除建议
search <goal>
自然语言转Gmail搜索查询
senders
VIP和垃圾发件人识别
digest
近期重要邮件摘要
cleanup
识别可归档内容,重复检测,批量归档
audit
完整的收件箱健康度报告,含评分和行动计划
(空)显示此模式菜单
模糊输入分类规则: 如果
$ARGUMENTS
匹配多个模式,先询问用户需求再继续执行。

Hybrid Mode Protocol

混合模式协议

Read operations — execute immediately:
  • gmail_search_emails
    ,
    gmail_get_email
    ,
    gmail_list_emails
  • gmail_get_labels
    ,
    gmail_get_filters
    ,
    gmail_get_filter
Write operations — confirm before executing:
  • Single:
    gmail_modify_email
    ,
    gmail_delete_email
    ,
    gmail_create_label
  • Batch:
    gmail_batch_modify_emails
    ,
    gmail_batch_delete_emails
  • Labels:
    gmail_update_label
    ,
    gmail_delete_label
    ,
    gmail_get_or_create_label
  • Filters:
    gmail_create_filter
    ,
    gmail_create_filter_from_template
    ,
    gmail_delete_filter
Confirmation format — always show before write ops:
Action: {description}
Scope: {count} email(s) / label(s) / filter(s)
Reversible: {Yes | NO}
[Sample: first 3 subjects for batch ops]
Use
templates.md
for full confirmation and report formats.

读操作 — 立即执行:
  • gmail_search_emails
    ,
    gmail_get_email
    ,
    gmail_list_emails
  • gmail_get_labels
    ,
    gmail_get_filters
    ,
    gmail_get_filter
写操作 — 执行前需确认:
  • 单条操作:
    gmail_modify_email
    ,
    gmail_delete_email
    ,
    gmail_create_label
  • 批量操作:
    gmail_batch_modify_emails
    ,
    gmail_batch_delete_emails
  • 标签操作:
    gmail_update_label
    ,
    gmail_delete_label
    ,
    gmail_get_or_create_label
  • 过滤器操作:
    gmail_create_filter
    ,
    gmail_create_filter_from_template
    ,
    gmail_delete_filter
确认格式 — 写操作前必须展示:
Action: {description}
Scope: {count} email(s) / label(s) / filter(s)
Reversible: {Yes | NO}
[Sample: first 3 subjects for batch ops]
完整的确认和报告格式请参考
templates.md

Phase 0: Discovery (Run First)

阶段0:上下文发现(优先执行)

Before any workflow, establish context:
1. gmail_get_labels       → store label names + IDs
2. gmail_get_filters      → store existing filter criteria
3. gmail_search_emails    → query: "in:inbox" (maxResults: 20)
                            note unread count, top senders, label patterns
Use discovered label names throughout — never invent names that conflict with existing taxonomy.

执行任何工作流前,先确认上下文:
1. gmail_get_labels       → 存储标签名称+ID
2. gmail_get_filters      → 存储现有过滤器规则
3. gmail_search_emails    → 查询: "in:inbox" (maxResults: 20)
                            记录未读数量、顶级发件人、标签使用模式
全程使用已发现的标签名称,绝对不要创建和现有分类体系冲突的名称。

Mode: Triage

模式:邮件分类

Categorize inbox using 4D+N. Reference:
triage-framework.md
.
1. Search: is:unread (maxResults: 50)
2. For each email: classify as DO / DELEGATE / DEFER / REFERENCE / NOISE
3. Collect IDs by category
4. Batch process:
   - NOISE ids: gmail_batch_modify_emails (removeLabelIds: [INBOX])
   - REFERENCE ids: gmail_batch_modify_emails (add _reference, remove INBOX)
   - DEFER ids: gmail_batch_modify_emails (add _deferred, remove INBOX)
5. Report with triage-summary template
6. Present DO items for user action
After triage: log session to inbox-zero progress file if running as part of daily routine.

使用4D+N框架对收件箱分类,参考文档:
triage-framework.md
1. 搜索: is:unread (maxResults: 50)
2. 对每封邮件分类为:执行/委派/延后/参考/垃圾
3. 按分类收集邮件ID
4. 批量处理:
   - 垃圾邮件ID: gmail_batch_modify_emails (removeLabelIds: [INBOX])
   - 参考类邮件ID: gmail_batch_modify_emails (add _reference, remove INBOX)
   - 延后类邮件ID: gmail_batch_modify_emails (add _deferred, remove INBOX)
5. 使用分类摘要模板生成报告
6. 展示待执行类邮件供用户操作
分类完成后:如果是每日例行流程的一部分,将会话记录写入收件箱清零进度文件。

Mode: Inbox Zero

模式:收件箱清零

Structured habit system for achieving and maintaining inbox zero. Reference:
inbox-zero-system.md
.
实现和维持收件箱清零的结构化习惯体系,参考文档:
inbox-zero-system.md

Daily Routine (5 min)

每日例行流程(5分钟)

1. Search: is:unread newer_than:1d → identify P0/P1
2. Run quick triage pass (4D+N)
3. Batch archive NOISE + REFERENCE
4. Report: inbox count before → after
5. Update ~/.claude/email-whiz/inbox-zero-progress.json
   - achieved_zero: inbox_count == 0
   - increment streak if zero
1. 搜索: is:unread newer_than:1d → 识别P0/P1优先级邮件
2. 快速执行4D+N分类
3. 批量归档垃圾+参考类邮件
4. 报告:收件箱数量 处理前 → 处理后
5. 更新 ~/.claude/email-whiz/inbox-zero-progress.json
   - achieved_zero: 收件箱数量 == 0
   - 如果达成清零则增加连续打卡天数

Weekly Review (15 min)

每周回顾(15分钟)

1. Clear deferred: label:_deferred older_than:7d
2. Filter effectiveness: inbox noise still arriving? → new filter candidates
3. Newsletter sweep: label:_reading/newsletters is:unread older_than:14d
4. Update weekly_reviews entry in progress file
Bankruptcy detection: If
is:unread
count > 500 or growing 3+ consecutive days, present recovery options (Daily Blitz / Staged Approach / Nuclear Reset). Always confirm before bulk archiving. See
inbox-zero-system.md
for full protocols.
Progress report format:
📊 Streak: {n} days | Best: {n} | Last zero: {date}
Inbox: {before} → {after}

1. 清理延后邮件:label:_deferred older_than:7d
2. 过滤器有效性检查:是否仍有垃圾邮件进入收件箱?→ 生成新过滤器候选
3. 新闻通讯清理:label:_reading/newsletters is:unread older_than:14d
4. 更新进度文件中的每周回顾条目
积压预警检测: 如果
is:unread
数量>500或连续3天持续增长,展示恢复选项(每日清理/分阶段处理/重置)。批量归档前必须获得用户确认,完整流程参考
inbox-zero-system.md
进度报告格式:
📊 连续打卡: {n} 天 | 最高记录: {n} | 上次清零: {date}
收件箱: {before} → {after}

Mode: Filters

模式:过滤器管理

Pattern-detected filter suggestions. Reference:
filter-patterns.md
.
1. Search recent inbox (maxResults: 100, last 30d)
2. Cluster by sender domain + subject patterns
3. Check gmail_get_filters for existing coverage
4. Score each candidate:
   HIGH  (>80%): volume ≥20, engagement <5%  → offer to create
   MEDIUM(50-80%): volume ≥10, engagement <15% → suggest
   LOW  (<50%):  borderline → show only
5. Present with filter-suggestions template
6. On approval: gmail_create_filter or gmail_create_filter_from_template
Check for conflicts before creating: scan existing filter criteria for overlaps.

基于模式识别生成过滤器建议,参考文档:
filter-patterns.md
1. 搜索近期收件箱邮件(maxResults: 100, 近30天)
2. 按发件人域名+主题模式聚类
3. 调用gmail_get_filters检查现有过滤器覆盖情况
4. 为每个候选过滤器评分:
   高  (>80%): 数量≥20, 回复率<5%  → 提供创建选项
   中(50-80%): 数量≥10, 回复率<15% → 给出建议
   低  (<50%):  边界情况 → 仅展示
5. 使用过滤器建议模板展示结果
6. 获得批准后:执行gmail_create_filter或gmail_create_filter_from_template
创建前检查冲突:扫描现有过滤器规则是否存在重叠。

Mode: Auto-Rules

模式:自动规则

Deep behavioral analysis → automated filter creation. Reference:
filter-patterns.md
§ Auto-Rule Detection.
深度行为分析→自动化过滤器创建,参考文档:
filter-patterns.md
§ 自动规则检测。

Analysis Phase

分析阶段

1. Search: in:inbox after:{90d_ago} (maxResults: 500)
2. Sender cluster analysis:
   - Compute volume + engagement per sender
   - Identify: HIGH confidence (auto-create), MEDIUM (review), LOW (skip)
3. Subject pattern mining:
   - Find repeating prefixes: [JIRA], PR #, Invoice #
   - Score by occurrence count
4. Check conflict with existing filters
1. 搜索: in:inbox after:{90天前} (maxResults: 500)
2. 发件人聚类分析:
   - 计算每个发件人的邮件数量+回复率
   - 识别:高置信度(自动创建)、中置信度(需审核)、低置信度(跳过)
3. 主题模式挖掘:
   - 识别重复前缀:[JIRA], PR #, Invoice #
   - 按出现次数评分
4. 检查与现有过滤器的冲突

Creation Phase

创建阶段

5. Present auto-rules report (see templates.md)
6. HIGH confidence: gmail_create_filter_from_template with confirmation
   MEDIUM confidence: gmail_create_filter after individual review
7. Schedule learning loop re-analysis after 2 weeks

5. 展示自动规则报告(参考templates.md)
6. 高置信度:确认后调用gmail_create_filter_from_template
   中置信度:单独审核后调用gmail_create_filter
7. 安排2周后重新执行学习循环分析

Mode: Analytics

模式:数据分析

Email communication metrics and trends. Reference:
analytics-guide.md
.
1. Volume: count in:inbox per week (4-week trend)
   - Compare week-over-week; classify growing/stable/declining
2. Inbox reach rate: direct inbox ÷ total received
   - Good: <30% | Needs filters: >60%
3. Response health:
   - is:starred older_than:2d → overdue
   - Reply rate: in:sent subject:Re: ÷ in:inbox (30d sample)
4. Sender frequency:
   - Top 20 senders by volume + engagement matrix
   - Classify: VIP / Active / Passive / Noise
5. Time-of-day: extract hour from date fields in sample
6. Label distribution: activity per label, stale detection (no messages 90d+)
7. Present full analytics report (see templates.md)

邮件沟通指标和趋势分析,参考文档:
analytics-guide.md
1. 邮件数量:每周收件箱数量(4周趋势)
   - 周同比对比,分类为增长/稳定/下降
2. 收件箱到达率:直接进入收件箱邮件 ÷ 总接收邮件
   - 优秀:<30% | 需要优化过滤器:>60%
3. 响应健康度:
   - 已标星且超过2天的邮件 → 逾期
   - 回复率:已发送主题含Re:的邮件 ÷ 收件箱邮件(30天样本)
4. 发件人频率:
   - 按数量+回复率矩阵排序前20名发件人
   - 分类:VIP / 活跃 / 被动 / 垃圾
5. 发送时段:从样本邮件的日期字段提取小时分布
6. 标签分布:每个标签的活跃度,识别闲置标签(90天以上无邮件)
7. 展示完整分析报告(参考templates.md)

Mode: Newsletters

模式:新闻通讯管理

Newsletter subscription audit + unsubscribe plan.
1. Search: list:* OR subject:(newsletter OR digest OR "weekly roundup")
2. For each subscription: estimate frequency + read rate (recency heuristic)
3. Classify: UNSUBSCRIBE (low read rate) / KEEP / FILTER (keep but skip inbox)
4. Present newsletter-audit report
5. On approval: open unsubscribe links (provide URL) or create filter
Reference:
workflows.md
§ Unsubscribe Strategies.

新闻通讯订阅审计+退订计划。
1. 搜索: list:* OR subject:(newsletter OR digest OR "weekly roundup")
2. 对每个订阅:估算发送频率+阅读率(基于时效性启发式规则)
3. 分类:退订(低阅读率)/ 保留 / 过滤(保留但不进入收件箱)
4. 展示新闻通讯审计报告
5. 获得批准后:打开退订链接(提供URL)或创建过滤器
参考文档:
workflows.md
§ 退订策略。

Mode: Labels

模式:标签管理

Label taxonomy analysis and cleanup.
1. gmail_get_labels → list all with counts
2. Find issues:
   - Duplicates/synonyms (e.g., "work" + "Work" + "work-email")
   - Stale labels (no messages in 90d)
   - Flat structure that should be hierarchical
3. Suggest: MERGE / RENAME / DELETE / RESTRUCTURE
4. For merges: gmail_batch_modify_emails to migrate, then gmail_delete_label
5. Use gmail_update_label for renames
6. Present label-analysis report
Reference:
workflows.md
§ Label Hierarchy Best Practices.

标签分类体系分析和清理。
1. gmail_get_labels → 列出所有标签及对应邮件数量
2. 发现问题:
   - 重复/同义词(例如 "work" + "Work" + "work-email")
   - 闲置标签(90天无邮件)
   - 可优化为层级结构的扁平结构
3. 给出建议:合并 / 重命名 / 删除 / 重构
4. 合并操作:调用gmail_batch_modify_emails迁移邮件,然后调用gmail_delete_label
5. 重命名操作调用gmail_update_label
6. 展示标签分析报告
参考文档:
workflows.md
§ 标签层级最佳实践。

Mode: Search

模式:搜索

Natural language → Gmail search query.
Input: user's goal in plain language
Output: optimized Gmail search query with explanation

Steps:
1. Parse intent: who / what / when / status
2. Map to operators: from:, subject:, after:, is:unread, label:, etc.
3. Add negations for common noise
4. Show query + explanation + expected matches
5. Offer to run the search
Reference:
filter-patterns.md
§ Gmail Search Operators.

自然语言→Gmail搜索查询。
输入:用户用自然语言描述的搜索目标
输出:优化后的Gmail搜索查询及解释

步骤:
1. 解析意图:谁 / 什么 / 何时 / 状态
2. 映射到操作符:from:, subject:, after:, is:unread, label: 等
3. 添加常见垃圾邮件的排除规则
4. 展示查询语句+解释+预期匹配结果
5. 提供执行搜索的选项
参考文档:
filter-patterns.md
§ Gmail搜索操作符。

Mode: Senders

模式:发件人管理

VIP and noise sender identification.
1. Sample last 200 inbox emails
2. Compute per sender: volume + engagement + recency
3. VIP candidates: reply rate >50% OR consistently starred
4. Noise candidates: volume >10 AND engagement 0%
5. Present sender report with recommended actions
6. On approval: create VIP filter (always important) or noise filter
Reference:
triage-framework.md
§ Sender Shortcuts,
workflows.md
§ VIP Management.

VIP和垃圾发件人识别。
1. 采样最近200封收件箱邮件
2. 计算每个发件人的指标:邮件数量 + 回复率 + 时效性
3. VIP候选:回复率>50% 或  consistently starred
4. 垃圾发件人候选:邮件数量>10 且 回复率0%
5. 展示发件人报告及推荐操作
6. 获得批准后:创建VIP过滤器(始终标记为重要)或垃圾过滤器
参考文档:
triage-framework.md
§ 发件人快捷方式,
workflows.md
§ VIP管理。

Mode: Digest

模式:摘要生成

Recent important email summary.
1. Search: is:important newer_than:3d (or is:starred OR is:unread is:important)
2. For each: extract sender, subject, 1-line summary
3. Categorize: RESPOND / FYI / READING
4. Present digest report
5. Offer: "open N" | "archive fyi"
Reference:
templates.md
§ Digest.

近期重要邮件摘要。
1. 搜索: is:important newer_than:3d (或 is:starred OR is:unread is:important)
2. 提取每封邮件的发件人、主题、1行摘要
3. 分类:需回复 / 仅供参考 / 待阅读
4. 展示摘要报告
5. 提供选项:"打开第N封" | "归档参考类邮件"
参考文档:
templates.md
§ 摘要。

Mode: Cleanup

模式:清理

Archive candidates and batch archiving.
1. Detect stale inbox items:
   - Read receipts/confirmations: subject:(receipt OR confirmation) older_than:30d
   - Old newsletters: label:_reading/newsletters older_than:30d
   - Expired deferrals: label:_deferred older_than:14d
   - Large threads fully read: is:read has:nouserlabels older_than:60d
2. Show batch-operation-confirmation with samples
3. On approval: gmail_batch_modify_emails (remove INBOX / add archive label)
4. Report: inbox count before → after
Never use
gmail_batch_delete_emails
in cleanup — archive only. Reference:
workflows.md
§ Batch Operations.

识别可归档内容和批量归档。
1. 检测收件箱闲置内容:
   - 已读收据/确认函:subject:(receipt OR confirmation) older_than:30d
   - 旧新闻通讯:label:_reading/newsletters older_than:30d
   - 过期延后邮件:label:_deferred older_than:14d
   - 已读无标签的长线程:is:read has:nouserlabels older_than:60d
2. 展示批量操作确认信息及样本
3. 获得批准后:调用gmail_batch_modify_emails(移除收件箱标签 / 添加归档标签)
4. 报告:收件箱数量 处理前 → 处理后
清理模式下绝对不要使用
gmail_batch_delete_emails
,仅执行归档操作。 参考文档:
workflows.md
§ 批量操作。

Mode: Audit

模式:审计

Full inbox health report.
1. Run Phase 0 discovery (labels, filters, sample)
2. Collect metrics:
   - Inbox count + unread %
   - Filter count + estimated coverage
   - Label count + stale count
   - Newsletter volume
   - VIP / noise distribution
3. Score: 0-100 based on inbox reach rate, filter coverage, label health
4. Identify top 3 quick wins (high impact, low effort)
5. Generate week-by-week action plan
6. Present full-audit report
Reference:
analytics-guide.md
,
templates.md
§ Full Audit.

完整的收件箱健康度报告。
1. 执行阶段0上下文发现(标签、过滤器、样本)
2. 收集指标:
   - 收件箱总数 + 未读占比
   - 过滤器数量 + 预估覆盖率
   - 标签数量 + 闲置标签数量
   - 新闻通讯数量
   - VIP / 垃圾发件人分布
3. 评分:基于收件箱到达率、过滤器覆盖率、标签健康度给出0-100分
4. 识别Top3快速优化项(高收益低投入)
5. 生成逐周行动计划
6. 展示完整审计报告
参考文档:
analytics-guide.md
,
templates.md
§ 完整审计。

Error Handling

错误处理

ScenarioResponse
MCP connection failureReport error, provide manual Gmail URL as fallback
Rate limit (429)Reduce batch size to 25, wait 60s, retry once
Message not found (404)Skip and continue; note in report
Partial batch failureReport succeeded/failed counts; suggest retry for failures
Label ID mismatchRe-fetch labels via
gmail_get_labels
and remap

场景响应
MCP连接失败报告错误,提供手动Gmail链接作为备选方案
限流(429)把批量大小降低到25,等待60秒,重试1次
消息未找到(404)跳过继续执行,在报告中标记
部分批量操作失败报告成功/失败数量,建议对失败项重试
标签ID不匹配重新调用
gmail_get_labels
获取标签并重新映射

Scope Boundaries

适用范围边界

IS for: Gmail triage, inbox zero habits, filter creation, auto-rules, email analytics, newsletter management, label organization, search queries, sender analysis, digest, cleanup, inbox health audit.
NOT for: Composing or sending outbound emails, calendar scheduling, Google Drive, non-Gmail accounts, real-time email monitoring, CRM workflows.

适用场景: Gmail邮件分类、收件箱清零习惯养成、过滤器创建、自动规则、邮件数据分析、新闻通讯管理、标签整理、搜索查询生成、发件人分析、摘要生成、清理、收件箱健康度审计。
不适用场景: 撰写或发送外发邮件、日历日程安排、Google Drive操作、非Gmail账户、实时邮件监控、CRM工作流。

Reference File Index

参考文件索引

FileContentLoad When
references/triage-framework.md
5D+N decision trees, sender/subject signals, batch processingtriage, inbox-zero
references/filter-patterns.md
Gmail operators, filter templates, auto-rule algorithms, learning loopfilters, auto-rules, search
references/workflows.md
Bankruptcy, VIP, batch ops, label hierarchy, unsubscribe, securitycleanup, labels, senders, newsletters
references/templates.md
All confirmation, report, and execution result templatesEvery mode
references/inbox-zero-system.md
Daily/weekly routines, progress schema, bankruptcy recoveryinbox-zero
references/analytics-guide.md
Volume, response time, sender frequency, timing methodologyanalytics, audit
references/tool-reference.md
All 19 Gmail MCP tool signatures, parameters, system limitsWhen selecting tools
Scripts:
ScriptPurposeRun When
scripts/inbox_snapshot.py save --inbox-count N
Save inbox count snapshotAfter each inbox-zero check
scripts/inbox_snapshot.py trend --days 7
Compute inbox trend (growing/stable/declining)During analytics mode
scripts/inbox_snapshot.py list --days 30
List recent snapshotsWhen reviewing progress

文件内容加载时机
references/triage-framework.md
5D+N决策树、发件人/主题信号、批量处理分类、收件箱清零模式
references/filter-patterns.md
Gmail操作符、过滤器模板、自动规则算法、学习循环过滤器、自动规则、搜索模式
references/workflows.md
积压恢复、VIP管理、批量操作、标签层级、退订、安全清理、标签、发件人、新闻通讯模式
references/templates.md
所有确认、报告、执行结果模板所有模式
references/inbox-zero-system.md
每日/每周例行流程、进度结构、积压恢复收件箱清零模式
references/analytics-guide.md
数量、响应时间、发件人频率、时间分析方法数据分析、审计模式
references/tool-reference.md
所有19个Gmail MCP工具签名、参数、系统限制选择工具时
脚本:
脚本用途运行时机
scripts/inbox_snapshot.py save --inbox-count N
保存收件箱数量快照每次收件箱清零检查后
scripts/inbox_snapshot.py trend --days 7
计算收件箱趋势(增长/稳定/下降)数据分析模式期间
scripts/inbox_snapshot.py list --days 30
列出近期快照进度回顾时

Critical Rules

核心规则

  1. Run Phase 0 discovery before any workflow — never assume label/filter state
  2. Confirm all write operations — show scope, count, and reversibility before calling
  3. Batch similar operations — never loop
    gmail_modify_email
    when
    gmail_batch_modify_emails
    applies
  4. Preserve existing taxonomy — suggest improvements, never silently rename
  5. Check filter conflicts before creating — call
    gmail_get_filters
    first
  6. Include confidence scores on all filter/rule suggestions
  7. Provide rollback guidance for every bulk operation
  8. Handle MCP failures gracefully — surface manual fallback steps
  9. Surface unsubscribe links — make newsletter cleanup actionable
  10. Prioritize quick wins — high impact, low effort first in all reports
  11. Update inbox-zero progress after every routine — write streak data to
    ~/.claude/email-whiz/inbox-zero-progress.json
  12. Never use
    gmail_batch_delete_emails
    in cleanup mode — archive only; deletion requires explicit user intent
  1. 任何工作流执行前先运行阶段0上下文发现,绝对不要假设标签/过滤器状态
  2. 所有写操作必须确认,调用前展示范围、数量、可恢复性
  3. 批量执行相似操作,可使用
    gmail_batch_modify_emails
    时绝对不要循环调用
    gmail_modify_email
  4. 保留现有分类体系,仅给出改进建议,绝对不要静默重命名
  5. 创建过滤器前检查冲突,先调用
    gmail_get_filters
  6. 所有过滤器/规则建议必须附带置信度评分
  7. 每个批量操作都提供回滚指导
  8. 优雅处理MCP失败,给出手动备选步骤
  9. 展示退订链接,让新闻通讯清理可执行
  10. 优先展示快速优化项,所有报告优先展示高收益低投入的内容
  11. 每次例行流程后更新收件箱清零进度,将连续打卡数据写入
    ~/.claude/email-whiz/inbox-zero-progress.json
  12. 清理模式下绝对不要使用
    gmail_batch_delete_emails
    ,仅执行归档;删除操作需要用户明确授权