email-copilot

Manages inbox by learning preferences, cleaning noise, and prioritizing important work. Use when user asks about emails or inbox management.

16 stars

Best use case

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

Manages inbox by learning preferences, cleaning noise, and prioritizing important work. Use when user asks about emails or inbox management.

Teams using email-copilot 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-copilot/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/business/email-copilot/SKILL.md"

Manual Installation

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

How email-copilot Compares

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

Frequently Asked Questions

What does this skill do?

Manages inbox by learning preferences, cleaning noise, and prioritizing important work. Use when user asks about emails or inbox management.

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

## Critical Rules

1. **ALWAYS** read `.claude/skills/email-copilot/rules.md` before processing ANY emails
2. **ALWAYS** run `date` to get current time before processing (for expiry checks, age calculations)
3. **NEVER** mix email IDs between accounts - IDs are account-specific
4. **ALWAYS** use label names (e.g., "Finance/Receipts"), never internal IDs (e.g., "Label_6")
5. **CHECK** `account` field in output before operations
6. **LOG** all user-confirmed actions to `.claude/skills/email-copilot/action-log.md` — **IMMEDIATELY in the same tool call batch as execution, NOT after**

## CLI Alias

All commands use this base (define once per session):
```bash
EMAIL="uv run --project .claude/skills/email-copilot python .claude/skills/email-copilot/scripts/email_cli.py"
GMAIL="uv run --project .claude/skills/email-copilot python .claude/skills/email-copilot/gmail_client.py"
```

## Quick Reference

```bash
# Accounts
$GMAIL --check                    # Check setup status
$GMAIL --auth <name>              # Add/authenticate account
$EMAIL accounts                   # List accounts

# List & Read
$EMAIL [-a ACCOUNT] list [-n LIMIT] [-q QUERY]
$EMAIL [-a ACCOUNT] read <msg_id>

# Actions
$EMAIL [-a ACCOUNT] trash '<json_id_list>'
$EMAIL [-a ACCOUNT] untrash '<json_id_list>'
$EMAIL [-a ACCOUNT] move <label> '<json_id_list>' [-r] [-c]

# Labels
$EMAIL [-a ACCOUNT] labels list
$EMAIL [-a ACCOUNT] labels create "Name"
$EMAIL [-a ACCOUNT] labels delete "Name"
$EMAIL [-a ACCOUNT] labels rename "Old" "New"

# Send & Reply
$EMAIL [-a ACCOUNT] send --to EMAIL --subject SUBJ --body BODY [--cc CC] [--attachment FILE]
$EMAIL [-a ACCOUNT] reply <msg_id> --body BODY [--cc CC]

# Drafts
$EMAIL [-a ACCOUNT] drafts list
$EMAIL [-a ACCOUNT] drafts create --to EMAIL --subject SUBJ --body BODY
$EMAIL [-a ACCOUNT] drafts reply <msg_id> --body BODY
$EMAIL [-a ACCOUNT] drafts send <draft_id>
$EMAIL [-a ACCOUNT] drafts delete <draft_id>

# Attachments
$EMAIL [-a ACCOUNT] attachments <msg_id>
$EMAIL [-a ACCOUNT] download <msg_id> [-o DIR] [-f FILTER]
$EMAIL [-a ACCOUNT] search-download -q QUERY [-o DIR] [-n LIMIT]

# Filters & Maintenance
$EMAIL [-a ACCOUNT] filters list
$EMAIL [-a ACCOUNT] filters add [--from X] [--add-label Y] [--archive] [--mark-read]
$EMAIL [-a ACCOUNT] summary <label> [-n LIMIT]
$EMAIL [-a ACCOUNT] cleanup <label> [-d DAYS]
```

## Procedure

1. **Check Accounts**: `$EMAIL accounts`
2. **Load Rules**: Read `.claude/skills/email-copilot/rules.md` (MANDATORY)
3. **Review Action Log**: Read `.claude/skills/email-copilot/action-log.md` to identify patterns from recent decisions
4. **Process Each Account**:
   - `$EMAIL -a <account> list -n 100`
   - Apply account-appropriate rules (work: strict cleanup; personal: conservative)
5. **Classify & Execute**:
   - Auto-Trash List matches → `trash`
   - Expired notifications → `trash`
   - Receipts/Statements → `move` to Finance labels
6. **Log Actions**: When user confirms, execute operations AND update `action-log.md` **in the same tool call batch** (parallel Edit + Bash calls)
7. **Report & Evolve**:
   - Group remaining by account AND category
   - Review action log for recurring patterns → propose rule updates
   - Update `rules.md` if user agrees

## Learning & Evolution

When email doesn't match rules:
- **Cold sales** → Propose adding sender to Auto-Trash List
- **New project** → Propose adding Project Keyword
- **Recurring newsletter** → Propose Newsletter category

Always ask user before updating `rules.md`.

## Multi-Account Notes

- Work accounts: Prioritize project emails, strict cleanup
- Personal accounts: Conservative deletions, preserve receipts
- Each operation outputs `account` field to identify mailbox

## Tips

- **Reply-To**: `reply` uses Reply-To header when present (mailing lists)
- **GitHub**: Check snippet for "approved", "lgtm", bot names
- **Safety**: If unsure, list in report instead of trashing
- **Drafts Workflow**: Create draft → User reviews in Gmail → `drafts send` or manual send

## Action Log Format

Log file: `.claude/skills/email-copilot/action-log.md`

```markdown
## YYYY-MM-DD

### Trashed
- [account] sender@example.com - "Subject" (reason: auto-trash match / user confirmed)

### Moved
- [account] sender@example.com - "Subject" → Label/Name

### Kept
- [account] sender@example.com - "Subject" (user decision: reason)

### Patterns Identified
- sender@example.com appeared 3x this week → consider adding to auto-trash
```

Review log before each session to:
1. Identify senders appearing repeatedly → propose Auto-Trash rule
2. Find emails consistently moved to same label → propose filter
3. Track user overrides → adjust rule confidence

## Additional Files

- **First-time setup**: Read `.claude/skills/email-copilot/README.md`
- **Invoice recipes**: Read `.claude/skills/email-copilot/SKILL-RECIPES.md`
- **User rules**: `.claude/skills/email-copilot/rules.md`
- **Action log**: `.claude/skills/email-copilot/action-log.md`

Related Skills

email-triage-draft-replies

16
from diegosouzapw/awesome-omni-skill

Review unread email, categorize it, and draft replies (no sending without approval)

email-extractor

16
from diegosouzapw/awesome-omni-skill

Expert in email content extraction and analysis. **Use whenever the user mentions .eml files, email messages, says "Extract email information", "Using the email information", or requests to extract, parse, analyze, or process email files.** Handles email thread parsing, attachment extraction, and converting emails to structured markdown format for AI processing. (project, gitignored)

copilot-sdk

16
from diegosouzapw/awesome-omni-skill

Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent. **PROACTIVE ACTIVATION**: Auto-invoke when building agentic applications or integrating Copilot SDK. **DETECTION**: Check for @github/copilot-sdk imports, copilot dependencies in package.json/pyproject.toml/go.mod. **USE CASES**: Embedding agents in apps, creating custom tools, implementing streaming, managing sessions, connecting to MCP servers.

awesome-copilot-root-typespec-create-agent

16
from diegosouzapw/awesome-omni-skill

Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot Use when: the task directly matches typespec create agent responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

awesome-copilot-root-mcp-m365-agent-expert

16
from diegosouzapw/awesome-omni-skill

Expert assistant for building MCP-based declarative agents for Microsoft 365 Copilot with Model Context Protocol integration Use when: the task directly matches mcp m365 agent expert responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

awesome-copilot-root-mcp-create-declarative-agent

16
from diegosouzapw/awesome-omni-skill

Skill converted from mcp-create-declarative-agent.prompt.md Use when: the task directly matches mcp create declarative agent responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

awesome-copilot-root-agent-governance

16
from diegosouzapw/awesome-omni-skill

Use when: the task directly matches agent governance responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

github-copilot-cli-expert

16
from diegosouzapw/awesome-omni-skill

Expert knowledge of GitHub Copilot CLI - installation, configuration, usage, custom agents, MCP servers, and version management. Use when asking about copilot cli, copilot commands, installing copilot, updating copilot, copilot features.

verifiedemail-automation

16
from diegosouzapw/awesome-omni-skill

Automate Verifiedemail tasks via Rube MCP (Composio). Always search tools first for current schemas.

jikime-marketing-email

16
from diegosouzapw/awesome-omni-skill

Email marketing and automation specialist for creating email sequences, drip campaigns, lifecycle emails, and nurture flows.

google-email

16
from diegosouzapw/awesome-omni-skill

Manage Gmail email sync, triage, and analysis workflows. Use when user wants to sync emails, triage inbox, check email analysis results, view email statistics, manage the email processing pipeline, find newsletters, check pending emails, or understand email workflow status. Triggers on phrases like "sync my emails", "triage inbox", "email status", "check newsletters", "email analysis", "what emails do I have", "pending emails", "unsubscribe from newsletters".

enginemailer-automation

16
from diegosouzapw/awesome-omni-skill

Automate Enginemailer tasks via Rube MCP (Composio). Always search tools first for current schemas.