feishu-card-ws SKILL.md skillA
feishu-card-ws from ethanyoq/skill-hub is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add ethanyoq/skill-hub/feishu-card-ws@git:20260414.4c61002Pins git:20260414.4c61002 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- ethanyoq/skill-hub
- Path
projects/ai-seed-project-phase-one-feishu/feishu-card-ws/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260414.4c61002, committed Apr 14, 2026
- Size
- 12,065 bytes
- Repository stars
- 11
- License
- MIT
飞书(Lark)交互式卡片在 WebSocket 长连接模式下的配置指南。涵盖卡片模板结构、 EventDispatcher 注册、按钮回调处理、下拉选择值缓存、响应格式等完整流程。 当需要在飞书 Bot 中添加交互式卡片(带按钮、下拉菜单等)并且使用 WS 长连接模式时, 必须使用此 skill。即使只是添加一个简单的按钮或下拉菜单,也要先读此 skill。 触发关键词:飞书卡片、interactive card、card callback、card.action.trigger、 管理面板、select_static、button callback、200672、WS 卡片。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 飞书卡片 WS 长连接配置指南
## 适用范围
本 skill 适用于使用 `@larksuiteoapi/node-sdk` 通过 WebSocket 长连接模式接收
飞书交互式卡片回调的场景。这套模式经过 2026-04-12 的实战验证,是目前唯一稳定可用的方案。
## 核心约束(先读这里)
Lark Node SDK v1.60.0 的 WSClient 有以下已确认的限制:
| 限制 | 影响 | 应对 |
|------|------|------|
| WSClient 不支持 CardActionHandler | `start()` 只接受 `eventDispatcher` 参数 | 用 EventDispatcher 注册 card.action.trigger |
| card 更新响应导致 200672 | `{ card: {...} }` 经 base64 编码后飞书无法解析 | 所有操作只返回 toast |
| form_submit 按钮事件不到达 | `action_type: "form_submit"` 走不同协议路径 | 使用普通 button,服务端缓存 select 值 |
| monkey-patch handleEventData 破坏消息投递 | 干扰 SDK 内部分片合并逻辑 | 不要 monkey-patch |
## 架构总览
```
用户发关键词 → im.message.receive_v1 → EventDispatcher → 发送卡片
用户选下拉 → card.action.trigger(select_static) → 缓存值 → return undefined
用户点按钮 → card.action.trigger(button) → 注入缓存值 → 业务处理 → return toast
```
三种交互全部通过同一个 EventDispatcher 路由,不需要任何 SDK 扩展或 monkey-patch。
---
## 第一步:卡片模板
### 下拉菜单 + 按钮组合
```typescript
// ✅ 正确:普通 button + select_static,不用 form 容器
{
tag: "select_static",
name: "my_select_key", // 用于服务端缓存的 key
placeholder: { tag: "plain_text", content: "请选择" },
value: { action: "my_select_key" }, // value.action 也用于识别
…Read the whole file at its exact version.
How to install
mdr add ethanyoq/skill-hub/feishu-card-ws@sha256:07b3081b4fa44d1aThe line at the top of this page pins the label git:20260414.4c61002, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_dgrdfzj2ifd7nzgi)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Apr 14, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (12065 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
ethanyoq/skill-hub · 11 stars · license MIT · pushed 2026-11-07 · branch mine
API
GET https://markdownregistry.com/api/v1/artifacts/art_dgrdfzj2ifd7nzgi GET https://markdownregistry.com/api/v1/resolve?ref=ethanyoq/skill-hub/feishu-card-ws GET https://markdownregistry.com/api/v1/blob/07b3081b4fa44d1a1b34554675b3b5c0505f4d3d395c252e3d294037aadef02c
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from ethanyoq/skill-hub
Every file in ethanyoq/skill-hub