feishu-card-ws

feishu-card-ws is a skill for Claude Code, Codex from EthanYoQ/Skill-hub. It costs 150 tokens per session (3,255 once invoked), scanned A, original, MIT.

A configuration guide for interactive cards in Feishu, a workplace messaging platform, when a bot uses a persistent WebSocket connection. It explains card templates, event routing, dropdown handling, button callbacks, and response formats.

In plain words
What is it for?
Use it when adding Feishu bot cards with dropdowns and buttons, registering callback events, caching selected values, or troubleshooting card responses in WebSocket mode.
Why use it?
It addresses platform and SDK constraints that can make card interactions fail or produce unreadable updates. The documented flow keeps message, selection, and button events on the supported event dispatcher path.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding Feishu bot cards with dropdowns and buttons, registering callback events, caching selected values, or troubleshooting card responses in WebSocket mode.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ethanyoq/skill-hub/feishu-card-ws
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add EthanYoQ/Skill-hub --skill feishu-card-ws
Clone the repo
git clone --depth 1 https://github.com/EthanYoQ/Skill-hub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for feishu-card-ws

README.md
[![agentmods](https://agentmods.dev/badge/skills/ethanyoq/skill-hub/feishu-card-ws/github.svg)](https://agentmods.dev/skills/ethanyoq/skill-hub/feishu-card-ws)
Your own site
<a href="https://agentmods.dev/skills/ethanyoq/skill-hub/feishu-card-ws"><img src="https://agentmods.dev/badge/skills/ethanyoq/skill-hub/feishu-card-ws/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for feishu-card-ws

Your own site · 80×15
<a href="https://agentmods.dev/skills/ethanyoq/skill-hub/feishu-card-ws"><img src="https://agentmods.dev/badge/skills/ethanyoq/skill-hub/feishu-card-ws.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,255 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00150 $0.03255
Opus 5 $0.00075 $0.01628
Sonnet 5 $0.00030 $0.00651
Haiku 4.5 $0.00015 $0.00326

Measured 11d ago against content hash 07b3081b4fa4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

feishu-card-ws scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

projects/ai-seed-project-phase-one-feishu/feishu-card-ws/SKILL.md · 344 lines

How it starts

The opening of the file, as written. The whole thing — 344 lines — stays where its author put it; the contents beside it link to each section on GitHub.

飞书卡片 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。


第一步:卡片模板

下拉菜单 + 按钮组合

// ✅ 正确:普通 button + select_static,不用 form 容器
{
  tag: "select_static",
  name: "my_select_key",                          // 用于服务端缓存的 key
  placeholder: { tag: "plain_text", content: "请选择" },
  value: { action: "my_select_key" },              // value.action 也用于识别
  options: [
    { text: { tag: "plain_text", content: "选项1" }, value: "1" },
    { text: { tag: "plain_text", content: "选项2" }, value: "2" },
  ],
}

{
  tag: "button",
  name: "my_action_name",                          // 按钮名称
  text: { tag: "plain_text", content: "🟢 执行操作" },
  type: "primary",
  value: { action: "my_action_name" },             // value.action 用于路由
}

独立按钮(无下拉)

{
  tag: "button",
  name: "my_simple_action",
  text: { tag: "plain_text", content: "🔄 刷新" },
  type: "default",
  value: { action: "my_simple_action" },
}

反模式(不要这样做)

// ❌ form_container — form_submit 事件不通过 WS 到达
{ tag: "form", name: "myForm", elements: [select, { tag: "button", action_type: "form_submit" }] }

// ❌ action_type: "form_submit" — 事件完全不到达服务端
{ tag: "button", action_type: "form_submit", ... }

// ❌ 只靠 name 不设 value — 按钮的 action routing 依赖 value.action
{ tag: "button", name: "my_action" }  // 缺少 value

Read the full file on GitHub · 344 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 344 lines · 150 tokens per session scan A 07b3081b4fa4

Subscribe to this mod's changes

feishu-card-ws is a skill published in the GitHub repository EthanYoQ/Skill-hub (9 stars, last pushed 4d ago), licensed MIT. It adds 150 tokens to every session and 3,255 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

voiden

Create and edit Voiden .void files for API testing. Covers the .void file format and all enabled extension block types.

VoidenHQ/voiden · 28 tokens

detecting-api-enumeration-attacks

Detect and prevent API enumeration attacks including BOLA and IDOR exploitation by monitoring sequential identifier access patterns and authorization failures.

xalgorix/xalgorix · 32 tokens

implementing-api-schema-validation-security

Implement API schema validation using OpenAPI specifications and JSON Schema to enforce input/output contracts and prevent injection, data exposure, and mass assignment attacks.

xalgorix/xalgorix · 35 tokens

performing-api-inventory-and-discovery

Performs API inventory and discovery to identify all API endpoints in an organization's environment including documented, undocumented, shadow, zombie, and deprecated APIs. The tester uses passive traffic analysis, active scanning, DNS enumeration, JavaScript analysis, and cloud resource inventory to build a…

xalgorix/xalgorix · 100 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens

api-debugging

Systematic approach to debugging REST APIs, HTTP errors, authentication issues, and network problems. Use when the user has API errors, status code issues, timeout problems, or needs help troubleshooting HTTP requests.

ownpilot/OwnPilot · 44 tokens