# Send email-triage to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "email-triage",
    "name": "email-triage",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/briancolinger/email-triage",
    "canonicalUrl": "https://clawhub.ai/briancolinger/email-triage",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/email-triage",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=email-triage",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/email-triage.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "email-triage",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-04T21:59:08.703Z",
      "expiresAt": "2026-05-11T21:59:08.703Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=email-triage",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=email-triage",
        "contentDisposition": "attachment; filename=\"email-triage-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "email-triage"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/email-triage"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/email-triage",
    "downloadUrl": "https://openagent3.xyz/downloads/email-triage",
    "agentUrl": "https://openagent3.xyz/skills/email-triage/agent",
    "manifestUrl": "https://openagent3.xyz/skills/email-triage/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/email-triage/agent.md"
  }
}
```
## Documentation

### 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

IconCategoryDescription🔴urgentOutages, security alerts, legal, payment failures, time-critical🟡needs-responseBusiness inquiries, questions, action items requiring a reply🔵informationalReceipts, confirmations, newsletters, automated notifications⚫spamMarketing, promotions, unsolicited junk

### Configuration

All configuration is via environment variables:

VariableRequiredDefaultDescriptionIMAP_HOST✅—IMAP server hostnameIMAP_PORT—993IMAP port (SSL)IMAP_USER✅—IMAP username / email addressIMAP_PASS✅—IMAP password or app-specific passwordEMAIL_TRIAGE_STATE—./data/email-triage.jsonPath to the JSON state fileOLLAMA_URL—http://127.0.0.1:11434Ollama API endpointOLLAMA_MODEL—qwen2.5:7bOllama 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

Connects to IMAP over SSL and fetches unread messages (up to 20 per scan).
Deduplicates by Message-ID (or a hash of subject + sender as fallback) so emails are never classified twice.
Classifies each email using Ollama if available, otherwise falls back to keyword heuristics.
Stores state in a local JSON file — tracks category, reason, and whether the email has been surfaced.
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.
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.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: briancolinger
- Version: 1.0.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-04T21:59:08.703Z
- Expires at: 2026-05-11T21:59:08.703Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/email-triage)
- [Send to Agent page](https://openagent3.xyz/skills/email-triage/agent)
- [JSON manifest](https://openagent3.xyz/skills/email-triage/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/email-triage/agent.md)
- [Download page](https://openagent3.xyz/downloads/email-triage)