feishu-im-read

larksuite/openclaw-lark · updated May 1, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/larksuite/openclaw-lark --skill feishu-im-read
0 commentsdiscussion
summary

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

skill.md

飞书 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_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_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_time todayyesterdaythis_weeklast_3_dayslast_24_hours
精确时间 start_time + end_time ISO 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_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: 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 授权且是会话成员
how to use feishu-im-read

How to use feishu-im-read on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add feishu-im-read
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/larksuite/openclaw-lark --skill feishu-im-read

The skills CLI fetches feishu-im-read from GitHub repository larksuite/openclaw-lark and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/feishu-im-read

Reload or restart Cursor to activate feishu-im-read. Access the skill through slash commands (e.g., /feishu-im-read) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.736 reviews
  • Isabella Yang· Dec 28, 2024

    Useful defaults in feishu-im-read — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Dhruvi Jain· Dec 20, 2024

    feishu-im-read is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Chen Wang· Dec 8, 2024

    Registry listing for feishu-im-read matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Zaid Khanna· Nov 27, 2024

    feishu-im-read reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Amina Diallo· Nov 19, 2024

    feishu-im-read is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Oshnikdeep· Nov 11, 2024

    Useful defaults in feishu-im-read — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Amelia Gonzalez· Nov 3, 2024

    We added feishu-im-read from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Amelia Zhang· Oct 22, 2024

    Keeps context tight: feishu-im-read is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Emma Liu· Oct 18, 2024

    feishu-im-read is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Amina Zhang· Oct 10, 2024

    feishu-im-read reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 36

1 / 4