email-triage
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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/briancolinger/email-triageEmail 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
# 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
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-briancolinger-email-triage": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
pr-reviewer
Automated GitHub PR code review with diff analysis, lint integration, and structured reports. Use when reviewing pull requests, checking for security issues, error handling gaps, test coverage, or code style problems. Supports Go, Python, and JavaScript/TypeScript. Requires `gh` CLI authenticated with repo access.
dreaming
Creative exploration during quiet hours. Turns idle heartbeat time into freeform thinking — hypotheticals, future scenarios, reflections, unexpected connections. Use when you want your agent to do something meaningful during low-activity periods instead of just returning HEARTBEAT_OK. Outputs written to files for human review later (like remembering dreams in the morning).
aws-ecs-monitor
AWS ECS production health monitoring with CloudWatch log analysis — monitors ECS service health, ALB targets, SSL certificates, and provides deep CloudWatch log analysis for error categorization, restart detection, and production alerts.