ASP源码
PHP源码
.NET源码
JSP源码
邮件分选(Email Triage)技能是一个强大的自动化工具,旨在通过扫描 IMAP 账户并根据重要性对邮件进行分类来管理高流量收件箱。通过 Ollama 集成本地大语言模型(LLM),它提供智能分类,能够区分紧急故障、需要回复的业务咨询以及一般的通知信息。这使其成为 Openclaw Skills 用户在无需手动筛选的情况下提取关键信息的必备组件。
该技能在构建时充分考虑了可靠性,采用了双层分类系统。它优先尝试高保真 AI 分析,但也包含一个稳健的基于关键词的启发式回退机制,以确保在本地模型离线时系统仍能正常运行。此工具非常适合想要在原始邮件数据与可执行的代理驱动工作流之间建立桥梁的开发人员和高级用户。
下载入口:https://github.com/openclaw/skills/tree/main/skills/briancolinger/email-triage
从源直接安装技能的最快方式。
npx clawhub@latest install email-triage
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 email-triage。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
要开始使用此 Openclaw Skills 技能,请确保您已安装 Python 3.10+ 并准备好 IMAP 凭据。如果使用 Gmail 等提供商,您可能需要应用专用密码。
# 安装先决条件并配置环境变量
export IMAP_HOST='imap.yourserver.com'
export IMAP_USER='yourname@example.com'
export IMAP_PASS='yourpassword'
# 运行初始扫描以分类未读邮件
python3 scripts/email/email-triage.py scan
# 查看紧急邮件报告
python3 scripts/email/email-triage.py report
该技能在本地 JSON 文件中管理其状态,通常位于 ./data/email-triage.json。此文件是所有已处理通信的唯一事实来源。
| 属性 | 类型 | 描述 |
|---|---|---|
category |
字符串 | 优先级标签(urgent, needs-response, informational, spam)。 |
reason |
字符串 | 简要说明邮件为何被归入该类别。 |
surfaced |
布尔值 | 跟踪邮件是否已包含在报告输出中。 |
id |
字符串 | 源自 Message-ID 或内容哈希的唯一标识符。 |
timestamp |
ISO8601 | 邮件最后一次分选的日期和时间。 |
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"]
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.
| 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 |
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 |
EMAIL_TRIAGE_STATE (default: ./data/email-triage.json) — Persistent state file tracking classified emails and surfacing status# 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
report surfaces only unsurfaced urgent and needs-response emails, sorted by priority.mark-surfaced flags reported emails so they won't appear in future reports.scan periodically, then report --json to check for items needing attention.scan → report --json → act on results → mark-surfaced.