feishu-contact

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

A toolkit for working with Feishu, a Chinese workplace collaboration platform, and its organization directory. It searches members, manages departments, and converts member identifiers between Feishu ID types.

In plain words
What is it for?
Use it to find members by email or phone, read or change departments, manage users, obtain job titles, and handle Feishu API authentication.
Why use it?
It avoids writing each Feishu directory request and identifier conversion flow from scratch.

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 it to find members by email or phone, read or change departments, manage users, obtain job titles, and handle Feishu API authentication.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alextangson/feishu_skills/feishu-contact"><img src="https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-contact.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 2,122 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.02122
Opus 5.5 $0.00013 $0.00849
Sonnet 5.5 $0.00007 $0.00424
Haiku 4.5 $0.00003 $0.00212

Measured 2mo ago against content hash eb47be68e4c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

feishu-contact 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 2mo 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-contact/SKILL.md · 195 lines

How it starts

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

飞书组织架构与 ID 转换

通过 Contact v3 API 实现成员搜索、部门管理和 ID 转换。


API 基础

Base URL: https://open.feishu.cn/open-apis/contact/v3
认证: Authorization: Bearer {tenant_access_token}

认证与 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 端点 说明
搜索成员 GET /users/batch_get_id 通过邮箱/手机号获取 OpenID
获取职务 GET /job_titles/{id} 需在管理后台预先维护

部门管理

API 端点 方法 请求体示例 说明
获取部门 /departments/{department_id} GET - 查询单个部门详情
获取部门列表 /departments GET - 支持 parent_department_id 参数
获取父部门路径 /departments/{department_id}/parent GET - 获取部门层级路径
创建部门 /departments POST {"name":"新部门","parent_department_id":"0"} 需管理员权限
更新部门 /departments/{department_id} PUT {"name":"更新后的名称"} 修改部门信息
删除部门 /departments/{department_id} DELETE - 删除空部门
入职成员 /users POST {"name":"张三","mobile":"138...","department_ids":["od_xxx"]} 创建用户
更新用户 /users/{user_id} PUT {"name":"新名字"} 修改用户信息
删除用户 /users/{user_id} DELETE - 移除用户
获取用户列表 /users GET - 支持 department_id 过滤

⚠️ 创建部门和入职成员需最高权限,建议预发环境测试。


用户组管理

API 端点 方法 请求体示例 说明
获取用户组列表 /groups GET - 查询所有用户组
获取用户组 /groups/{group_id} GET - 查询单个用户组
创建用户组 /groups POST {"name":"项目组","description":"描述"} 创建新用户组
更新用户组 /groups/{group_id} PUT {"name":"新名称"} 修改用户组
删除用户组 /groups/{group_id} DELETE - 删除用户组
获取组成员 /groups/{group_id}/members GET - 查询组成员列表
添加组成员 /groups/{group_id}/members POST {"member_id":"ou_xxx","member_type":"user"} 添加用户到组
移除组成员 /groups/{group_id}/members/{member_id} DELETE - 从组移除用户

Read the full file on GitHub · 195 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. 2mo ago First seen · 195 lines · 33 tokens per session scan A eb47be68e4c5

Subscribe to this mod's changes

feishu-contact is a skill published in the GitHub repository alextangson/feishu_skills (64 stars, last pushed 7mo ago), licensed MIT. It adds 33 tokens to every session and 2,122 once invoked, about $0.0001 per session on Opus 5.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.

Related

feishu-contact compared with skills from other repositories

feishu-contact next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
feishu-contactalextangson/feishu_skillsSkill647mo agoMITA33Claude Code, Codex
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code