SkillsMar 30, 2026·1 min read

Lark CLI Skill: Mail — Email Management

Lark/Feishu CLI skill for email. Draft, send, reply, forward emails. Manage drafts, folders, labels, contacts, and attachments.

TL;DR
An AI agent skill for sending, reading, and managing Lark/Feishu email through the command line.
§01

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.

§02

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.

§03

How to use

  1. Install Lark CLI and skills:

```bash

npm install -g @larksuite/cli

npx skills add larksuite/cli -y -g

```

  1. Authenticate:

```bash

lark-cli config init

lark-cli auth login --recommend

```

  1. Send an email:

```bash

lark-cli mail +send \

--to 'recipient@company.com' \

--subject 'Weekly Report' \

--body 'Please find the attached report.'

```

§04

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:

CommandPurpose
+sendSend an email
+inboxList inbox messages
+getRead a specific message
+searchSearch emails by keyword
+draftCreate a draft email
+foldersList mail folders
§05

Related on TokRepo

§06

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

Can AI agents read and process incoming emails automatically?+

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.

Does the Mail skill support attachments?+

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.

Can I send emails to external recipients outside my Lark workspace?+

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.

How do I handle email threads and replies?+

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.

Is the Mail skill compatible with Feishu in China?+

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)
🙏

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

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets