Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
larksuite avatar

Feishu Im Read

  • 276 installs
  • 2.3k repo stars
  • Updated July 22, 2026
  • larksuite/openclaw-lark

feishu-im-read is an integration skill that guides agents to read Feishu and Lark IM history, thread replies, cross-chat search, and attachment downloads for developers automating enterprise chat workflows.

About

feishu-im-read is a larksuite/openclaw-lark skill that documents four Feishu IM tools agents call on behalf of the signed-in user: feishu_im_user_get_messages, feishu_im_user_get_thread_messages, feishu_im_user_search_messages, and feishu_im_user_fetch_resource. The skill covers group and direct chat history with page_size from 1 to 50, thread reply expansion, cross-session keyword and sender search, and image or file downloads up to 100MB using message_id plus file_key. Developers reach for feishu-im-read when agents must summarize what was said in a Lark group, pull thread context, or download attachments from chat. All calls respect OAuth user permissions and require chat_id or open_id, never both. The README lists six trigger intents from history pulls to file downloads and maps relative_time filters such as today, last_24_hours, and last_3_days.

  • Maps user intents to four tools: get messages, thread messages, search, and fetch resource
  • Enforces open_id vs chat_id mutual exclusivity on feishu_im_user_get_messages
  • Covers relative_time, pagination with page_token when has_more=true, and sort_rule
  • Documents image vs file download via message_id, file_key, and type image or file
  • Quick index table ties 聊天记录, 话题回复, and cross-chat search to exact tool params

Feishu Im Read by the numbers

  • 276 all-time installs (skills.sh)
  • Ranked #510 of 2,742 Automation & Workflows skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/larksuite/openclaw-lark --skill feishu-im-read

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs276
repo stars2.3k
Security audit3 / 3 scanners passed
Last updatedJuly 22, 2026
Repositorylarksuite/openclaw-lark

How do agents read Feishu Lark chat history?

Let your agent read Feishu/Lark IM history, thread replies, search across chats, and download attachments on behalf of the signed-in user.

Who is it for?

Developers building Lark or Feishu agents that must read authorized group chat, direct messages, threads, and attachments for summarization or workflow automation.

Skip if: Workflows without Feishu OAuth user authorization or teams needing to send messages rather than read history and download files.

When should I use this skill?

The user asks for chat history, thread replies, cross-chat message search, or image and file downloads from Feishu or Lark IM.

What you get

Paginated chat messages, thread reply threads, cross-session search hits, and downloaded images or files from Feishu IM.

  • paginated chat messages
  • thread replies
  • downloaded IM attachments

By the numbers

  • Documents 4 Feishu IM API tools for messages, threads, search, and resource fetch
  • page_size accepts values from 1 to 50 with default 50
  • fetch_resource supports file downloads up to 100MB

Files

SKILL.mdMarkdownGitHub ↗

飞书 IM 消息读取

执行前必读

  • 该 Skill 中的所有消息读取工具均以用户身份调用,只能读取用户有权限的会话
  • feishu_im_user_get_messagesopen_idchat_id 必须二选一
  • 消息中出现 thread_id 时,根据用户意图判断是否用 feishu_im_user_get_thread_messages 读取话题内回复
  • 以用户身份读取后,如果消息内容中出现资源标记时,用 feishu_im_user_fetch_resource 下载,需要 message_id + file_key + type

---

快速索引:意图 → 工具

用户意图工具必填参数常用可选
获取群聊/单聊历史消息feishu_im_user_get_messageschat_id 或 open_id(二选一)relative_time, start_time/end_time, page_size, sort_rule
获取话题内回复消息feishu_im_user_get_thread_messagesthread_id(omt_xxx)page_size, sort_rule
跨会话搜索消息feishu_im_user_search_messages至少一个过滤条件query, sender_ids, chat_id, relative_time, start_time/end_time, page_size
下载消息中的图片feishu_im_user_fetch_resourcemessage_id, file_key(img_xxx), type="image"-
下载消息中的文件/音频/视频feishu_im_user_fetch_resourcemessage_id, file_key(file_xxx), type="file"-

---

核心约束

1. 时间范围:确保消息覆盖完整

当用户没有明确指定时间范围时,根据用户意图推断合适的 relative_time,确保返回的消息能完整覆盖用户关心的内容。用户明确指定时间时直接使用用户的值。

2. 分页:根据需要翻页获取更多结果

  • page_size 范围 1-50,默认 50
  • 返回结果中 has_more=true 时,可使用 page_token 继续获取下一页
  • 根据用户需求判断是否需要翻页:需要完整结果时继续翻页,浏览概览时第一页通常够用

3. 话题回复:主动展开话题获取上下文

获取历史消息时,返回的消息中如果包含 thread_id 字段,推荐主动获取话题的最新 10 条回复(page_size: 10, sort_rule: "create_time_desc")以提供更完整的上下文。

场景行为
获取历史消息并需要理解上下文(默认)对发现的 thread_id 调用 feishu_im_user_get_thread_messages 获取最新 10 条回复
用户要求"完整对话"、"详细讨论"、"看看回复"获取话题全部回复(page_size: 50, sort_rule: "create_time_asc"),需要时翻页
用户只浏览消息概览 / 用户明确说不看回复跳过话题展开

注意:话题消息不支持时间过滤(飞书 API 限制),只能通过分页获取。

4. 跨会话消息搜索

feishu_im_user_search_messages 支持跨所有会话搜索消息:

参数说明
query搜索关键词,匹配消息内容
sender_ids发送者 open_id 列表
chat_id限定搜索范围的会话 ID
mention_ids被@用户的 open_id 列表
message_type消息类型:file / image / media
sender_type发送者类型:user / bot / all(默认 user)
chat_type会话类型:group / p2p

搜索结果每条消息额外包含 chat_idchat_type(p2p/group)、chat_name。单聊消息还有 chat_partner(对方 open_id 和名字)。

5. 图片/文件/媒体资源的提取

消息内容中可能出现以下资源标记,用 feishu_im_user_fetch_resource 下载:

资源类型内容中的标记格式fetch_resource 参数
图片![image](img_xxx)message_id=om_xxx, file_key=img_xxx, type="image"
文件<file key="file_xxx" .../>message_id=om_xxx, file_key=file_xxx, type="file"
音频<audio key="file_xxx" .../>message_id=om_xxx, file_key=file_xxx, type="file"
视频<video key="file_xxx" .../>message_id=om_xxx, file_key=file_xxx, type="file"

从消息的 message_id 字段和内容中的 file_key 组合即可调用 fetch_resource。

注意:文件大小限制 100MB,不支持下载表情包、卡片中的资源。

6. 时间过滤

feishu_im_user_get_messagesfeishu_im_user_search_messages 支持时间过滤,话题消息不支持。

方式参数示例
相对时间relative_timetodayyesterdaythis_weeklast_3_dayslast_24_hours
精确时间start_time + end_timeISO 8601 格式:2026-02-27T00:00:00+08:00
  • relative_timestart_time/end_time 互斥,不能同时使用
  • 可用的 relative_time 值:todayyesterdayday_before_yesterdaythis_weeklast_weekthis_monthlast_monthlast_{N}_{unit}(unit: minutes/hours/days)

7. open_id 与 chat_id 的选择

参数格式适用场景
chat_idoc_xxx已知会话 ID(群聊或单聊均可)
open_idou_xxx已知用户 ID,获取与该用户的单聊消息(自动解析为 chat_id)

两者必须二选一,优先使用 chat_id

---

使用场景示例

场景 1: 获取群聊消息并展开话题

步骤 1:获取群聊消息

{ "chat_id": "oc_xxx" }

步骤 2:返回的消息中发现 thread_id,展开话题最新回复:

{ "thread_id": "omt_xxx", "page_size": 10, "sort_rule": "create_time_desc" }

场景 2: 跨会话搜索消息

{ "query": "项目进度", "chat_id": "oc_xxx" }

场景 3: 分页获取更多消息

第一次调用返回 has_more: truepage_token: "xxx",继续获取:

{ "chat_id": "oc_xxx", "page_token": "xxx" }

场景 4: 下载消息中的资源

{ "message_id": "om_xxx", "file_key": "img_v3_xxx", "type": "image" }

---

常见错误与排查

错误现象根本原因解决方案
消息结果太少时间范围太窄或未传时间参数根据用户意图推断合适的 relative_time
消息不完整没有检查 has_more 并翻页has_more=true 时用 page_token 翻页
话题讨论内容不完整没有展开 thread_id发现 thread_id 时获取话题回复
"open_id 和 chat_id 不能同时提供"同时传了两个参数只传其中一个
"relative_time 和 start_time/end_time 不能同时使用"时间参数冲突选择一种时间过滤方式
"未找到与 open_id=xxx 的单聊会话"没有单聊记录改用 chat_id,或确认存在单聊
话题消息返回为空thread_id 格式不正确确认为 omt_xxx 格式
图片/文件下载失败file_key 或 message_id 不匹配确认 file_key 来自该 message_id
权限不足用户未授权或无权限确认已完成 OAuth 授权且是会话成员

Related skills

How it compares

Use feishu-im-read for read-only Lark IM history and attachments; pair with send-message skills when agents must post replies.

FAQ

Which Feishu IM tools does feishu-im-read cover?

feishu-im-read documents feishu_im_user_get_messages, feishu_im_user_get_thread_messages, feishu_im_user_search_messages, and feishu_im_user_fetch_resource. Calls run as the signed-in user and only return sessions that user can access.

What are feishu-im-read pagination limits?

feishu-im-read sets page_size between 1 and 50 with a default of 50. When has_more is true, agents pass page_token for the next page. File downloads via fetch_resource support attachments up to 100MB.

Is Feishu Im Read safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.