Lark CLI Skill: Messenger — Chat & Messages
Lark/Feishu CLI skill for instant messaging. Send/reply messages, manage group chats, search chat history, upload/download media.
Safe staging for this asset
This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.
npx -y tokrepo@latest install 1f1d875f-a85e-45ec-b9ee-f469cb881b39 --target codexStages files first; activation requires review of the staged README and plan.
What it is
The Lark CLI Messenger skill provides instant messaging capabilities for AI coding agents through the Lark/Feishu platform. It enables sending and replying to messages, managing group chats, searching chat history, and handling media uploads and downloads, all from the command line.
This skill is designed for developers and teams using Lark/Feishu who want their AI agents to communicate through the platform without switching to the Lark app.
How it saves time or tokens
Without this skill, interacting with Lark messaging requires the web app or mobile app, breaking your flow during AI-assisted development. The CLI skill lets your AI agent send status updates, ask questions in group chats, or search for past conversations without leaving the terminal. This is particularly useful for automated workflows where an agent needs to notify a team channel about build results or deployment status.
How to use
- Install the Lark CLI and the Messenger skill:
npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g
- Configure authentication (one-time setup):
lark-cli config init
lark-cli auth login --recommend
- Send a message to a chat:
lark-cli messenger send --chat-id oc_xxxxx --text 'Build completed successfully'
Example
Common Messenger skill commands:
# Send a text message
lark-cli messenger send --chat-id oc_xxxxx --text 'Deployment to staging is complete'
# Reply to a specific message
lark-cli messenger reply --message-id om_xxxxx --text 'Acknowledged, reviewing now'
# Search chat history
lark-cli messenger search --chat-id oc_xxxxx --query 'API endpoint'
# List group chats
lark-cli messenger list-chats
# Upload a file to a chat
lark-cli messenger upload --chat-id oc_xxxxx --file ./report.pdf
Related on TokRepo
- Automation tools — Browse tools for automating communication workflows
- AI tools for task management — Explore productivity and task management tools
Common pitfalls
- Not completing the
lark-cli auth loginstep before trying to send messages. Without authentication, all API calls will fail with permission errors. - Using the wrong chat ID format. Lark chat IDs start with
oc_for group chats. Uselark-cli messenger list-chatsto find the correct ID. - Sending too many messages in rapid succession. Lark has API rate limits. Add delays between batch message operations to avoid being throttled.
- Starting with an overly complex configuration instead of defaults. Begin with the minimal setup, verify it works, then customize incrementally. This approach catches configuration errors early and keeps troubleshooting straightforward.
Frequently Asked Questions
Yes. Lark and Feishu are the same platform (Lark is the international version, Feishu is the Chinese version). The CLI skill works with both. You configure the correct endpoint during lark-cli config init.
The skill supports text messages and file uploads. For rich interactive card messages, you would need to use the Lark Open API directly, as card message construction requires JSON templates that are better handled programmatically.
Run lark-cli messenger list-chats to see all group chats your authenticated user belongs to. Each chat shows its ID (starting with oc_), name, and member count.
Yes. Once authentication is configured, the CLI commands can be invoked by any process, including AI agents like Claude Code. The agent can send notifications, search for context in chat history, and respond to messages without human intervention.
Lark text messages have a limit of approximately 4,000 characters. For longer content, consider sending a file attachment or splitting the message into multiple parts.
Citations (3)
- Lark Open Platform— Lark/Feishu is a collaboration platform by ByteDance
- Lark CLI Documentation— Lark CLI provides command-line access to Lark APIs
- Lark API Docs— Lark messaging API documentation
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
Lark CLI Skill: Wiki — Knowledge Base Management
Lark/Feishu CLI skill for knowledge base. Create and manage knowledge spaces, organize document nodes and shortcuts.
Lark CLI Skill: Docs — Document Creation & Editing
Lark/Feishu CLI skill for cloud documents. Create from Markdown, read/update content, insert images, search documents.
Lark CLI Skill: Tasks — Todo & Project Management
Lark/Feishu CLI skill for task management. Create todos, track progress, manage subtasks, assign members, set reminders.
Lark CLI Skill: Mail — Email Management
Lark/Feishu CLI skill for email. Draft, send, reply, forward emails. Manage drafts, folders, labels, contacts, and attachments.