skills/feishu-message/SKILL.md
飞书消息发送接口调用指南。当 AI 需要回复飞书消息、向飞书群或用户发送消息时触发。提供获取 token 和发送消息的完整 curl 调用方式。
npx skillsauth add cih1996/ai-hub 飞书消息发送Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
你收到了来自飞书的消息,需要通过飞书 API 回复。本手册提供完整的调用方式。
1. 用 app_id + app_secret 获取 tenant_access_token
2. 用 token + chat_id 发送消息
curl -s -X POST 'https://open.larksuite.com/open-apis/auth/v3/tenant_access_token/internal' \
-H 'Content-Type: application/json' \
-d '{"app_id":"<APP_ID>","app_secret":"<APP_SECRET>"}'
响应:
{"code":0,"msg":"ok","tenant_access_token":"t-xxx","expire":7200}
Token 有效期 2 小时,可缓存复用,过期后重新获取。
curl -s -X POST 'https://open.larksuite.com/open-apis/im/v1/messages?receive_id_type=chat_id' \
-H 'Authorization: Bearer <TENANT_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"receive_id": "<CHAT_ID>",
"msg_type": "text",
"content": "{\"text\":\"你的回复内容\"}"
}'
参数说明:
receive_id_type:chat_id(群聊)或 open_id(私聊指定用户)receive_id:从【飞书消息】中的「会话」字段获取(即 chat_id)content:JSON 字符串,注意内层引号需要转义curl -s -X POST 'https://open.larksuite.com/open-apis/im/v1/messages?receive_id_type=chat_id' \
-H 'Authorization: Bearer <TENANT_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"receive_id": "<CHAT_ID>",
"msg_type": "post",
"content": "{\"zh_cn\":{\"title\":\"标题\",\"content\":[[{\"tag\":\"text\",\"text\":\"正文内容\"}]]}}"
}'
如果要回复某条具体消息(带引用效果):
curl -s -X POST 'https://open.larksuite.com/open-apis/im/v1/messages/<MESSAGE_ID>/reply' \
-H 'Authorization: Bearer <TENANT_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"msg_type": "text",
"content": "{\"text\":\"你的回复\"}"
}'
MESSAGE_ID 从【飞书消息】中的「消息ID」字段获取。
当你收到如下格式的消息时:
【飞书消息】
发送者: ou_xxx
会话: oc_xxx
消息ID: om_xxx
内容: 用户说的话
回复步骤:
# 1. 获取 token(替换实际的 app_id 和 app_secret)
TOKEN=$(curl -s -X POST 'https://open.larksuite.com/open-apis/auth/v3/tenant_access_token/internal' \
-H 'Content-Type: application/json' \
-d '{"app_id":"<APP_ID>","app_secret":"<APP_SECRET>"}' | grep -o '"tenant_access_token":"[^"]*"' | cut -d'"' -f4)
# 2. 发送回复(使用消息中的 chat_id)
curl -s -X POST 'https://open.larksuite.com/open-apis/im/v1/messages?receive_id_type=chat_id' \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"receive_id": "oc_xxx",
"msg_type": "text",
"content": "{\"text\":\"你的回复内容\"}"
}'
content 字段的值必须是 JSON 字符串(字符串里面包含 JSON),注意转义open_id(发送者ID),群聊用 chat_id(会话ID)development
QQ消息发送接口调用指南。当 AI 需要回复QQ消息、向QQ群或用户发送消息时触发。基于 OneBot 11 协议,通过 NapCat HTTP API 发送。
development
QQ Bot 全流程部署引导。当需要安装 NapCat、配置 QQ 机器人、对接 AI Hub 时触发。引导用户完成安装、登录、WebUI 配置和频道创建。
tools
飞书自建应用全自动部署。当需要在飞书开放平台创建应用、配置机器人、设置事件订阅、开通权限并发布版本时触发。通过 Chrome MCP 操作浏览器完成全流程。
tools
全栈项目开发团队自动组建与闭环交付。当用户提到'帮我开发一个xxx'、'我要做一个xxx项目'时触发。自动创建6人团队(经理、架构师、前端、后端、测试、体验),按固定技术栈标准执行开发、测试、体验、巡检全流程。