feishu-card

feishu-card is a skill for Claude Code, Codex from alextangson/feishu_skills. It costs 25 tokens per session (897 once invoked), scanned A, original, MIT.

A connector for Feishu interactive cards, messages that contain formatted content and controls such as buttons or selectors.

In plain words
What is it for?
Send confirmation requests, alerts, status updates, and task controls to Feishu chats.
Why use it?
It lets software send structured messages that people can read and respond to directly in Feishu.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is TOKEN="$(./scripts/get_feishu_token.sh)".

Good fit Send confirmation requests, alerts, status updates, and task controls to Feishu chats.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/alextangson/feishu_skills
agentmods
npx agentmods add skills/alextangson/feishu_skills/feishu-card

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-card/github.svg)](https://agentmods.dev/skills/alextangson/feishu_skills/feishu-card)
Your own site
<a href="https://agentmods.dev/skills/alextangson/feishu_skills/feishu-card"><img src="https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-card/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alextangson/feishu_skills/feishu-card"><img src="https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-card.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 897 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.
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.00025 $0.00897
Opus 5 $0.00013 $0.00449
Sonnet 5 $0.00005 $0.00179
Haiku 4.5 $0.00003 $0.00090

Measured 11d ago against content hash f53c0fa572c0, 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 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.

feishu-card/SKILL.md · 149 lines

How it starts

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

飞书交互卡片

构建、发送和处理飞书交互卡片。

Base URL: https://open.feishu.cn/open-apis/im/v1

使用场景: 晨报确认、告警处理、任务确认、状态更新

认证与 Token 获取

feishu_skills 根目录执行共享脚本:

TOKEN="$(./scripts/get_feishu_token.sh)"

请求头统一使用 Authorization: Bearer ${TOKEN}

如果业务接口返回 token 无效、过期或 401,强制刷新后仅重试一次原请求:

TOKEN="$(./scripts/get_feishu_token.sh --force-refresh)"

环境变量:

  • FEISHU_APP_ID
  • FEISHU_APP_SECRET

本地缓存: ./.feishu_token_cache.json(未过期直接复用,默认提前 5 分钟刷新)


发送卡片

POST /open-apis/im/v1/messages?receive_id_type=chat_id
{
  "receive_id": "<chat_id>",
  "msg_type": "interactive",
  "content": "<card_json_string>"
}

⚠️ content 必须是字符串化的 JSON。


卡片结构

{
  "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 文本块 {"tag":"div","text":{"tag":"lark_md","content":"文本"}}
hr 分割线 {"tag":"hr"}
action 按钮组 见下方
note 备注 {"tag":"note","elements":[{"tag":"plain_text","content":"备注"}]}

按钮

{
  "tag": "action",
  "actions": [
    {
      "tag": "button",
      "text": {"tag": "plain_text", "content": "确认"},
      "type": "primary",
      "value": {"action": "confirm", "data": "extra_info"}
    }
  ]
}

按钮类型: default / primary / danger


选择器

{
  "tag": "select_static",
  "placeholder": {"tag": "plain_text", "content": "请选择"},
  "options": [
    {"text": {"tag": "plain_text", "content": "选项1"}, "value": "opt1"},
    {"text": {"tag": "plain_text", "content": "选项2"}, "value": "opt2"}
  ],
  "value": {"key": "select_result"}
}

回调处理

用户点击按钮后,飞书会发送 WebSocket 事件:

Read the full file on GitHub · 149 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 149 lines · 25 tokens per session scan A f53c0fa572c0

Subscribe to this mod's changes

feishu-card is a skill published in the GitHub repository alextangson/feishu_skills (65 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 897 once invoked, about $0.0001 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-30.