lark-im

Send messages and manage group chats through the Lark OpenAPI.

Updated Jun 29, 2026
One-click install
npx skills add https://github.com/trungpr1990-coder/AMI-MAKEUP --skill lark-im-trungpr1990-coder
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lark-im
Source: https://github.com/trungpr1990-coder/AMI-MAKEUP/tree/main/.agents/skills/lark-im
Command: npx skills add https://github.com/trungpr1990-coder/AMI-MAKEUP --skill lark-im-trungpr1990-coder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? It lets an AI agent operate Lark (Feishu) instant messaging end to end: sending and replying to messages, searching chat history, managing group members, downloading message attachments, and handling interactive card callbacks without manual console work. ## Core Features & Use Cases - Messaging & Search: Send text, markdown, post, media, and interactive card messages; reply in threads; search messages and chats with keyword, sender, and time filters. - Group Administration: Create group or topic chats, list and search chats, manage members, managers, moderation, nicknames, pins, and per-user mute settings. - Resources & Cards: Upload images, download message files with automatic chunked download for large files, manage reactions, bookmarks, feed shortcuts and feed groups, and listen to card.action.trigger callbacks to update cards. - Use Case: Ask the agent to find the "release discussion" group, pull the last 50 messages with attachments downloaded, then post a summary card whose buttons trigger automated follow-up updates. ## Quick Start Ask the agent to send a message saying "Deployment finished" to the Lark group named "release-notices" using the lark-im skill.

Frequently Asked Questions about lark-im

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

FAQPage Schema
How do I send a message to a Lark group chat from the command line?▼

Use the +messages-send shortcut with the target chat_id, for example lark-cli im +messages-send --chat-id oc_xxx --text "hello". If you only know the group name, resolve it first with lark-cli im +chat-search --query "name".

How to search Lark chat history by keyword or sender?▼

Use lark-cli im +messages-search with keyword, sender, chat, and time-range filters; it supports auto-pagination via --page-all. Note this shortcut works only with user identity (--as user), not bot identity.

Should I use --as user or --as bot for Lark IM operations?▼

User identity (user_access_token) acts as the authorized end user and is required for p2p listing, feed shortcuts, and feed groups. Bot identity (tenant_access_token) is required for image upload, message recall in some cases, and urgent messages; it fails when the bot lacks visibility to target users.

Can I download large files from Lark messages?▼

Yes. Use +messages-resources-download, which automatically switches to chunked downloading in 8MB parts for large files and detects the file extension from Content-Type. Alternatively pass --download-resources to message listing commands to fetch all eligible resources at once.

Why do sender names show as open_id instead of display names?▼

This happens under bot identity when the app's visibility range does not cover the message sender, so the contact API returns no name. Fix it by widening the app's visibility in the Developer Console or by fetching messages with --as user.

How do I handle interactive card button clicks in Lark?▼

Listen with lark-cli event consume card.action.trigger --as bot, then update the card via the delayed-update API using the event token. The token is valid for 30 minutes and at most 2 uses, and the update requires the complete new card JSON.