AivoClaw feishu-chat-history
install
source · Clone the upstream repo
git clone https://github.com/yuanyuekejiJN/AivoClaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/yuanyuekejiJN/AivoClaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/extraSkills/feishu-chat-history" ~/.claude/skills/yuanyuekejijn-aivoclaw-feishu-chat-history && rm -rf "$T"
manifest:
extraSkills/feishu-chat-history/SKILL.mdsource content
Feishu Chat History
Fetch message history from a Feishu group chat and summarize or present it to the user.
When to Use
- User asks what was discussed in a group
- User wants a summary or review of recent messages
- User provides a chat_id or is in a group and asks about its history
How to Fetch Messages
Use the Feishu IM API directly via Python. See
references/api.md for full details.
Quick summary:
- Read credentials from config →
/channels.feishu.appIdappSecret - Get
viatenant_access_tokenPOST /auth/v3/tenant_access_token/internal - Fetch messages via
GET /im/v1/messages?container_id_type=chat&container_id={chat_id}&page_size=50
Identifying the chat_id
- If the user is asking about the current group chat, use the
from the inbound metadata (chat_id
→ strip thechat:oc_xxxxx
prefix to get the raw ID)chat: - If the user provides a different group, ask for the chat_id
Presenting Results
Parse each message and present a clean summary:
- Filter out
(join/leave events) unless relevantmsg_type=system - For
: extractmsg_type=text
as JSON, get the.body.content
fieldtext - For
: extract text nodes from themsg_type=interactive
arrayelements - For
: note asmsg_type=image[图片] - Include sender name (from
or known bot app_ids), timestamp, and contentmentions - Group by thread if
is presentroot_id - End with a human-readable summary of topics discussed
Pagination
If
has_more=true, fetch more pages using page_token. Default: fetch 1 page (50 messages). Ask user if they want more.