skills/feishu-card/SKILL.md
Use when 用户提到“飞书卡片”“交互卡片”“按钮消息”“interactive 消息”“卡片回调”“给某个 open_id 发卡片”这类场景,需要构建、发送或更新飞书 IM 交互卡片。
npx skillsauth add shuliuzhenhua-sys/shuliu-skills feishu-cardInstall 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.
构建、发送和更新飞书交互卡片。
优先保持主技能简洁;只有当任务明确需要卡片样例时,再读取 references/ 下的 JSON 模板。
Base URL: https://open.feishu.cn/open-apis/im/v1
当用户有这些诉求时直接用:
open_id、chat_id 或用户发送交互卡片interactive 消息发出去action.value 做处理本 skill 默认复用 feishu-user-auth 提供的系统 token 能力。
优先顺序如下:
feishu-auth,直接执行:feishu-auth system-token
./.agents/skills/feishu-user-auth/bin/feishu-auth.js system-token
全局安装时:
~/.agents/skills/feishu-user-auth/bin/feishu-auth.js system-token
如果返回的是 JSON,取其中的 accessToken 作为 Authorization: Bearer <token>。
POST /open-apis/im/v1/messages?receive_id_type=open_id
POST /open-apis/im/v1/messages?receive_id_type=chat_id
请求体:
{
"receive_id": "ou_xxx",
"msg_type": "interactive",
"content": "{\"config\":{\"wide_screen_mode\":true},\"header\":{\"title\":{\"tag\":\"plain_text\",\"content\":\"标题\"}},\"elements\":[...]}"
}
关键点:
msg_type 必须是 interactivecontent 必须是“字符串化后的 JSON”,不是对象receive_id_type 要和 receive_id 的类型一致{
"config": { "wide_screen_mode": true },
"header": {
"title": { "tag": "plain_text", "content": "标题" },
"template": "blue"
},
"elements": [
{
"tag": "div",
"text": { "tag": "lark_md", "content": "**加粗内容**" }
},
{
"tag": "action",
"actions": [
{
"tag": "button",
"text": { "tag": "plain_text", "content": "确认" },
"type": "primary",
"value": { "action": "confirm" }
}
]
}
]
}
常用元素:
div: 文本块hr: 分割线action: 按钮区note: 备注区用户点击按钮后,回调事件里通常关注:
{
"type": "card.action.trigger",
"action": {
"value": {
"action": "confirm",
"data": "extra_info"
}
}
}
处理完回调后,可更新原卡片消息:
PATCH /open-apis/im/v1/messages/{message_id}
仅当任务需要现成模板时,再读取这些文件:
references/card-alert.jsonreferences/card-morning-briefing.jsonreferences/card-skill-test.jsonvalue,否则回调难以识别具体动作。danger 类型。receive_id_type 和 receive_id 是否匹配。feishu-auth system-token 返回 JSON,不要把整个 JSON 原样塞进请求头,只取 accessToken。content-media
小红书创作平台“文字配图”自动化技能。用户只要提到小红书创作平台、文字配图、科技主题、换配色、9444 端口、CDP、自动生成图片、自动下载图片、基于已有预览图换主题/换颜色,或者想先看看各个主题长什么样子,都应该使用这个技能。它会连接已登录的浏览器会话,生成图片,默认下载当前图片,支持继续切主题或换配色,也支持直接给出已经整理好的主题预览总览图和单张样例。
development
抓取和拆解微信公众号文章页。只要用户提到“微信公众号网页”“公众号文章”“mp.weixin.qq.com/s/”“抓 HTML”“导出素材”“分析公众号动画/实现方式/图片资源”这类场景,就应该使用这个 skill。它适用于公开可访问的公众号文章页,负责抓原始 HTML、提取资源、下载素材、整理动画线索,并生成结构化报告。
development
Generate videos using Sora via lnapi.com.
data-ai
Generate images via geekai.co image endpoints. Use when the user wants text-to-image generation through GeekAI, needs to choose between nano-banana-2 and gemini-3-pro-image-preview, or wants batch image generation with aspect ratio and size control.