ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

feishu-card

发送飞书互动卡片(Card JSON 2.0)。当需要让飞书用户填写表单、做选择、确认操作、或查看 结构化数据时,发送交互卡片代替纯文字问答。需要 feishu-cards 插件工具: feishu_send_card / feishu_send_form / feishu_update_card。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/afk101/feishu-card-v2
Or

触发场景

发卡片 而非纯文字的情况:

  • 需要用户做选择(按钮/下拉/人员选择等)
  • 需要用户填写表单(输入框 + 提交按钮)
  • 需要展示结构化数据(表格、图表、多列布局)
  • 需要确认高风险操作(确认/取消双按钮)
  • 需要提供快速操作入口(按钮组)

纯文字:简单回复、解释说明、无需交互时,无需发卡片。


工具说明

工具用途主要参数
feishu_send_card发送卡片消息chat_id / user_idcard(JSON字符串)
feishu_send_form发送含表单容器的卡片同上,card 内须含 form 组件
feishu_update_card更新已发卡片内容token(回调中获取),card(新JSON)

卡片顶层结构

{
  "schema": "2.0",
  "config": { ... },
  "card_link": { "url": "..." },
  "header": { ... },
  "body": { "elements": [ ... ] }
}

config 字段速查

字段默认值说明
streaming_modefalse流式更新模式
enable_forwardtrue是否可转发
update_multitrue共享卡片(JSON 2.0 仅支持 true)
width_modedefault(600px)compact(400px) / fill(撑满)
enable_forward_interactionfalse转发后是否仍可交互
summary.content-自定义聊天栏预览文案

header 字段速查

字段说明枚举/格式
title.tag标题文本类型plain_text / lark_md
title.content主标题内容字符串,最多4行
subtitle.content副标题内容字符串,最多1行
template标题栏颜色blue wathet turquoise green yellow orange red carmine violet purple indigo grey default
icon.tag图标类型standard_icon / custom_icon
icon.token图标库tokenchat_outlined
text_tag_list[].color后缀标签颜色neutral blue turquoise lime orange violet indigo wathet green yellow red purple carmine
padding标题内边距默认 12px

body 字段速查

字段默认值说明
directionverticalvertical / horizontal
padding-12px 12px
horizontal_spacing-small(4px) medium(8px) large(12px) extra_large(16px) 或 Npx
horizontal_alignleftleft / center / right
vertical_spacing-同 horizontal_spacing
vertical_aligntoptop / center / bottom
elements[]组件数组

组件速查

容器组件

column_set(分栏)

tag: column_set,不可内嵌 formtable

{
  "tag": "column_set",
  "flex_mode": "none",
  "horizontal_spacing": "8px",
  "background_style": "default",
  "columns": [
    {
      "tag": "column",
      "width": "weighted",
      "weight": 1,
      "vertical_align": "top",
      "elements": []
    }
  ]
}

关键枚举:

  • flex_mode: none / stretch / flow / bisect / trisect
  • column.width: auto / weighted / Npx([16,600]px)
  • background_style: default 或颜色枚举值

form(表单容器)

tag: form,只可放在卡片根节点,不可嵌套表格/表单

{
  "tag": "form",
  "name": "form_1",
  "elements": [
    { "tag": "input", "name": "reason", "required": true },
    {
      "tag": "button",
      "text": { "tag": "plain_text", "content": "提交" },
      "type": "primary_filled",
      "form_action_type": "submit",
      "name": "btn_submit"
    }
  ]
}
  • 表单内交互组件必须有 name 字段(唯一标识)
  • 按钮 form_action_type: submit(提交)/ reset(重置)

Metadata

Author@afk101
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-afk101-feishu-card-v2": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.