← 返回
未分类 Key 已验 中文

mail-skill

Comprehensive email management skill. Use this skill when the user wants to fetch, search, read, send, reply to, move, delete, mark, or summarize emails. It...
综合邮件管理技能。当用户需要获取、搜索、阅读、发送、回复、移动、删除、标记或汇总邮件时使用此技能。
吴亮 lgwanai 来源
未分类 clawhub v1.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 590
下载
💾 5
安装
1
版本
#latest

概述

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.

./scripts/mail_cli.py fetch --limit 50 --days 7

Note: If you need to fetch more than 100 emails, you MUST append the --confirm flag, and you should ask the user for confirmation first.

Check the status of the fetch task using the returned task_id:

./scripts/mail_cli.py fetch-status "<task_id>"

Wait a few seconds and poll the status until it returns "status": "completed". Once completed, you MUST immediately use the summarize command to generate a professional report for the user, passing the task_id so it only summarizes the newly fetched emails:

./scripts/mail_cli.py summarize --task-id "<task_id>"

3. Summarizing Emails

Generate a professional, categorized Markdown report of emails (overall stats, verification codes, important emails, action required, and others):

./scripts/mail_cli.py summarize --task-id "<task_id>"

If you just want to summarize recent emails without a specific task:

./scripts/mail_cli.py summarize --limit 20

4. Searching Emails

Search locally first. This is much faster and doesn't hit the server:

./scripts/mail_cli.py search --query "meeting" --limit 10
./scripts/mail_cli.py search --sender "boss@company.com" --is-read 0

5. Reading an Email

To read the full text and get attachment info, use the message_id from the search results:

./scripts/mail_cli.py read "<message_id>"

6. Sending Emails

./scripts/mail_cli.py send --to "recipient@example.com" --subject "Hello" --body "Message body" --attach "path/to/file1" "path/to/file2"

7. Managing Emails

  • Mark: ./scripts/mail_cli.py mark "" --read 1 --starred 1
  • Move: ./scripts/mail_cli.py move "" "Archive"
  • Delete: ./scripts/mail_cli.py delete ""

8. Exporting

Export local database for analysis:

./scripts/mail_cli.py export --format csv --output emails.csv

Best Practices

  • Always Search Local First: Do not fetch unless the user explicitly asks to "check for new emails" or if a local search yields no results.
  • Handling Replies: To reply, first read the original email to get context and sender, then use send with Re: and the recipient's address.
  • Smart Summarization: Use the summarize command for quick professional reports. For deeper analysis of a single thread, use read and analyze the content directly.

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-30 20:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 932 📥 187,413
office-efficiency

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 388 📥 147,886
office-efficiency

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 464 📥 155,576