email-monitor

AI inbox classification + Telegram notification

33 stars

Best use case

email-monitor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

AI inbox classification + Telegram notification

Teams using email-monitor should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/email-monitor/SKILL.md --create-dirs "https://raw.githubusercontent.com/aAAaqwq/AGI-Super-Team/main/skills/email-monitor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/email-monitor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How email-monitor Compares

Feature / Agentemail-monitorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

AI inbox classification + Telegram notification

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Email Monitor

> Automatic pipeline: Gmail -> AI classification -> CRM activities -> PM tasks -> draft replies -> Telegram

## When to use

- "what's new in email?" / "email status"
- "show email summary for today"
- "check email monitor"
- "show draft replies"
- Runs automatically every hour via launchd

## Pipeline

```
email_monitor.py          → Gmail API, extracts full body
    ↓ JSON (stdout)
email_agent.py            → AI classification (claude CLI haiku)
    ↓ actionable emails JSON (stdin)
email_action_agent.py     → CRM + PM + drafts + git commit + Telegram
```

## Paths

| What | Path |
|------|------|
| Monitor tool | `$GOOGLE_TOOLS_PATH/email_monitor.py` |
| Classify agent | `$GOOGLE_TOOLS_PATH/email_agent.py` |
| Action agent | `$GOOGLE_TOOLS_PATH/email_action_agent.py` |
| State | `$GOOGLE_TOOLS_PATH/data/email_monitor_state.json` |
| Summaries | `$GOOGLE_TOOLS_PATH/data/email_summaries/` |
| Drafts | `$GOOGLE_TOOLS_PATH/data/email_drafts/` |
| Agent log | `$GOOGLE_TOOLS_PATH/data/email_agent_log.json` |
| LaunchAgent | `~/Library/LaunchAgents/com.yourcompany.email-monitor.plist` |

## How to run

### Full pipeline

```bash
# Everything automatic: check → classify → CRM → tasks → drafts → notify
$GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_agent.py

# Dry-run (classification without writing records or notifications)
$GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_agent.py --dry-run

# Without AI (rule-based classification)
$GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_agent.py --no-ai
```

### Monitor only (without classification)

```bash
# JSON with full body of each email
$GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_monitor.py

# Human-readable
$GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_monitor.py --pretty

# Reset state (reprocess last 20)
rm $GOOGLE_TOOLS_PATH/data/email_monitor_state.json

# Emails from the last N hours
$GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_monitor.py --since 2h
```

### Action agent only (with prepared JSON)

```bash
# From file
$GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_action_agent.py --file input.json

# Dry-run (shows what it will do, without writing records)
echo '<json>' | $GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_action_agent.py --dry-run

# Without drafts
echo '<json>' | $GOOGLE_TOOLS_PATH/.venv/bin/python3 $GOOGLE_TOOLS_PATH/email_action_agent.py --no-draft
```

### View results

```bash
# Summary for today
cat $GOOGLE_TOOLS_PATH/data/email_summaries/$(date +%Y-%m-%d).md

# Draft replies
ls $GOOGLE_TOOLS_PATH/data/email_drafts/
cat $GOOGLE_TOOLS_PATH/data/email_drafts/2026-02-09_task-055.txt

# launchd status
launchctl list | grep email-monitor
```

## Classification

| Category | Action Agent action |
|----------|---------------------|
| URGENT | Activity + draft |
| REPLY_NEEDED | Activity + draft |
| INFO | Activity only |
| SPAM | Skipped |

> **Note (2026-03-02):** Task creation is DISABLED. Sales follow-ups are tracked in `leads.csv` via `next_action`. pm_tasks is for dev/project tasks only. To re-enable task creation, uncomment the block in `email_action_agent.py` around line 420.

## Action Agent: what it does

1. **Match contact** -- looks up the sender in `people.csv` (email), fallback by domain in `companies.csv`
2. **Log activity** -- adds a row to `activities.csv` (type: email, direction: inbound)
3. ~~**Create task**~~ -- DISABLED. Was: adds a row to `pm_tasks_master.csv`
4. **Draft reply** -- generates a draft via `claude -p --model haiku`, saves to `data/email_drafts/`
5. **Git commit** -- auto-commits in $PROJECT_ROOT (activities only)
6. **Telegram notify** -- summary with drafts to Saved Messages

Unknown contacts are tagged with `unknown-contact` -- need to be added to CRM.

## CRM files (read/write)

- `$CRM_PATH/contacts/people.csv`
- `$CRM_PATH/contacts/companies.csv`
- `$CRM_PATH/activities.csv`

## Related skills

- `email-send-direct` -- single email
- `email-send-bulk` -- mass email sending
- `daily-briefing` -- morning overview (reads email summaries)
- `log-activity` -- manual activity logging
- `telegram-session` -- if Telegram notifications are not working

Related Skills

monitoring-whale-activity

33
from aAAaqwq/AGI-Super-Team

Track large cryptocurrency transactions and whale wallet movements across multiple blockchains. Monitor exchange inflows/outflows, manage watchlists, Track large cryptocurrency transactions and whale wallet movements in real-time. Use when tracking large holder movements, exchange flows, or wallet activity. Trigger with phrases like "track whales", "monitor large transfers", "check whale activity", "exchange inflows", or "watch wallet".

qq-email-operator

33
from aAAaqwq/AGI-Super-Team

QQ邮箱操作技能。支持通过 IMAP/SMTP 读取邮件、搜索邮件、回复邮件、发送邮件。凭据通过 pass 安全存储。

position-monitor

33
from aAAaqwq/AGI-Super-Team

Hourly position monitor — execute take-profit/stop-loss and track peak gains

outbound-email-strategy

33
from aAAaqwq/AGI-Super-Team

Comprehensive outbound email strategy skill for cold outreach, email sequences, and multi-channel campaigns. Use when writing cold emails, creating outreach sequences, optimizing response rates, designing follow-up cadences, or building outbound campaigns. Covers prospecting, personalization frameworks, sequence design, subject lines, response handling, compliance, email design, HTML email templates, email layout, email marketing, newsletter design, drip campaigns, email subject lines, email headers, and cold email templates for discovery calls and SDR workflows.

email-read

33
from aAAaqwq/AGI-Super-Team

Read inbox and sent via Gmail API

email-outreach-run

33
from aAAaqwq/AGI-Super-Team

Automatic email outreach agent run

email-marketing

33
from aAAaqwq/AGI-Super-Team

Email marketing automation - campaign creation, sequence building, A/B testing, deliverability optimization, and analytics

email-manager

33
from aAAaqwq/AGI-Super-Team

多邮箱统一管理与智能助手。支持 Gmail、QQ邮箱等 IMAP 邮箱,定时查看邮件,AI 生成摘要和回复草稿,发送前需用户确认。

email-automation

33
from aAAaqwq/AGI-Super-Team

邮箱自动化:读取、搜索、草拟和发送邮件,支持 Gmail API 以及通用 IMAP/SMTP 流程。

effect-monitoring

33
from aAAaqwq/AGI-Super-Team

Use when monitoring Xiaohongshu marketing campaign performance, tracking promotion effectiveness, analyzing advertising ROI, measuring influencer collaboration results, evaluating activity success rates, or optimizing marketing spend allocation

ct-monitor-skill

33
from aAAaqwq/AGI-Super-Team

> 证书透明度监控——SSL/TLS 证书透明度日志监控与告警

cold-email-sequence-generator

33
from aAAaqwq/AGI-Super-Team

Generate personalized cold email sequences (7-14 emails) with A/B test subject lines, follow-up timing recommendations, and integrated social proof. Creates multi-touch campaigns optimized for response rates. Use when users need outbound email campaigns, sales sequences, or lead generation emails.