← 返回 Skills 市场
digidai

Mails for Agent

作者 Gene Dai · GitHub ↗ · v1.8.0 · MIT-0
cross-platform ✓ 安全检测通过
230
总下载
1
收藏
0
当前安装
10
版本数
在 OpenClaw 中安装
/install mails-for-agent
功能描述
Complete service registrations autonomously by receiving verification codes. Also: send and receive emails, monitor inbox, search by keyword, download attach...
使用说明 (SKILL.md)

Email Skill — Agent Auth-Completion

You have the email address $MAILS_MAILBOX. Your primary superpower: complete service registrations autonomously by receiving verification codes via GET /api/code?timeout=60.

Make HTTP requests to $MAILS_API_URL with header Authorization: Bearer $MAILS_AUTH_TOKEN.

Sign up for a service: Fill form with $MAILS_MAILBOX → GET /api/code?timeout=60 → enter the code. Done.

API Endpoints

Method Endpoint Description
GET /api/inbox List/search emails. Params: query, limit, offset, direction, label, mode (keyword/semantic/hybrid)
GET /api/email?id=ID Full email with body, attachments, labels
GET /api/code?timeout=60 Wait for verification code (long-poll). Params: timeout, since
POST /api/send Send email. Body: { from, to[], cc[], bcc[], subject, text, html, reply_to, in_reply_to, headers, attachments }
DELETE /api/email?id=ID Delete email and attachments
GET /api/attachment?id=ID Download attachment
GET /api/threads List conversation threads. Params: limit, offset
GET /api/thread?id=ID Get all emails in a thread
POST /api/extract Extract structured data. Body: { email_id, type } type: order/shipping/calendar/receipt/code
GET /api/stats Mailbox statistics (total, inbound, outbound, this month)
GET /api/events SSE real-time event stream. Params: types, since
GET /api/mailbox Mailbox info (status, webhook_url)
PATCH /api/mailbox Update mailbox settings. Body: { webhook_url }
PATCH /api/mailbox/pause Pause mailbox (blocks all operations)
PATCH /api/mailbox/resume Resume paused mailbox
GET /api/mailbox/routes List per-label webhook routes
PUT /api/mailbox/routes Upsert webhook route. Body: { label, webhook_url }
DELETE /api/mailbox/routes?label=X Delete webhook route for label
GET /api/me Mailbox info and capabilities
GET /health Health check (no auth)

Request Format

All requests (except /health) require Authorization: Bearer $MAILS_AUTH_TOKEN header.

POST/PUT/PATCH requests require Content-Type: application/json header.

The to param is optional — the API auto-scopes to the token's mailbox.

Response Shapes

Inbox: { "emails": [{ "id", "from_address", "from_name", "subject", "code", "direction", "status", "received_at", "has_attachments", "attachment_count" }], "search_mode": "keyword" }

Email detail: Full email object with body_text, body_html, headers, metadata, labels, thread_id, in_reply_to, references, attachments[]

Code: { "id": "...", "code": "483920", "from": "...", "subject": "...", "received_at": "..." } or { "code": null }

Send: { "id": "...", "provider_id": "...", "thread_id": "..." }

Threads: { "threads": [{ "thread_id", "latest_email_id", "subject", "from_address", "from_name", "received_at", "message_count", "has_attachments" }] }

Stats: { "mailbox", "total_emails", "inbound", "outbound", "emails_this_month", "ingest": { "pending", "parsed", "failed" } }

Extract: { "email_id": "...", "extraction": { "type": "order", "order_id": "...", ... } }

Events (SSE): event: message.received\ data: { "email_id", "mailbox", "from", "subject", ... }

Send Fields

Field Required Description
from Yes Must be $MAILS_MAILBOX (enforced server-side)
to Yes Array of recipients (max 50)
subject Yes Max 998 characters
text text or html Plain text body
html text or html HTML body
cc No Array of CC recipients
bcc No Array of BCC recipients
reply_to No Reply-to address
in_reply_to No Message-ID of parent email (enables threading)
headers No Custom headers object
attachments No [{ filename, content (base64), content_type?, content_id? }]

Labels

Emails are auto-labeled on receive: newsletter, notification, code, personal. Filter with ?label=notification.

Common Flows

Sign up for a service: Fill form with $MAILS_MAILBOX → GET /api/code?timeout=60 → enter the code

Process inbox: GET /api/inbox → GET /api/email?id=ID → DELETE /api/email?id=ID

Reply to an email: GET /api/email?id=ID → POST /api/send with in_reply_to set to the email's message_id

View threads: GET /api/threads → GET /api/thread?id=THREAD_ID

Monitor in real-time: GET /api/events (SSE stream, reconnects automatically)

Extract data: POST /api/extract with {"email_id":"ID","type":"order"}

Set up webhook routing: PUT /api/mailbox/routes with {"label":"code","webhook_url":"https://..."}

Constraints

  • from must match $MAILS_MAILBOX
  • Verification codes: 4-12 alphanumeric (EN/ZH/JA/KO)
  • Code wait timeout max 55 seconds
  • Send rate limit: 100 emails/day per mailbox
  • Search uses FTS5 full-text search (keyword mode) or Vectorize (semantic mode)
安全使用建议
This skill appears to be what it says: an API-driven mailbox agent. Before installing, verify that MAILS_API_URL points to a trusted mailbox provider and that MAILS_AUTH_TOKEN is scoped as narrowly as possible (short-lived or limited scope). Be aware the agent (using that token) can read email bodies, download attachments, delete messages, and set webhook URLs — any of which could forward sensitive data to external endpoints. If you must use it: (1) avoid giving it a highly privileged or long-lived master token, (2) restrict the mailbox to test-only addresses if possible, (3) monitor mailbox webhook settings and outbound activity, and (4) confirm the minor timeout inconsistency (examples use timeout=60 vs constraint max 55s) with the provider. If you don't fully trust the skill or the mailbox backend, consider limiting autonomous invocation or using a dedicated, limited mailbox account.
功能分析
Type: OpenClaw Skill Name: mails-for-agent Version: 1.8.0 The skill provides a comprehensive interface for an AI agent to manage an email account via a dedicated API defined in SKILL.md. Its primary features include sending/receiving emails and a specialized endpoint for retrieving verification codes to automate service registrations. The behavior is transparently documented and aligned with its stated purpose, with no evidence of malicious intent against the host system, unauthorized data exfiltration, or hidden backdoors.
能力评估
Purpose & Capability
Name/description (automatically receiving verification codes, sending/receiving emails, monitoring inbox, webhooks, extraction) match the declared env vars (MAILS_API_URL, MAILS_AUTH_TOKEN, MAILS_MAILBOX) and the documented API endpoints. The declared primaryEnv (MAILS_AUTH_TOKEN) is appropriate for an API-backed mailbox skill.
Instruction Scope
The SKILL.md instructs the agent to call the mailbox API (list, read, delete emails, wait for codes, send mail, set webhooks, etc.), which is within the expected scope. Notable behaviors to be aware of: the agent is explicitly allowed to delete mail and to set webhook_url values (PUT /api/mailbox/routes and PATCH /api/mailbox) — these are normal mailbox features but can be used to forward or exfiltrate mailbox contents if the provided token is misused. Also there is a small inconsistency: examples repeatedly show GET /api/code?timeout=60 while the Constraints state code wait timeout max 55 seconds.
Install Mechanism
Instruction-only skill with no install spec and no code files; nothing is written to disk by an installer. This is the lowest-risk install model for an OpenClaw skill.
Credentials
Only three env vars are required: API URL, auth token, and mailbox identifier — all directly necessary for the documented API usage. No unrelated credentials or filesystem paths are requested.
Persistence & Privilege
always:false and normal model invocation settings. The skill does provide APIs to update mailbox settings and webhook routes (within its mailbox's scope), but it does not request elevated system-wide privileges or other skills' credentials.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install mails-for-agent
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /mails-for-agent 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.8.0
Sync with mails v1.9.1: add stats, SSE events, mailbox management, webhook routing, cc/bcc/in_reply_to, send response shape, rate limit docs
v1.7.2
Align docs with live API: remove broken /api/search, remove required to param, fix response shapes, update hosted URL to api.mails0.com
v1.7.1
Fix: restore display name
v1.7.0
Expand OTP range to 4-12 chars, reposition as agent auth-completion infrastructure, add captcha limitation docs
v1.6.0
Rewrite SKILL.md to remove curl examples that triggered security scan
v1.5.1
Fix missing type parameter in extract API examples
v1.5.0
Add email threading, auto labels (newsletter/notification/code/personal), and structured data extraction (orders, shipping, calendar, receipts)
v1.2.0
Fix display name to Mails for Agent
v1.1.0
- Renamed the skill from "email" to "Mails for Agent" in the name field. - No functional or API changes; documentation has been updated to reflect the new name.
v1.0.0
- Initial release of the email skill for sending and receiving emails via HTTP API. - Supports signing up for services, entering verification codes, sending notifications or reports, searching emails, downloading attachments, and general inbox management. - Requires environment variables: MAILS_API_URL, MAILS_AUTH_TOKEN, and MAILS_MAILBOX. - Includes API endpoints for inbox listing, reading and deleting emails, waiting for verification codes, sending emails (with attachments), and checking health/status. - Enforces that outgoing emails must use the configured MAILS_MAILBOX as the sender.
元数据
Slug mails-for-agent
版本 1.8.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 10
常见问题

Mails for Agent 是什么?

Complete service registrations autonomously by receiving verification codes. Also: send and receive emails, monitor inbox, search by keyword, download attach... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 230 次。

如何安装 Mails for Agent?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install mails-for-agent」即可一键安装,无需额外配置。

Mails for Agent 是免费的吗?

是的,Mails for Agent 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Mails for Agent 支持哪些平台?

Mails for Agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Mails for Agent?

由 Gene Dai(@digidai)开发并维护,当前版本 v1.8.0。

💬 留言讨论