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
累計下載
3205
星標
2
全站排名
#3,551
全站前 70% · 「辦公效率」前 60%
平台累計安裝累計下載星標評論
ClawHub ↗10431112-
SkillHub ↗10432052—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

該指南描述透過 Ollama 分類郵件,或在其不可用時使用關鍵詞規則作為替代,並將分類及已展示狀態寫入本地 JSON 檔案。它可彙總緊急和需要回復的郵件;郵件內容可能包含敏感資訊,若使用遠端 Ollama 服務也可能離開本機。使用前應確認電子郵件授權、模型服務地址和本地狀態檔案許可權。

資料釋出於 2026-10-29

可以用來做什麼

  • 按類別整理未讀郵件,標出需要及時關注或回覆的專案。
  • 檢視尚未展示的重點郵件報告。
  • 使用 dry-run 預覽分類而不儲存狀態。

什麼時候用

  • 需要整理獲准訪問的 IMAP 收件箱時。
  • 準備將郵件片段傳送給 Ollama 前,需要核實服務端點和資料處理方式時。
  • 在持續掃描前,需要檢查本地儲存位置與保留資料時。

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

對這批已授權郵件進行分類,但不要傳送郵件或採取回復行動。
列出此工具會讀取和儲存的郵件資料,並指出哪些內容可能離開本機。

月度資料趨勢

累計下載3205
1971263432962026-03 · 累計下載 20622026-05 · 累計下載 26422026-06 · 累計下載 27752026-07 · 累計下載 29342026-08 · 累計下載 30132026-09 · 累計下載 320526-0326-09
星標2
1232026-03 · 星標 22026-05 · 星標 22026-06 · 星標 22026-07 · 星標 22026-08 · 星標 22026-09 · 星標 226-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093205—2
2026-083013+2.7%2
2026-072934+5.7%2
2026-062775+5.0%2
2026-052642—2
2026-032062—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),按月更新。口徑說明見資料方法。