Brian Colinger

email-triage

Officev1.0.1
By Brian ColingerUpdated 2026-05-172 versions · latest released 2026-02-19@clawhub_briancolinger/email-triage
Email#Email

According to AlphaMoat, as of 2026-09, email-triage has 3,205 downloads and 2 stars — ranked #3,551 of 5,078 AI skills overall, and #258 of 435 in Office.

Installs
104
Downloads
3.2K
Stars
2
Overall Rank
#3,551
Top 70% overall · Top 60% in Office
PlatformInstallsDownloadsStarsComments
ClawHub ↗1043.1K2-
SkillHub ↗1043.2K2—

Platforms count differently and update at different times.

What this skill does

The guide describes classifying messages with Ollama or using keyword rules as a fallback, then storing classification and surfaced state in a local JSON file. It can report urgent and response-needed messages. Email may contain sensitive information, and using a remote Ollama service may send excerpts off-device. Before use, confirm mailbox authorization, model endpoint, and permissions on the local state file.

Profile published 2026-10-29

What you can do with it

  • Classify unread email and flag items that need timely attention or a reply.
  • Review a report of important emails that have not yet been surfaced.
  • Preview classification with a dry run without saving state.

When to use it

  • When organizing an authorized IMAP inbox.
  • Before sending email excerpts to Ollama, when the endpoint and data handling need verification.
  • Before recurring scans, when local storage and retention need review.

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Classify this authorized batch of messages without sending email or taking reply actions.
List what email data this tool reads and stores, and identify anything that may leave the device.

Monthly Trend

Downloads3.2K
2.0K2.6K3.3K2026-03 · Downloads 2.1K2026-05 · Downloads 2.6K2026-06 · Downloads 2.8K2026-07 · Downloads 2.9K2026-08 · Downloads 3.0K2026-09 · Downloads 3.2K26-0326-09
Stars2
1232026-03 · Stars 22026-05 · Stars 22026-06 · Stars 22026-07 · Stars 22026-08 · Stars 22026-09 · Stars 226-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.2K—2
2026-083.0K+2.7%2
2026-072.9K+5.7%2
2026-062.8K+5.0%2
2026-052.6K—2
2026-032.1K—2

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 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"]
---
Show all (89 lines)
# 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.

Popular in Office

More from Brian Colinger

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.