feishu-im

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

Instructions for using Feishu's messaging and group-management API, a service for workplace chat and collaboration. They cover authentication, sending and replying to messages, and managing group features.

In plain words
What is it for?
Use them to send text, cards, images, files, or urgent messages; reply to or withdraw messages; pin content; add reactions; and manage groups.
Why use it?
They provide the required token handling, request formats, retry rule, and recipient identifiers for interacting with Feishu correctly.

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 Use them to send text, cards, images, files, or urgent messages; reply to or withdraw messages; pin content; add reactions; and manage groups.

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-im

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-im

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alextangson/feishu_skills/feishu-im"><img src="https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-im.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,206 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.00033 $0.01206
Opus 5 $0.00016 $0.00603
Sonnet 5 $0.00007 $0.00241
Haiku 4.5 $0.00003 $0.00121

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

Security

Grade A, and why

feishu-im 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-im/SKILL.md · 164 lines

How it starts

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

飞书消息与群管理

通过 IM API 发送消息、管理群聊和配置群功能。

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 分钟刷新)


消息操作

API 端点 说明
发送消息 POST /messages?receive_id_type=open_id 支持文本/卡片/图片/文件
批量发送 POST /messages/batch_send 最多 200 人
回复消息 POST /messages/{message_id}/reply -
撤回消息 DELETE /messages/{message_id} 24 小时内
加急消息 PATCH /messages/{message_id}/urgent_app -
置顶消息 POST /pins -
添加表情 POST /messages/{message_id}/reactions -

发送文本消息:

{
  "receive_id": "ou_xxx",
  "msg_type": "text",
  "content": "{\"text\":\"Hello\"}"
}

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

receive_id_type: open_id / user_id / email / chat_id


交互卡片

发送卡片:

{
  "receive_id": "ou_xxx",
  "msg_type": "interactive",
  "content": "<card_json_string>"
}

卡片结构:

{
  "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"}
    ]}
  ]
}

常用元素:

  • div: 文本块(支持 lark_md / plain_text
  • hr: 分割线
  • action: 按钮组
  • img: 图片
  • note: 备注

群聊管理

API 端点 说明
创建群聊 POST /chats -
获取群信息 GET /chats/{chat_id} -
更新群信息 PUT /chats/{chat_id} 修改群名/描述/头像
解散群聊 DELETE /chats/{chat_id} -
搜索群聊 GET /chats/search -

创建群聊:

{
  "name": "项目群",
  "description": "项目讨论",
  "user_id_list": ["ou_xxx", "ou_yyy"]
}

Read the full file on GitHub · 164 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 · 164 lines · 33 tokens per session scan A 2717cdd598bd

Subscribe to this mod's changes

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