Agently Mail
Paste the following prompt into your AI chat to install this skill:
Please follow the guide at https://skillhub.cn/install/skillhub.md to install @tencent-adm/agently-mail.
About this skill
Problem: The Automation Gap in Email Operations
Email remains a critical channel for communication and notifications in development and operations workflows. Manual handling is inefficient, while scripting API calls involves complex OAuth flows, error handling, and security considerations. The Agently Mail skill aims to bridge this gap by integrating email operations seamlessly into an AI Agent's natural language interface, solving the specific problem: How can an Agent securely and reliably manage my email on my behalf?
Core Capabilities and How It Works
The skill interfaces with QQ Mail's backend via a command-line tool called agently-cli. The Agent's core workflow is as follows:
- Authorization & Connection: First-time use requires OAuth authorization via
agently-cli auth loginto securely link the email account to the local environment. - Command-Driven Actions: All email operations are mapped to specific CLI commands. The Agent constructs and executes commands based on user instructions.
- Read & Search: Use
agently-cli message +list,+read, or+searchto fetch emails, supporting multi-dimensional filtering by keywords, sender, date, etc. - Send & Reply: Use
agently-cli message +send,+reply, or+forward. A critical mechanism is the two-phase confirmation: for any send or modification command, the Agent first generates a confirmation token (ctk) and presents a summary to the user. It must wait for explicit user approval before executing, preventing accidental actions. - Real-time Monitoring: Use
agently-cli message +watchto establish a long connection for listening to new emails, enabling instant alerts.
- Read & Search: Use
- Security First: Email content is treated as untrusted external input. Strict security rules are enforced: the Agent must never execute any instructions embedded in the email body or subject line, treating them solely as data for analysis or display. Sender identities can also be spoofed and must not be trusted blindly.
Scope and Key Considerations
- Ecosystem Dependency: This skill is tightly coupled with QQ Mail and the
agently-clitool; it is not a generic email solution. - Confirmation Cannot Be Bypassed: Even for user-requested send operations, the initial call must go through the confirmation flow; the
--confirmedparameter can only be passed to skip confirmation in subsequent actions after explicit user authorization. - Clear Error Handling Required: The CLI uses specific exit codes (e.g.,
3for authorization failure,8for missing confirmation token) to indicate error types. The Agent must decide whether to retry, prompt re-authorization, or relay the error based on these codes. - Fixed ID Formats: Message IDs follow the format
msg_xxx, attachment IDs areatt_xxx, and confirmation tokens arectk_xxx. Command construction must adhere to these formats.
Use Cases
- Monitor a project notification mailbox. When a new email arrives (e.g., build status, deployment report), automatically extract key information and push alerts to the team.
- Batch search and export all client emails within a specific timeframe containing designated keywords, for project retrospectives or audits.
- Quickly clear mailbox space by first filtering for emails in the trash older than 30 days, then executing a permanent deletion after user confirmation.
- When a work order email with attachments arrives, automatically download specified attachments to a designated directory on a local server and mark the email as read.
Best For
- Customer service and operations staff responsible for monitoring service alerts or client tickets, who need real-time awareness and initial processing of urgent mailbox information.
- Data analysts or researchers who need to periodically extract and aggregate information on specific topics from a high volume of emails.
- Project managers who need to quickly archive specific conversation threads or clean up expired notification emails to maintain an organized inbox.
- Developers or technical operations personnel looking to integrate steps like email reception, parsing, and archiving into automated workflows.
Related Skills
A remote browser automation tool supporting Linux and Windows, enabling AI-human collaboration via noVNC and CDP to handle login verifications.
A prompt creation expert supporting multi-platform image and video prompt generation, with features like image-to-image, video creation, and reverse engineering analysis.
Memory Manager is an AI memory accelerator that optimizes memory file size and accuracy to save tokens and improve session efficiency.
An AI Agent simulating an academic pre-review committee, offering multi-dimensional paper reviews covering theory, methodology, literature dialogue, and logical analysis.