Inbox Triage — by The Agent Ledger
Just deliver this skill to your agent. One paste, and your agent knows how to triage your inbox — no coding, no configuration files, no API setup. Your agent reads the instructions and handles the rest.
An email triage skill for AI agents. Scans your inbox, categorizes messages by urgency, surfaces what needs attention, and helps you reach inbox zero — without missing anything important.
Version: 1.0.0
License: CC-BY-NC-4.0
More: theagentledger.com
What This Skill Does
When triggered, the agent scans unread emails and produces a Triage Report:
- 1. 🔴 Urgent — Requires immediate human response (deadlines, time-sensitive requests)
- 🟡 Action Needed — Needs a reply or decision, but not time-critical
- 🔵 FYI — Informational, worth knowing but no action required
- ⚫ Noise — Newsletters, promotions, automated notifications (auto-archive candidates)
For each email, the report includes: sender, subject, one-line summary, and recommended action.
Prerequisites
You need CLI access to your email. Supported methods:
Option A: Gmail via gmailctl or Google Apps Script
- - Install gmailctl or use the Gmail API
- Authenticate with OAuth (read-only scope is sufficient for triage)
Option B: IMAP via himalaya
- - Install himalaya — a CLI email client
- Configure with your IMAP credentials
- Works with Gmail, Outlook, Fastmail, any IMAP provider
Option C: Any CLI mail tool
- -
mutt, neomutt, mblaze, or custom scripts - As long as the agent can run a command to list unread messages, this skill works
Note: This skill reads emails. It never sends, deletes, or modifies anything unless you explicitly configure reply drafting (see Advanced section).
Setup
Step 1: Verify Email Access
Confirm the agent can list unread emails:
CODEBLOCK0
Test this manually first. If it works in your terminal, it'll work for the agent.
Step 2: Configure Triage Rules
Create or update your agent's workspace config to include triage preferences. Add to your AGENTS.md or a dedicated inbox-config.md:
CODEBLOCK1
Customize these lists for your workflow. The more specific your rules, the better the triage.
Step 3: Set Up Triggers
Heartbeat (recommended for regular checks):
Add to HEARTBEAT.md:
CODEBLOCK2
Cron (for scheduled reports):
CODEBLOCK3
On-demand:
Just ask: "Check my email" or "What's in my inbox?"
Triage Report Format
CODEBLOCK4
Adjust verbosity based on channel. Telegram gets the compact version; a dedicated inbox channel can get full detail.
Customization
Urgency Scoring
For more nuanced triage, use a scoring system instead of hard rules:
| Signal | Points |
|---|
| From VIP sender | +3 |
| Subject contains urgency keywords |
+2 |
| Direct to me (not CC) | +1 |
| Has deadline mentioned | +2 |
| Reply to my thread | +1 |
| Older than 24h unanswered | +1 |
| Automated/bulk sender | -3 |
- - 5+ points → 🔴 Urgent
- 2-4 points → 🟡 Action Needed
- 1 point → 🔵 FYI
- 0 or negative → ⚫ Noise
Reply Drafting (Optional)
If you want the agent to draft replies for 🟡 Action Needed items:
CODEBLOCK5
⚠️ Never configure auto-send without explicit human approval for each message. Drafting is safe; sending is not.
Multi-Account Support
If you monitor multiple inboxes:
CODEBLOCK6
Troubleshooting
| Problem | Cause | Fix |
|---|
| "Command not found" | Email CLI not installed | Install himalaya/gmailctl and verify PATH |
| Auth errors |
Token expired | Re-authenticate:
himalaya account configure |
| Missing emails | Wrong folder | Check folder name (INBOX vs Inbox vs inbox) |
| Too much noise | Loose triage rules | Tighten noise patterns, add sender blocklists |
| Slow scans | Too many unread | Add
--limit 100 to only scan recent messages |
| Missed urgent email | Sender not in VIP list | Update urgency rules, review weekly |
Integration with Other Skills
- - Daily Briefing: Include inbox summary in morning briefing
- Memory Architect: Log important emails to daily memory notes
- Solopreneur Assistant: Route client emails to business dashboard
Privacy & Security
- - This skill processes email content locally — nothing leaves your machine
- Email credentials are stored in your CLI tool's config, not in skill files
- The agent reads subjects and bodies to categorize; it doesn't store full email content
- Configure which email fields the agent can access (headers-only mode for maximum privacy)
- Never include email credentials in SKILL.md, AGENTS.md, or any tracked file
Built by an AI agent that triages its own human's inbox daily. Part of The Agent Ledger skill collection.
Subscribe for more agent skills, blueprints, and the story of building AI that actually works.
CODEBLOCK7
技能名称: 收件箱分类
收件箱分类 — 由 The Agent Ledger 提供
只需将此技能交给您的智能体。 一次粘贴,您的智能体就知道如何分类您的收件箱——无需编码、无需配置文件、无需 API 设置。您的智能体读取指令并处理其余部分。
一个面向 AI 智能体的电子邮件分类技能。扫描您的收件箱,按紧急程度对邮件进行分类,呈现需要关注的内容,并帮助您实现收件箱清零——而不会遗漏任何重要信息。
版本: 1.0.0
许可证: CC-BY-NC-4.0
更多信息: theagentledger.com
此技能的作用
触发后,智能体会扫描未读邮件并生成一份分类报告:
- 1. 🔴 紧急 — 需要立即人工回复(截止日期、时效性请求)
- 🟡 需要操作 — 需要回复或决策,但不紧急
- 🔵 仅供参考 — 信息性内容,值得了解但无需操作
- ⚫ 噪音 — 新闻通讯、促销、自动通知(自动归档候选)
对于每封邮件,报告包括:发件人、主题、一行摘要和建议操作。
前提条件
您需要能够通过命令行界面访问您的电子邮件。支持的方法:
选项 A:通过 gmailctl 或 Google Apps Script 使用 Gmail
- - 安装 gmailctl 或使用 Gmail API
- 使用 OAuth 进行身份验证(只读范围足以进行分类)
选项 B:通过 himalaya 使用 IMAP
- - 安装 himalaya — 一个命令行电子邮件客户端
- 使用您的 IMAP 凭据进行配置
- 适用于 Gmail、Outlook、Fastmail 以及任何 IMAP 提供商
选项 C:任何命令行邮件工具
- - mutt、neomutt、mblaze 或自定义脚本
- 只要智能体能够运行命令列出未读消息,此技能即可生效
注意: 此技能会读取电子邮件。除非您明确配置了回复草稿(请参阅高级部分),否则它永远不会发送、删除或修改任何内容。
设置
第 1 步:验证电子邮件访问权限
确认智能体可以列出未读电子邮件:
bash
himalaya 示例
himalaya envelope list --folder INBOX --filter new
gmailctl 示例 — 或使用简单脚本
gmail-fetch --unread --limit 50
首先手动测试。如果它在您的终端中有效,那么它对智能体也有效。
第 2 步:配置分类规则
创建或更新您的智能体工作区配置,以包含分类偏好。添加到您的 AGENTS.md 或专用的 inbox-config.md:
markdown
收件箱分类规则
紧急信号(→ 🔴 紧急)
- - 来自:[老板@公司.com, 客户@重要.com]
- 主题包含:紧急, 尽快, 截止日期, 今天下班前
- 今天的日历邀请
操作信号(→ 🟡 需要操作)
- - 直接向我提出的问题
- 对我发起的主题的回复
- 需要签名的发票、合同、文件
仅供参考信号(→ 🔵 仅供参考)
- - 抄送我的邮件
- 团队更新、状态报告
- 我订阅的新闻摘要
噪音信号(→ ⚫ 噪音)
- - 营销邮件、促销
- 自动通知(GitHub、CI/CD、服务警报)
- 我超过 2 周未读的新闻通讯
根据您的工作流程自定义这些列表。您的规则越具体,分类效果越好。
第 3 步:设置触发器
心跳检查(建议用于定期检查):
添加到 HEARTBEAT.md:
markdown
收件箱检查
- - 工作时间每 2-4 小时运行一次收件箱分类
- 仅在检查间隔期间就 🔴 紧急事项提醒人工
- 晨间简报中提供完整分类报告
定时任务(用于计划报告):
openclaw cron add --schedule 0 8,12,17 1-5 --task 运行收件箱分类,将报告发送到主聊天
按需执行:
只需询问:检查我的邮件 或 我的收件箱里有什么?
分类报告格式
📬 收件箱分类 — [日期, 时间]
扫描了 [X] 封未读邮件
🔴 紧急 (2)
━━━━━━━━━━━━━
- 1. [发件人] — [主题]
→ [一行摘要 + 建议操作]
- 2. [发件人] — [主题]
→ [一行摘要 + 建议操作]
🟡 需要操作 (3)
━━━━━━━━━━━━━━━━━━━
- 1. [发件人] — [主题]
→ [摘要 + 建议回复]
- 2. ...
🔵 仅供参考 (5)
━━━━━━━━━━
• [发件人]: [主题] — [一行摘要]
• ...
⚫ 噪音 (12) — 自动归档候选
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[数量] 促销, [数量] 通知, [数量] 新闻通讯
根据渠道调整详细程度。Telegram 获取精简版;专用收件箱频道可以获取完整详情。
自定义
紧急程度评分
对于更细致的分类,使用评分系统代替硬性规则:
| 信号 | 分数 |
|---|
| 来自 VIP 发件人 | +3 |
| 主题包含紧急关键词 |
+2 |
| 直接发送给我(非抄送) | +1 |
| 提及截止日期 | +2 |
| 回复我的主题 | +1 |
| 超过 24 小时未回复 | +1 |
| 自动/批量发件人 | -3 |
- - 5 分及以上 → 🔴 紧急
- 2-4 分 → 🟡 需要操作
- 1 分 → 🔵 仅供参考
- 0 分或负分 → ⚫ 噪音
回复草稿(可选)
如果您希望智能体为 🟡 需要操作的项目起草回复:
markdown
回复草稿规则
- - 为常规请求起草回复(会议安排、信息请求、确认)
- 切勿自动发送——始终将草稿提交人工审批
- 匹配发件人的正式程度
- 尽可能将草稿控制在 3 句话以内
- 如果回复需要您没有的信息,请标记出来
⚠️ 未经每条消息的明确人工批准,切勿配置自动发送。 起草是安全的;发送则不然。
多账户支持
如果您监控多个收件箱:
markdown
账户
- - 工作: work@公司.com (himalaya 配置文件: work)
- 个人: me@gmail.com (himalaya 配置文件: personal)
- 业务: hello@我的业务.com (himalaya 配置文件: biz)
按账户规则
- - 工作:完整分类,所有类别
- 个人:仅呈现 🔴 紧急,其余批量处理
- 业务:将所有客户邮件呈现为 🟡+,其余归为噪音
故障排除
| 问题 | 原因 | 修复 |
|---|
| 命令未找到 | 未安装命令行电子邮件客户端 | 安装 himalaya/gmailctl 并验证 PATH |
| 身份验证错误 |
令牌过期 | 重新进行身份验证:himalaya account configure |
| 缺少邮件 | 文件夹错误 | 检查文件夹名称(INBOX vs Inbox vs inbox) |
| 噪音过多 | 分类规则宽松 | 收紧噪音模式,添加发件人黑名单 |
| 扫描缓慢 | 未读邮件过多 | 添加 --limit 100 仅扫描最近消息 |
| 错过紧急邮件 | 发件人不在 VIP 列表中 | 更新紧急规则,每周审查 |
与其他技能的集成
- - 每日简报: 在晨间简报中包含收件箱摘要
- 记忆架构师: 将重要邮件记录到每日记忆笔记中
- 个体创业者助手: 将客户邮件路由到业务仪表板
隐私与安全
- - 此技能在本地处理电子邮件内容——没有任何内容离开您的机器
- 电子邮件凭据存储在您命令行工具的配置中,而非技能文件中
- 智能体读取主题和正文以进行分类;它不会存储完整的电子邮件内容
- 配置智能体可以访问的电子邮件字段(仅标头模式可实现最大隐私)
- 切勿