Feishu IM Read Skill
快速索引
| 用户意图 |
module |
tool_action |
必填参数 |
| 发送消息 |
message |
send_message |
chat_id/user_id, content |
| 读取消息历史 |
message |
history |
chat_id |
| 上传文件 |
message |
upload_file |
source, file_type |
调用示例
发送消息
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "message",
"tool_action": "send_message",
"chat_id": "oc_xxx",
"content": "Hello! 这是一条测试消息"
}'
读取消息历史
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "message",
"tool_action": "history",
"chat_id": "oc_xxx",
"start_time": "2026-03-01",
"end_time": "2026-03-10",
"page_size": 20
}'
核心约束
- chat_id: 群聊 ID(
oc_ 开头);必填——可通过参数直传,或由环境变量 LARK_CHAT_ID 自动注入(Lark channel 中默认已注入)
- user_id: 用户 open_id(
ou_ 开头),用于私聊
- 消息类型: 支持 text、post(富文本)、image、file 等
- 分页: 使用
page_token 和 page_size 进行分页
- 时间过滤:
start_time 和 end_time 支持日期字符串
1---
2name: feishu-im-read
3description: When 飞书 chat history needs reading → fetch group/DM messages, thread replies, and download attached files/images.
4triggers:
5 intent_patterns:
6 - "消息记录|聊天历史|message history|聊天记录"
7 - "发送消息|send message|消息搜索"
8 - "群里.*说了.*什么|what.*said.*in.*group|看.*群消息|check.*group"
9 - "谁.*发的|who.*sent|最近.*消息|recent.*messages"
10 - "帮我.*发|send.*for.*me|转发|forward|回复.*消息|reply.*message"
11 - "搜索.*聊天|search.*chat|找.*说过|find.*mentioned"
12 - "下载.*附件|download.*attachment|图片.*聊天|image.*in.*chat"
13 - "私信|DM|direct.*message|单聊"
14 context_signals:
15 keywords: ["message", "消息", "chat", "聊天", "history", "send_message", "群", "group", "附件", "转发", "搜索", "私信", "DM"]
16 confidence_threshold: 0.5
17priority: 9
18requires_tools: [bash]
19max_tokens: 300
20cooldown: 15
21metadata:
22 source: https://skillmd.com/skills/cklxx/feishu-im-read
23---
24
25# Feishu IM Read Skill
26
27## 快速索引
28
29| 用户意图 | module | tool_action | 必填参数 |
30|---------|--------|-------------|---------|
31| 发送消息 | message | send_message | chat_id/user_id, content |
32| 读取消息历史 | message | history | chat_id |
33| 上传文件 | message | upload_file | source, file_type |
34
35## 调用示例
36
37### 发送消息
38
39```bash
40python3 skills/feishu-cli/run.py '{
41 "action": "tool",
42 "module": "message",
43 "tool_action": "send_message",
44 "chat_id": "oc_xxx",
45 "content": "Hello! 这是一条测试消息"
46}'
47```
48
49### 读取消息历史
50
51```bash
52python3 skills/feishu-cli/run.py '{
53 "action": "tool",
54 "module": "message",
55 "tool_action": "history",
56 "chat_id": "oc_xxx",
57 "start_time": "2026-03-01",
58 "end_time": "2026-03-10",
59 "page_size": 20
60}'
61```
62
63## 核心约束
64
65- **chat_id**: 群聊 ID(`oc_` 开头);**必填**——可通过参数直传,或由环境变量 `LARK_CHAT_ID` 自动注入(Lark channel 中默认已注入)
66- **user_id**: 用户 open_id(`ou_` 开头),用于私聊
67- **消息类型**: 支持 text、post(富文本)、image、file 等
68- **分页**: 使用 `page_token` 和 `page_size` 进行分页
69- **时间过滤**: `start_time` 和 `end_time` 支持日期字符串