技能版本 1.0.0

lark-im

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

价格

免费

  • 安装:免费

在组织开通时一次性收取;再次读取清单或下载不重复收费。

以上为公开标价。你的组织可能有协议价,以控制台显示的价格为准。

如何使用

  1. 为组织安装

    开通即安装:组织固定使用开通时的版本(当前为 1.0.0)。升级到新版本需要取消后重新开通。

  2. 创建凭证

    客户端使用组织凭证读取;绑定到数字人后,数字人使用绑定凭证按需加载。请求中携带:

    Authorization: Bearer $ZGI_MARKET_KEY

  3. 读取清单与安装包

    清单列出版本、文件和校验值;安装包是一个 zip 文件。

    读取清单
    curl "https://market-api.zgi.im/v1/market/skills/lark-im/manifest" \
      -H "Authorization: Bearer $ZGI_MARKET_KEY"
    下载安装包
    curl "https://market-api.zgi.im/v1/market/skills/lark-im/package" \
      -H "Authorization: Bearer $ZGI_MARKET_KEY" \
      -o lark-im.zip

    读取清单和下载安装包不计入用量。下载后请用响应头中的 SHA-256 校验文件。

技能说明

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

技能包内没有脚本文件:这个技能是供模型阅读的文本。

SKILL.md 节选

# 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)
```

## 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

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.

### Default message enrichment (reactions / update_time)

The four message-pulling shortcuts (`+messages-mget`, `+chat-messages-list`, `+messages-search`, `+threads-messages-list`) automatically attach a `reactions` block and (for edited messages) `update_time` to each returned message — no separate `im.reactions.batch_query` call is needed. Pass `--no-reactions` to opt out. For the full contract (output shape, the `im:message.reactions:read` scope requirement, and the "missing field ≠ fetch failure" data rules), read [`references/lark-im-message-enrichment.md`](references/lark-im-message-enrichment.md).

### Opt-in resource auto-download (`--download-resources`)

SKILL.md 不止这些内容,安装后可阅读全文。

技能包内容

共 60 个文件,合计 294.9 KiB

  • SKILL.md22.0 KiB
  • references/card/card-2.0-schema.md6.0 KiB
  • references/card/components/button.md2.8 KiB
  • references/card/components/chart.md2.2 KiB
  • references/card/components/checker.md1.9 KiB
  • references/card/components/collapsible_panel.md1.8 KiB
  • references/card/components/column_set.md2.5 KiB
  • references/card/components/date_picker.md1.6 KiB
  • references/card/components/div.md1.7 KiB
  • references/card/components/form.md2.2 KiB
  • references/card/components/header.md1.6 KiB
  • references/card/components/hr.md425 B
  • references/card/components/img.md1.4 KiB
  • references/card/components/img_combination.md1.0 KiB
  • references/card/components/input.md2.0 KiB
  • references/card/components/interactive_container.md2.2 KiB
  • references/card/components/markdown.md3.2 KiB
  • references/card/components/multi_select_person.md1.6 KiB
  • references/card/components/multi_select_static.md1.6 KiB
  • references/card/components/overflow.md1.5 KiB
  • references/card/components/person.md907 B
  • references/card/components/person_list.md1.2 KiB
  • references/card/components/picker_datetime.md1.5 KiB
  • references/card/components/picker_time.md1.5 KiB
  • references/card/components/recycling_container.md1.5 KiB
  • references/card/components/select_img.md1.9 KiB
  • references/card/components/select_person.md1.5 KiB
  • references/card/components/select_static.md1.8 KiB
  • references/card/components/table.md2.1 KiB
  • references/card/lark-im-card-create.md10.8 KiB
  • references/card/lark-im-card-style.md18.3 KiB
  • references/card/resource/colors.md1.4 KiB
  • references/card/resource/icons.md2.3 KiB
  • references/lark-im-card-action-reply.md9.3 KiB
  • references/lark-im-chat-create.md7.8 KiB
  • references/lark-im-chat-identity.md3.1 KiB
  • references/lark-im-chat-list.md8.9 KiB
  • references/lark-im-chat-members-list.md5.1 KiB
  • references/lark-im-chat-messages-list.md10.4 KiB
  • references/lark-im-chat-search.md8.2 KiB
  • references/lark-im-chat-update.md3.2 KiB
  • references/lark-im-feed-group-list-item.md3.1 KiB
  • references/lark-im-feed-group-list.md2.7 KiB
  • references/lark-im-feed-group-query-item.md2.3 KiB
  • references/lark-im-feed-groups.md18.2 KiB
  • references/lark-im-feed-shortcut-create.md4.2 KiB
  • references/lark-im-feed-shortcut-list.md5.0 KiB
  • references/lark-im-feed-shortcut-remove.md2.1 KiB
  • references/lark-im-flag-cancel.md2.9 KiB
  • references/lark-im-flag-create.md2.6 KiB
  • references/lark-im-flag-list.md4.6 KiB
  • references/lark-im-message-enrichment.md6.9 KiB
  • references/lark-im-message-read-status.md4.3 KiB
  • references/lark-im-messages-mget.md4.3 KiB
  • references/lark-im-messages-reply.md16.4 KiB
  • references/lark-im-messages-resources-download.md3.8 KiB
  • references/lark-im-messages-search.md13.3 KiB
  • references/lark-im-messages-send.md17.7 KiB
  • references/lark-im-reactions.md10.3 KiB
  • references/lark-im-threads-messages-list.md6.2 KiB

来源与审核

审核状态
尚未审核,内容来自上游来源
许可证
未说明

审核状态是平台对上架信息的记录,不构成对上游服务质量或可用性的担保。