Lark CLI Skill: Mail — Email Management
Lark/Feishu CLI skill for email. Draft, send, reply, forward emails. Manage drafts, folders, labels, contacts, and attachments.
What it is
The Mail skill is one of 19 AI agent skills in the Lark CLI toolkit. It gives AI agents command-line access to Lark/Feishu email operations: sending emails, reading inbox messages, managing folders, searching mail, and handling attachments. Lark Mail is the built-in email client of the Lark platform, and this skill makes it programmable from the terminal or through AI agent workflows.
The skill targets teams that use Lark Mail for business communication and want to automate email-related tasks. AI agents can draft and send templated emails, process incoming messages, extract information from email threads, and trigger workflows based on email content, all without opening the email client.
How it saves time or tokens
Email-triggered workflows are common in business: a customer inquiry arrives, someone reads it, routes it to the right team, drafts a response, and follows up. The Mail skill lets AI agents handle the reading, routing, and drafting steps automatically. The agent reads new emails, classifies them by content, drafts appropriate responses, and queues them for human review or sends them directly.
For outbound email, the skill eliminates the manual effort of composing repetitive messages. Meeting follow-ups, report distributions, and notification emails can be generated from templates and sent in bulk through a single CLI command.
How to use
- Install Lark CLI and skills:
```bash
npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g
```
- Authenticate:
```bash
lark-cli config init
lark-cli auth login --recommend
```
- Send an email:
```bash
lark-cli mail +send \
--to 'recipient@company.com' \
--subject 'Weekly Report' \
--body 'Please find the attached report.'
```
Example
Email operations with the Lark CLI:
# Send an email with subject and body
lark-cli mail +send \
--to 'team@company.com' \
--subject 'Sprint 14 Summary' \
--body 'All stories completed. Deployment scheduled for Friday.'
# List recent inbox messages
lark-cli mail +inbox --page-size 10
# Read a specific email
lark-cli mail +get --message-id 'msgXXXX'
# Search emails by keyword
lark-cli mail +search --query 'quarterly review'
Mail skill command summary:
| Command | Purpose |
|---|---|
| +send | Send an email |
| +inbox | List inbox messages |
| +get | Read a specific message |
| +search | Search emails by keyword |
| +draft | Create a draft email |
| +folders | List mail folders |
Related on TokRepo
- AI Tools for Email — Browse AI-powered email tools and automation solutions.
- AI Tools for Automation — Explore automation tools for communication workflows.
Common pitfalls
- Not having the mail permission scope configured in your Lark app. Email operations require specific API permissions. If your app was created without mail scopes, all mail commands will return permission errors. Update your app's permissions in the Lark Open Platform console.
- Sending emails without proper formatting. The CLI sends plain text by default. For HTML-formatted emails, use the --html-body flag or pass HTML content through a content file. Plain text emails may lose formatting that recipients expect in business communication.
- Ignoring rate limits for bulk email sending. Lark enforces per-app sending limits to prevent spam. If you need to send to many recipients, batch your sends and include delays between groups to stay within the rate limits.
Frequently Asked Questions
Yes. The +inbox command lists recent messages, and +get retrieves full email content including subject, body, sender, and attachments. An AI agent can poll the inbox periodically, read new messages, extract relevant information, and trigger downstream workflows like creating tasks or forwarding to the appropriate team.
Yes. When sending emails, you can attach files from the local filesystem or from Lark Drive. When reading emails, attachment metadata (filename, size, type) is included in the response. Downloading attachments requires using the file token returned in the email metadata with the Drive skill's download command.
Yes, provided your Lark workspace has external email configured. The +send command accepts any valid email address. Internal recipients receive the email in their Lark Mail inbox, while external recipients receive it as a standard email. Your Lark domain must have proper DNS records (SPF, DKIM) for external delivery.
When reading an email, the response includes a thread ID that groups related messages. To reply to an email, use the +send command with the --reply-to flag and the original message ID. This ensures the reply appears in the same thread in both the sender's and recipient's mail clients.
Yes. Configure the CLI for the Feishu endpoint during setup. The mail commands work identically on both Lark and Feishu platforms. Email routing and delivery may differ based on regional infrastructure, but the CLI interface and command structure are the same.
Citations (3)
- Lark CLI GitHub Repository— Lark CLI with 19 AI agent skills
- Lark Developer Documentation— Lark Mail API for email operations
- Lark Product Page— Lark Mail product
Related on TokRepo
Source & Thanks
Created by LarkSuite. Licensed under MIT. larksuite/cli — 4,100+ GitHub stars
Part of the Lark CLI Official Skills Collection on TokRepo.
Discussion
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.