mail-skill
Installation
SKILL.md
Mail Management Skill
This skill provides a robust command-line interface (scripts/mail_cli.py) for managing emails across multiple accounts.
Core Capabilities
- Fetch: Retrieve emails via IMAP and save them locally (.eml, .json, and SQLite index). Skips already downloaded emails based on
message_id. - Search: Query the local database for fast retrieval based on sender, subject, content, and date.
- Read: View the full content of an email, including its text and attachment metadata.
- Send/Reply/Forward: Send new emails or reply/forward existing ones via SMTP.
- Manage: Mark as read/starred, move between folders, or delete emails.
- Summarize: Since the skill provides full email text, you (Claude/Trae) can use your own intelligence to summarize the content, extract to-dos, or identify key dates.
Workflow
1. Initial Setup
The user must provide an .env file in the root directory (or use example.env as a template). Ensure python-dotenv, imap-tools, beautifulsoup4 are installed (pip install -r requirements.txt).
2. Fetching Emails
Fetching emails is an asynchronous process because it can take time. When you run the fetch command, it will return a task_id immediately.