Feishu Card
2026-03-30
新闻来源:网淘吧
围观:8
电脑广告
手机广告
飞书卡片技能
向飞书(Lark)用户或群组发送丰富的交互式卡片。支持 Markdown(代码块、表格)、标题、彩色标题和按钮。
前提条件
- 安装
feishu-common首先。 - 此技能依赖于
../feishu-common/index.js以获取令牌和 API 认证。
使用方法
1. 简单文本(无特殊字符)
node skills/feishu-card/send.js --target "ou_..." --text "Hello World"
2. 复杂/Markdown 文本(推荐)
⚠️ 重要提示:为避免 shell 转义问题(例如,反引号被吞掉),务必先将内容写入文件。

- 将内容写入临时文件:
# (Use 'write' tool)
write temp/msg.md "Here is some code:\n\`\`\`js\nconsole.log('hi');\n\`\`\`"
- 使用
--text-file发送:
node skills/feishu-card/send.js --target "ou_..." --text-file "temp/msg.md"
3. 安全发送(自动处理临时文件)
使用此包装器可安全发送原始文本,无需手动创建文件。它会自动处理文件的创建和清理。
node skills/feishu-card/send_safe.js --target "ou_..." --text "Raw content with \`backticks\` and *markdown*" --title "Safe Message"
选项
-t, --target <id>:用户Open ID(ou_...)或群聊ID(oc_...)。-x, --text <string>:简单的文本内容。-f, --text-file <path>:文本文件的路径(支持Markdown格式)。适用于代码/日志。--title <string>:卡片标题。--color <string>:标题颜色(蓝色/红色/橙色/绿色/紫色/灰色)。默认:蓝色。--button-text <string>:底部操作按钮的文本。--button-url <url>:按钮的URL链接。--image-path <path>:要上传并嵌入的本地图片路径。
故障排除
- 缺少文本你是否使用了反引号
--text?Shell 可能将其吞掉了。请改用--text-file。
4. 角色消息
发送来自不同 AI 角色的风格化消息。自动添加主题标题、颜色和格式。
node skills/feishu-card/send_persona.js --target "ou_..." --persona "d-guide" --text "Critical error detected."
支持的角色
- d-guide:红色警告标题,粗体/代码前缀。嘲讽式后缀。
- green-tea:胭脂红标题,柔和/可爱风格。
- mad-dog:灰色标题,原始运行时错误风格。
- default:标准蓝色标题。
使用方法
-p, --persona <类型>:选择角色(d-guide, green-tea, mad-dog)。-x, --text <字符串>:消息内容。-f, --text-file <路径>文件中的消息内容(支持markdown格式)。
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Video Editing
下一篇:Agent Arcade


微信扫一扫,打赏作者吧~