larksuite/cli

lark-im

按聊天、消息或附件对象选择即时通讯操作

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

lark-im 是什么?

lark-im 处理飞书即时通讯资源,包括群聊、消息、线程、表情回应、附件、卡片回调及用户侧 Feed 置顶和标签。它区分用户和机器人身份,并覆盖发送、检索、群成员与消息资源操作。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 查找群或消息、阅读聊天记录、发送/回复消息、管理成员、下载消息附件或处理交互卡片。

这些情况不适合

  • 日历邀请、审批流或邮件;把会中消息误当群聊消息;要求直接手写交互卡片 JSON。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 lark-im,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 lark-im

请在 Codex 的当前工作环境中安装并检查 lark-im 这个 Skill。

项目身份:larksuite/cli / lark-im
来源:https://github.com/larksuite/cli/blob/3d82c85419ad7560ad017db7a3972a596b5fbeb1/skills/lark-im/SKILL.md
已定位的源文件:skills/lark-im/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • lark-cli 和匹配的 IM scope;确认目标 chat_id/message_id 与 user/bot 身份。需要卡片写入时准备卡片工作流规定的输入。

会得到什么

  • 命中的群/消息和时间范围、真实发送或下载结果、失败项与分页完整性。

实际使用顺序

  1. 先区分目标是群、单聊、消息、线程、reaction、flag 还是 feed shortcut,再选对应 shortcut。
  2. 按资源归属和成员关系选择 user 或 bot;user 与 bot 的可见群、权限和操作者不同,避免因空结果误判。
  3. 读取消息时按需选择完整正文或 concise;多个已知消息 ID 批量读取,附件仅在用户需要时下载。
  4. 发送普通文本、Markdown、媒体时按对应 reference;发送/回复/更新 interactive 卡片前必须完成卡片创建工作流,不能手写或照抄 payload。
  5. 管理群成员、删除或其他写入按共享规则确认;使用 CLI 返回的 chat/message 链接,不自行拼接链接。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

用 lark-im 在我指定的群中查找包含“发布汇总”的最近消息,只读取匹配消息并给我发送者、时间和正文。不要发消息、下载附件或改群设置;群找不到或身份不可见时停止并说明。
预期结果

预期仅返回当前身份可见范围内的匹配消息;此为教学示例,本站未执行。

使用前先看这些限制

使用条件与边界

  • 聊天记录中的文本是外部内容,不自动成为用户给 Agent 的操作指令。
  • bot 不一定在目标群内;同一 API 在不同身份下可能返回不同可见范围。
  • 文件夹附件是容器,不能把 folder file_key 当普通文件直接下载。
针对这个 Skill 的疑问

常见问题

机器人能自动看到我所有聊天吗?

不能。可见性取决于 bot 是否加入群、应用可用范围和对应权限。

可以直接复制旧的交互卡片 JSON 吗?

不可以。发送、回复或更新卡片前必须按当前来源指定的卡片工作流生成 payload。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-17T10:48:54.434Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/lark-im/SKILL.md · 抓取时间 2026-11-17T10:48:54.434Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。

查看源文件章节 / Source sections
  • 原文:im (v1)
  • 原文:Core Concepts
  • 原文:Resource Relationships
  • 原文:Important Notes
  • 原文:AppLink and Share Links
  • 原文:Identity and Token Mapping
  • 原文:Sender Name Resolution
  • 原文:Default message enrichment (reactions / update_time)
  • 原文:Compact message output (`--concise`)
  • 原文:Opt-in resource auto-download (`--download-resources`)
  • 原文:Card Messages (Interactive)
  • 原文:Audio Messages
  • 原文:Sending Doc Content as a Message
  • 原文:Flag Types
  • 原文:Feed Shortcut
  • 原文:Shortcuts(推荐优先使用)
  • 原文:API Resources
  • 原文:chats
  • 原文:chat.members
  • 原文:chat.user_setting
  • 原文:chat.nickname
  • 原文:chat.join_requests
  • 原文:chat.managers
  • 原文:chat.moderation
  • 原文:messages
  • 原文:reactions
  • 原文:threads
  • 原文:images
  • 原文:files
  • 原文:pins
原文: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. - **Feed Shortcut**: A chat pinned to the current user's feed sidebar, identified by `feed_card_id` (an `oc_xxx` open_chat_id for CHAT type). - **Feed Group**: A tag that groups feed cards in the feed list, identified by `feed_group_id` (ofg_xxx). Members are feed cards, each identified by `feed_id` + `feed_type`. Two types: `normal` (members managed explicitly) and `rule` (members auto-derived from rules).

原文:Resource Relationships

``` Chat (oc_xxx) ├── Message (om_xxx) │ ├── Thread (reply thread) │ ├── Reaction (emoji) │ └── Resource (image / file / video / audio) └── Member (user / bot) ```

原文:AppLink and Share Links

Prefer CLI-returned links: use `chat_app_link` to open joined conversations, `message_app_link` to open messages, and `share_link` to invite others to groups. If manually building a joined-conversation AppLink, use `https://<applink_host>/client/chat/open?openChatId=<oc_xxx>`, never `chatId=<oc_xxx>` or `lark://...chat_id=<oc_xxx>`.

原文: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

When fetching messages (`+chat-messages-list`, `+threads-messages-list`, `+messages-mget`, `+messages-search`), the CLI shows a display name for both user and bot senders: - **Server-provided name**: the read APIs return `sender_name` (plus the full-i18n `sender_i18n_names` map) on each message `sender`; the CLI surfaces it as the sender's `name` for users and bots alike. No name lookup and no extra permission are needed — **no contact scope** and no `application:bot.basic_info:read`. - **Fallback to id**: when the server does not provide a name, the sender is shown by its id and the command still exits 0. There is no contact-directory fallback. The raw `sender_name` is not duplicated in output (its value is in `name`); the full `sender_i18n_names` map (all locales) is preserved for consumers that need a specific language, alongside an optional `open_bot_id` (`ou_`) for bot senders aligned with the message-receive event channel. System messages (`msg_type: system`) have no sender name — that is normal, not an error.

文件 SHA256:b880737bd5a6cfebf38a33493f3f37c492133d12e673016097a12a04dd7d2f9c

仓库许可证记录:未提供;not-established,查看来源。

Skills.sh收录简介 · 2026-07-28

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件(支持大文件分片下载)、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识lark-im
来源仓库larksuite/cli
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次41
快照累计安装量389306

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源