Brian Colinger

email-triage

办公效率v1.0.1
作者:Brian Colinger更新于 2026-05-17共 2 个版本 · 最新版本发布于 2026-02-19@clawhub_briancolinger/email-triage
邮件处理#Email

据 AlphaMoat 统计,截至 2026-09,email-triage 累计下载 3,205 次、获 2 个星标,在全部 5,078 个 AI 技能中排名第 3,551 位,在「办公效率」分类(435 个)中排名第 258 位。

累计安装
104
累计下载
3,205
星标
2
全站排名
#3,551
全站前 70% · 「办公效率」前 60%
平台累计安装累计下载星标评论
ClawHub ↗1043,1112-
SkillHub ↗1043,2052—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该指南描述通过 Ollama 分类邮件,或在其不可用时使用关键词规则作为替代,并将分类及已展示状态写入本地 JSON 文件。它可汇总紧急和需要回复的邮件;邮件内容可能包含敏感信息,若使用远程 Ollama 服务也可能离开本机。使用前应确认邮箱授权、模型服务地址和本地状态文件权限。

资料发布于 2026-10-29

可以用来做什么

  • 按类别整理未读邮件,标出需要及时关注或回复的项目。
  • 查看尚未展示的重点邮件报告。
  • 使用 dry-run 预览分类而不保存状态。

什么时候用

  • 需要整理获准访问的 IMAP 收件箱时。
  • 准备将邮件片段发送给 Ollama 前,需要核实服务端点和数据处理方式时。
  • 在持续扫描前,需要检查本地保存位置与保留数据时。

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

对这批已授权邮件进行分类,但不要发送邮件或采取回复行动。
列出此工具会读取和保存的邮件数据,并指出哪些内容可能离开本机。

月度数据趋势

累计下载3,205
1,9712,6343,2962026-03 · 累计下载 2,0622026-05 · 累计下载 2,6422026-06 · 累计下载 2,7752026-07 · 累计下载 2,9342026-08 · 累计下载 3,0132026-09 · 累计下载 3,20526-0326-09
星标2
1232026-03 · 星标 22026-05 · 星标 22026-06 · 星标 22026-07 · 星标 22026-08 · 星标 22026-09 · 星标 226-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,205—2
2026-083,013+2.7%2
2026-072,934+5.7%2
2026-062,775+5.0%2
2026-052,642—2
2026-032,062—2

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.0 KB · ClawHub v1.0.1
---
name: email-triage
version: 1.0.1
description: IMAP email scanning and triage with AI classification via a local Ollama LLM. Scans unread emails, categorizes them as urgent, needs-response, informational, or spam, and surfaces important messages for agent consumption. Works standalone with heuristic fallback — Ollama optional but recommended.
metadata:
  openclaw:
    requires:
      bins: ["python3"]
---
展开全部(共 89 行)
# Email Triage

Scan your IMAP inbox, classify emails into priority categories, and surface the ones that need attention. Uses a local LLM (Ollama) for intelligent classification with a rule-based heuristic fallback when Ollama is unavailable.

## Prerequisites

- **Python 3.10+**
- **IMAP-accessible email account** (Gmail, Fastmail, self-hosted, etc.)
- **Ollama** *(optional)* — for AI-powered classification. Without it, the script uses keyword-based heuristics that still work well for common patterns.

## Categories

| Icon | Category | Description |
|------|----------|-------------|
| 🔴 | `urgent` | Outages, security alerts, legal, payment failures, time-critical |
| 🟡 | `needs-response` | Business inquiries, questions, action items requiring a reply |
| 🔵 | `informational` | Receipts, confirmations, newsletters, automated notifications |
| ⚫ | `spam` | Marketing, promotions, unsolicited junk |

## Configuration

All configuration is via environment variables:

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `IMAP_HOST` | ✅ | — | IMAP server hostname |
| `IMAP_PORT` | — | `993` | IMAP port (SSL) |
| `IMAP_USER` | ✅ | — | IMAP username / email address |
| `IMAP_PASS` | ✅ | — | IMAP password or app-specific password |
| `EMAIL_TRIAGE_STATE` | — | `./data/email-triage.json` | Path to the JSON state file |
| `OLLAMA_URL` | — | `http://127.0.0.1:11434` | Ollama API endpoint |
| `OLLAMA_MODEL` | — | `qwen2.5:7b` | Ollama model for classification |

## Directories Written

- **`EMAIL_TRIAGE_STATE`** (default: `./data/email-triage.json`) — Persistent state file tracking classified emails and surfacing status

## Commands

```bash
# Scan inbox and classify new unread emails
python3 scripts/email/email-triage.py scan

# Scan with verbose output (shows each classification)
python3 scripts/email/email-triage.py scan --verbose

# Dry run — scan and classify but don't save state
python3 scripts/email/email-triage.py scan --dry-run

# Show unsurfaced important emails (urgent + needs-response)
python3 scripts/email/email-triage.py report

# Same as report but JSON output (for programmatic use)
python3 scripts/email/email-triage.py report --json

# Mark reported emails as surfaced (so they don't appear again)
python3 scripts/email/email-triage.py mark-surfaced

# Show triage statistics
python3 scripts/email/email-triage.py stats
```

## How It Works

1. **Connects to IMAP** over SSL and fetches unread messages (up to 20 per scan).
2. **Deduplicates** by Message-ID (or a hash of subject + sender as fallback) so emails are never classified twice.
3. **Classifies** each email using Ollama if available, otherwise falls back to keyword heuristics.
4. **Stores state** in a local JSON file — tracks category, reason, and whether the email has been surfaced.
5. **`report`** surfaces only unsurfaced urgent and needs-response emails, sorted by priority.
6. **`mark-surfaced`** flags reported emails so they won't appear in future reports.
7. **Auto-prunes** state to the most recent 200 entries to prevent unbounded growth.

## Integration Tips

- **Heartbeat / cron:** Run `scan` periodically, then `report --json` to check for items needing attention.
- **Agent workflow:** `scan` → `report --json` → act on results → `mark-surfaced`.
- **Without Ollama:** The heuristic classifier handles common patterns (automated notifications, marketing, urgent keywords) well. Ollama adds nuance for ambiguous emails.
- **App passwords:** If your provider uses 2FA, generate an app-specific password for IMAP access.

「办公效率」分类下的热门技能

Brian Colinger 的其他技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。