# Email Assistant

> Email Assistant is an Agent Skill for apps & automation published in the fuyuxiang/echo-agent repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Read, search, draft, and send emails via Himalaya CLI or Python IMAP/SMTP. Requires email account configuration.

- Skill name: `email-assistant`
- Category: [Apps & Automation](https://www.openparable.com/skill/apps-automation/1)
- Source: https://github.com/fuyuxiang/echo-agent/blob/HEAD/skills/productivity/email-assistant/SKILL.md
- Repository: fuyuxiang/echo-agent (643 GitHub stars when collected)

## SKILL.md

# Email Assistant

Two options: Himalaya CLI (modern, Rust-based) or Python imaplib fallback.

## Option A: Himalaya (Recommended)

```bash
brew install himalaya  # or cargo install himalaya
himalaya account configure
```

### Read

```bash
himalaya envelope list
himalaya envelope list --folder INBOX --page-size 10
himalaya message read <id>
```

### Search

```bash
himalaya envelope list --folder INBOX subject "weekly report"
himalaya envelope list from "boss@company.com"
```

### Send

```bash
himalaya message write
# Or via template:
himalaya template write | himalaya message send
```

### Reply/Forward

```bash
himalaya message reply <id>
himalaya message forward <id>
```

## Option B: Python Fallback

Environment variables:
```bash
export ECHO_EMAIL_HOST=imap.gmail.com
export ECHO_EMAIL_USER=user@gmail.com
export ECHO_EMAIL_PASS=app-password
export ECHO_SMTP_HOST=smtp.gmail.com
export ECHO_SMTP_PORT=587
```

```bash
python3 scripts/email_client.py list --host imap.example.com --user me@example.com --password xxx --count 10
python3 scripts/email_client.py search --host imap.example.com --user me@example.com --password xxx "urgent"
python3 scripts/email_client.py send --smtp-host smtp.example.com --user me@example.com --password xxx --to "a@b.com" --subject "Hi" --body "Content"
```

## Common Workflows

- Morning email digest: fetch unread, summarize subjects
- Draft reply: compose response based on context
- Search by sender/date/subject

## Security

- Store credentials in environment variables, never in chat
- Use app-specific passwords (Gmail requires this)
- Consider OAuth2 for production use

---

Source: https://www.openparable.com/skill/apps-automation/email-assistant (OpenParable). Cite the canonical URL above.
