
feishu-im-read
飞书 IM 消息读取工具使用指南,覆盖会话消息获取、话题回复读取、跨会话消息搜索、图片/文件资源下载。 当以下情况时使用此 Skill: (1) 需要获取群聊或单聊的历史消息 (2) 需要读取话题(thread)内的回复消息 (3) 需要跨会话搜索消息(按关键词、发送者、时间等条件) (4) 消息中包含图片、文件、音频、视频,需要下载 (5) 用户提到"聊天记录"、"消息"、"群里说了什么"、"话题回复"、"搜索消息"、"图片"、"文件下载" (6) 需要按时间范围过滤消息、分页获取更多消息
- Installs
- 283
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/larksuite/openclaw-lark --skill feishu-im-read- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads feishu-im-read automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
飞书 IM 消息读取
执行前必读
- 该 Skill 中的所有消息读取工具均以用户身份调用,只能读取用户有权限的会话
feishu_im_user_get_messages中open_id和chat_id必须二选一- 消息中出现
thread_id时,根据用户意图判断是否用feishu_im_user_get_thread_messages读取话题内回复 - 以用户身份读取后,如果消息内容中出现资源标记时,用
feishu_im_user_fetch_resource下载,需要message_id+file_key+type
快速索引:意图 → 工具
| 用户意图 | 工具 | 必填参数 | 常用可选 |
|---|---|---|---|
| 获取群聊/单聊历史消息 | feishu_im_user_get_messages | chat_id 或 open_id(二选一) | relative_time, start_time/end_time, page_size, sort_rule |
| 获取话题内回复消息 | feishu_im_user_get_thread_messages | thread_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_resource | message_id, file_key(img_xxx), type="image" | - |
| 下载消息中的文件/音频/视频 | feishu_im_user_fetch_resource | message_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_id、chat_type(p2p/group)、chat_name。单聊消息还有 chat_partner(对方 open_id 和名字)。
5. 图片/文件/媒体资源的提取
消息内容中可能出现以下资源标记,用 feishu_im_user_fetch_resource 下载:
| 资源类型 | 内容中的标记格式 | fetch_resource 参数 |
|---|---|---|
| 图片 |  | 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_messages 和 feishu_im_user_search_messages 支持时间过滤,话题消息不支持。
| 方式 | 参数 | 示例 |
|---|---|---|
| 相对时间 | relative_time | today、yesterday、this_week、last_3_days、last_24_hours |
| 精确时间 | start_time + end_time | ISO 8601 格式:2026-02-27T00:00:00+08:00 |
relative_time和start_time/end_time互斥,不能同时使用- 可用的 relative_time 值:
today、yesterday、day_before_yesterday、this_week、last_week、this_month、last_month、last_{N}_{unit}(unit: minutes/hours/days)
7. open_id 与 chat_id 的选择
| 参数 | 格式 | 适用场景 |
|---|---|---|
| chat_id | oc_xxx | 已知会话 ID(群聊或单聊均可) |
| open_id | ou_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: true 和 page_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 授权且是会话成员 |
FAQ
What does the feishu-im-read skill do?
飞书 IM 消息读取工具使用指南,覆盖会话消息获取、话题回复读取、跨会话消息搜索、图片/文件资源下载。 当以下情况时使用此 Skill: (1) 需要获取群聊或单聊的历史消息 (2) 需要读取话题(thread)内的回复消息 (3) 需要跨会话搜索消息(按关键词、发送者、时间等条件) (4) 消息中包含图片、文件、音频、视频,需要下载 (5) 用户提到"聊天记录"、"消息"、"群里说了什么"、"话题回复"、"搜索消息"、"图片"、"文件下载" (6) 需要按时间范围过滤消息、分页获取更多消息
How do I install feishu-im-read?
Run npx skills add https://github.com/larksuite/openclaw-lark --skill feishu-im-read in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/feishu-im-read/ (personal) or .claude/skills/feishu-im-read/ (project).
Which AI agents can use feishu-im-read?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is feishu-im-read safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains feishu-im-read?
It is published by larksuite in larksuite/openclaw-lark. It has 283 recorded installs.
More from larksuite/openclaw-lark
feishu-bitable
larksuite/openclaw-lark
飞书多维表格(Bitable)的创建、查询、编辑和管理工具。包含 27 种字段类型支持、高级筛选、批量操作和视图管理。 当以下情况时使用此 Skill: (1) 需要创建或管理飞书多维表格 App (2) 需要在多维表格中新增、查询、修改、删除记录(行数据) (3) 需要管理字段(列)、视图、数据表 (4) 用户提到"多维表格"、"bitable"、"数据表"、"记录"、"字段" (5) 需要批量导入数据或批量更新多维表格
feishu-create-doc
larksuite/openclaw-lark
创建飞书云文档。从 Lark-flavored Markdown 内容创建新的飞书云文档,支持指定创建位置(文件夹/知识库/知识空间)。
feishu-calendar
larksuite/openclaw-lark
Open the skill to read its SKILL.md instructions.
feishu-fetch-doc
larksuite/openclaw-lark
获取飞书云文档内容。返回文档的 Markdown 内容,支持处理文档中的图片、文件和画板(需配合 feishudocmedia 工具)。
feishu-update-doc
larksuite/openclaw-lark
更新飞书云文档。支持 7 种更新模式:追加、覆盖、定位替换、全文替换、前/后插入、删除。
feishu-task
larksuite/openclaw-lark
飞书任务管理工具,用于创建、查询、更新任务和清单。 当以下情况时使用此 Skill: (1) 需要创建、查询、更新任务 (2) 需要创建、管理任务清单 (3) 需要查看任务列表或清单内的任务 (4) 用户提到"任务"、"待办"、"to-do"、"清单"、"task" (5) 需要设置任务负责人、关注人、截止时间、添加成员 (6) 需要追加任务步骤记录(Task 的 steps) (7) 需要上传任务附件(支持 task / taskdelivery) (8) 需要注册 Agent / 更新 Agent 信息(register / updateprofile)
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。