lark-contact
SkillCommunityAudited: no issuesTranslated from ChineseThis skill provides tools for interacting with the Lark (FeiShu) contact directory. It allows agents to resolve names or email addresses to open_ids and retrieve employee details such as names, departments, and contact information using open_ids.
npx skills add larksuite/cli/lark-contactlark-contact
Which command to choose
The user identity and bot identity are two completely independent paths. First determine the current identity, then choose the command according to the table below:
| What you want to do | user identity | bot identity |
|---|---|---|
| Search for employees by name / email to get open_id | +search-user | Not supported |
| Get someone else's profile with a known open_id | +search-user --user-ids <id> | +get-user --user-id <id> |
| View yourself | +get-user or +search-user --user-ids me | Not supported |
If you already have an open_id and just want to send a message or schedule a meeting, there is no need to go through contact. Use lark-im or lark-calendar directly.
Typical scenarios
# Find Zhang San to send him a message: search first, confirm open_id, then send
lark-cli contact +search-user --query "Zhang San" --has-chatted --as user
lark-cli im +messages-send --user-id ou_xxx --text "Hi!"
If a search returns multiple hits and subsequent operations have side effects (sending messages, inviting to meetings, etc.), list the candidates for the user to choose from. Do not choose the first one automatically.
Notes
- 41050 / Permission denied: Restricted by the visibility scope of the current identity (both commands may encounter this). Switch to bot identity or have an administrator adjust the visibility scope. See
lark-sharedfor details. - Cross-tenant users (
is_cross_tenant=true): Most business fields are empty strings. This is a Lark visibility rule. Downstream services should handle empty values. - ID type: Default is
open_id.+get-usercan change this with--user-id-type union_id|user_id.+search-useronly acceptsopen_id.
Out of scope for this skill
- Sending messages / checking chat history:
lark-im - Scheduling meetings / inviting to meetings:
lark-calendar - Department trees / listing employees by department / organizational structure: Use
lark-openapi-explorerto find native interfaces.
lark-contact
选哪个命令
user 身份和 bot 身份是两条完全独立的路径。先确定当前身份,再按下表选命令:
| 想做什么 | user 身份 | bot 身份 |
|---|---|---|
| 按姓名 / 邮箱搜员工拿 open_id | +search-user | 不支持 |
| 已知 open_id 取他人资料 | +search-user --user-ids <id> | +get-user --user-id <id> |
| 查看自己 | +get-user 或 +search-user --user-ids me | 不支持 |
已知 open_id 只是想发消息 / 排日程,不必经过 contact —— 直接 lark-im / lark-calendar。
典型场景
# 找张三给他发消息:先搜,确认 open_id,再发
lark-cli contact +search-user --query "张三" --has-chatted --as user
lark-cli im +messages-send --user-id ou_xxx --text "Hi!"
搜索命中多条且后续操作有副作用(发消息、邀请会议等),把候选列给用户挑;不要擅自选第一条。
注意事项
- 41050 / Permission denied 受当前身份的可见范围限制(两条命令都可能遇到)。换 bot 身份或让管理员调整可见范围,细节见
lark-shared。 - 跨租户用户(
is_cross_tenant=true)多数业务字段为空字符串,这是飞书可见性规则,下游做空值兜底。 - ID 类型:默认
open_id。+get-user可改--user-id-type union_id|user_id;+search-user只接受open_id。
不在本 skill 范围
- 发消息 / 查聊天记录 →
lark-im - 排日程 / 邀请会议 →
lark-calendar - 部门树 / 按部门列员工 / 组织架构 ,通过
lark-openapi-explorer查找原生接口
Installs
216,758First seen
Jun 10, 2026
Auto-fetched from GitHub .
Stats via skills.sh.
Skills similar to lark-contact:
Installs
Installs
Installs