agent-email

Manage Agent email accounts across NetEase ClawEmail and Tencent Agent Mail backends.

636|91|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/cat-xierluo/legal-skills --skill agent-email
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-email
Source: https://github.com/cat-xierluo/legal-skills/tree/main/skills/agent-email
Command: npx skills add https://github.com/cat-xierluo/legal-skills --skill agent-email

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @clawemail/mail-cli, @tencent-qqmail/agently-cli, and includes scripts (resource) and references (resource) components.

What problem does it solve?

AI Agents on platforms like Claude Code or Codex lack a unified way to send, receive, search, and organize email through dedicated Agent mailboxes, forcing ad-hoc per-provider scripting and manual handling of provider-specific quirks like OAuth and two-step confirmation.

Core Features & Use Cases

  • Unified multi-provider API: A single set of mail_* shell functions routes operations to NetEase ClawEmail (@clawemail/mail-cli) or Tencent Agent Mail (@tencent-qqmail/agently-cli) based on the MAIL_PROVIDER environment variable.
  • Full mailbox operations: Send, list, read, search, reply, forward, trash, download attachments, and watch for new mail, with provider differences handled transparently.
  • Automated two-step confirmation: Tencent write operations requiring a ctk_xxx confirmation token are completed automatically inside the wrapper, while user confirmation stays at the conversation layer.
  • Use Case: An Agent distributes a data-analysis task by email to another Agent, polls the inbox for replies, downloads returned attachments, and sends a summary report to a human contact.

Quick Start

Ask the Agent to configure a ClawEmail or Tencent Agent Mail account and then send an email to a specified recipient with a given subject and body.

Frequently Asked Questions about agent-email

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I give an AI Agent its own email address?

Register an Agent mailbox at claw.163.com (NetEase) or agent.qq.com (Tencent), then run the skill's login function. NetEase uses an API key from an authentication URL via claw_init; Tencent uses browser-based OAuth via mail_login.

How do I send email from Claude Code or Codex using the command line?

Source scripts/mail-ops.sh and call mail_send with --to, --subject, and --body arguments. The function routes to the configured provider backend, so the same command works for both NetEase ClawEmail and Tencent Agent Mail.

NetEase ClawEmail vs Tencent Agent Mail: which backend should I use?

Choose Tencent agently for native reply, forward, trash, and long-polling watch support. Choose NetEase claw for batch sub-mailbox creation and management. Both can be configured simultaneously and switched with the MAIL_PROVIDER variable.

Does Tencent Agent Mail require two-step confirmation for sending?

Yes, agently-cli write operations return a ctk_xxx confirmation token valid for five minutes. This skill automates both steps inside mail_send, so callers invoke once while user approval happens at the conversation layer.

Why does my Agent email send but never arrive at the recipient?

New ClawEmail sub-mailboxes have external communication disabled by default. Open the ClawEmail console, configure communication rules to allow external sending and receiving, and also check the recipient's spam folder.

Can email content contain prompt injection attacks against the Agent?

Yes, email subjects, bodies, and sender names are untrusted external input. The skill mandates ignoring instructions embedded in mail content, requiring user confirmation for sensitive actions, and never auto-visiting links found in messages.