
Lark Im
Let your coding agent send Feishu/Lark messages, search chats, manage groups, and move files through lark-cli while you build team-facing automations.
Overview
Lark IM is an agent skill for the Build phase that sends and manages Feishu/Lark messages, group chats, and chat files via lark-cli.
Install
npx skills add https://github.com/larksuite/cli --skill lark-imWhat is this skill?
- Send, reply, and search messages across P2P and group chats (text, post, image, file, cards, and more types)
- Manage chats: members, search, create group or topic groups, threads, reactions, and flags
- Upload and download images and files including large-file chunked download
- Requires lark-cli binary; must read lark-shared SKILL.md first for auth and permission handling
- Supports --as user (user_access_token) vs --as bot (tenant_access_token) identity modes
- Skill version 1.0.0 (im v1)
- Documents large-file chunked download for chat attachments
Adoption & trust: 210k installs on skills.sh; 13.7k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need your agent to message teammates, search Lark chat history, or pull files from a group without hand-rolling OAuth and IM API calls.
Who is it for?
Builders shipping bots or internal tools on Lark/Feishu who want agent-driven messaging and file workflows with lark-cli.
Skip if: Teams not on Lark/Feishu, Slack-only stacks, or workflows that only need docs/calendar without IM (use other Lark module skills).
When should I use this skill?
User needs to send or reply to Lark messages, search chats, manage groups or members, upload/download IM files, or handle reactions and flags—after lark-shared auth is loaded.
What do I get? / Deliverables
Your agent can perform IM operations—send/reply, search, group management, and media transfer—using documented lark-cli patterns after shared Lark auth is configured.
- Sent or replied messages
- Chat search results
- Downloaded chat images or files
Recommended Skills
Journey fit
Instant messaging integration is built while wiring product and agent workflows to external collaboration systems. Integrations is the shelf for Lark IM APIs—messages, chats, threads, reactions, and file resources via lark-cli.
How it compares
Lark-specific IM integration via CLI—not a generic webhook notifier or MCP server catalog entry.
Common Questions / FAQ
Who is lark-im for?
Solo and indie developers building on Feishu/Lark who want their coding agent to operate IM—messages, groups, threads, and files—through lark-cli.
When should I use lark-im?
Use it in Build while wiring agent notifications, support bots, or ops scripts to Lark; in Grow when automating support replies in group chats; and in Operate when pulling incident threads or files from on-call groups.
Is lark-im safe to install?
It can send messages and access chat content with user or bot tokens, so scope and identity matter. Review the Security Audits panel on this page and follow lark-shared auth guidance before granting production chat access.
SKILL.md
READMESKILL.md - Lark Im
# im (v1) **CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../lark-shared/SKILL.md`](../lark-shared/SKILL.md),其中包含认证、权限处理** ## Core Concepts - **Message**: A single message in a chat, identified by `message_id` (om_xxx). Supports types: text, post, image, file, audio, video, sticker, interactive (card), share_chat, share_user, merge_forward, etc. - **Chat**: A group chat or P2P conversation, identified by `chat_id` (oc_xxx). - **Thread**: A reply thread under a message, identified by `thread_id` (om_xxx or omt_xxx). - **Reaction**: An emoji reaction on a message. - **Flag**: A bookmark on a message or thread. ## Resource Relationships ``` Chat (oc_xxx) ├── Message (om_xxx) │ ├── Thread (reply thread) │ ├── Reaction (emoji) │ └── Resource (image / file / video / audio) └── Member (user / bot) ``` ## Important Notes ### Identity and Token Mapping - `--as user` means **user identity** and uses `user_access_token`. Calls run as the authorized end user, so permissions depend on both the app scopes and that user's own access to the target chat/message/resource. - `--as bot` means **bot identity** and uses `tenant_access_token`. Calls run as the app bot, so behavior depends on the bot's membership, app visibility, availability range, and bot-specific scopes. - If an IM API says it supports both `user` and `bot`, the token type changes who the operator is. The same API can succeed with one identity and fail with the other because owner/admin status, chat membership, tenant boundary, or app availability are checked against the current caller. ### Sender Name Resolution with Bot Identity When using bot identity (`--as bot`) to fetch messages (e.g. `+chat-messages-list`, `+threads-messages-list`, `+messages-mget`), sender names may not be resolved (shown as open_id instead of display name). This happens when the bot cannot access the user's contact info. **Root cause**: The bot's app visibility settings do not include the message sender, so the contact API returns no name. **Solution**: Check the app's visibility settings in the Lark Developer Console — ensure the app's visible range covers the users whose names need to be resolved. Alternatively, use `--as user` to fetch messages with user identity, which typically has broader contact access. ### Card Messages (Interactive) Card messages (`interactive` type) are not yet supported for compact conversion in event subscriptions. The raw event data will be returned instead, with a hint printed to stderr. ### Flag Types Flags support two layers: - **Message-layer flag**: `(ItemTypeDefault, FlagTypeMessage)` — regular message bookmark - **Feed-layer flag**: `(ItemTypeThread/ItemTypeMsgThread, FlagTypeFeed)` — thread as feed-layer bookmark Item types for feed-layer flags: - **ItemTypeThread** (4) = thread in a topic-style chat - **ItemTypeMsgThread** (11) = thread in a regular chat ## Shortcuts(推荐优先使用) Shortcut 是对常用操作的高级封装(`lark-cli im +<verb> [flags]`)。有 Shortcut 的操作优先使用。 | Shortcut | 说明 | |----------|------| | [`+chat-create`](references/lark-im-chat-create.md) | Create a group chat or topic chat; user/bot; --chat-mode group|topic; private/public; invites users/bots; optionally sets bot manager | | [`+chat-list`](references/lark-im-chat-list.md) | List groups the current user/bot is a member of; user/bot; supports sorting, pagination, and --exclude-muted (user identity only) | | [`+chat-messages-list`](references/lark-im-chat-messages-list.md) | List messages in a chat or P2P conversation; user/bot; accepts --chat-id or --user-id, resolves P2P chat_id, supports time range/sort/pagination | | [`+chat-search`](references/lark-im-chat-search.md) | Search visible group chats by --query keyword and/or --member-ids; user/bot; e.g. l