larksuite/cli

lark-contact

飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按?

All-time #98 Trending #253 Hot #6727 First seen Mar 28, 2026
8-week activity · all time api

Installation

$ npx skills add larksuite/cli --skill lark-contact

Summary

  • Lark directory lookup to convert employee names and emails to open_ids, and reverse-lookup employee details by ID.
  • Two independent command paths for user and bot identities: search by name/email for open_id (user only), or fetch employee details by open_id (both identities) Handles permission scoping, cross-tenant visibility rules, and multiple ID types (open_id, union_id, user_id) Integrates with lark-im and lark-calendar for downstream messaging, scheduling, and group operations after ID resolution

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Security audits

Partner security reviews for this skill.

agent-trust-hub SAFE

Analyzed Apr 30, 2026

This skill provides commands to interact with Lark (飞书) contact services using the lark-cli. It allows the agent to search for users and retrieve profile details like names, emails, and IDs. The skill follows best practices by instructing the agent to handle search result disambiguation manually via user input, preventing automated errors or unintended actions.

snyk LOW

Analyzed Apr 30, 2026

No issues detected.

socket Score 0.9000 · 0 alerts

Analyzed Apr 30, 2026

  • license 1
  • maintenance 1
  • quality 0.9
  • supply chain 1
  • vulnerability 1

0 alerts

Also in this package

Other skills from larksuite/cli · top by installs.

npx skills add larksuite/cli

Browse all from larksuite/cli

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 17.1K
License LICENSE
Default branch main
Open issues 225
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
More metadata
requires
{"bins":["lark-cli"]}
cliHelp
lark-cli contact --help

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,760 B
  • docs SUMMARY.md 446 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 432,225 installs

SKILL.md

选哪个命令

user 身份和 bot 身份是两条完全独立的路径。先确定当前身份,再按下表选命令:

想做什么 user 身份 bot 身份
按姓名 / 邮箱搜员工拿 open_id [+search-user](references/lark-contact-search-user.md) 不支持
按关键词搜索当前用户可见的机器人 / 智能体 [+search-bot](references/lark-contact-search-bot.md) 不支持
已知 open_id 取他人资料 +search-user --user-ids <id> [+get-user --user-id <id>](references/lark-contact-get-user.md)
查看自己 +get-user+search-user --user-ids me 不支持
查同事的个人状态 / 签名 userprofiles batchquery 不支持

已知 open_id 只是想发消息 / 排日程,不必经过 contact —— 直接 [lark-im](../lark-im/SKILL.md) / [lark-calendar](../lark-calendar/SKILL.md)。

名字没说清是人还是机器人 / 智能体

用户给的名字常常不表明类型。例如「和 reviewDuck 约个会」里的 reviewDuck 可能是同事昵称,也可能是机器人。

  • 名字含 bot / agent / AI / 助手 / 机器人 / 智能体 / assistant 等明显特征时,反过来先搜机器人更快
  • 不确定的话两边都搜一下

典型场景

找张三给他发消息:先搜,确认 open_id,再发:

lark-cli contact +search-user --query "张三" --has-chatted --as user
lark-cli im +messages-send --user-id ou_xxx --text "Hi!"

批量查同事的个人状态 / 个性签名(先用 schema 看参数)。

lark-cli schema contact.user_profiles.batch_query
lark-cli contact user_profiles batch_query \
  --params '{"user_id_type":"open_id"}' \
  --data '{"user_ids":["ou_xxx","ou_yyy"],"query_option":{"include_personal_status":true,"include_description":true}}' \
  --as user

搜索命中多条且后续操作有副作用(发消息、邀请会议等),把候选列给用户挑;不要擅自选第一条。

搜索机器人 / 智能体

+search-bot 使用 user 身份按关键词搜索当前用户可见的机器人,返回 ou 开头的机器人 openid。参数细节等见 [lark-contact-search-bot.md](references/lark-contact-search-bot.md)。

lark-cli contact +search-bot --query '会议助手' --as user
lark-cli contact +search-bot --queries '会议助手,日报助手,审批助手' --as user

注意事项

  • 41050 / Permission denied 受当前身份的可见范围限制(三条命令都可能遇到)。细节见 [lark-shared](../lark-shared/SKILL.md)。
  • 跨租户用户(iscrosstenant=true)多数业务字段为空字符串,这是飞书可见性规则,下游做空值兜底。
  • ID 类型:+get-user 可通过 --user-id-type 使用 openidunioniduserid;+search-user 使用用户 openid;+search-bot 不支持按 ID 查询,它按关键词搜索并返回机器人 open_id。

不在本 skill 范围

  • 发消息 / 查聊天记录 → [lark-im](../lark-im/SKILL.md)
  • 排日程 / 邀请会议 → [lark-calendar](../lark-calendar/SKILL.md)
  • 部门树 / 按部门列员工 / 组织架构 → [lark-openapi-explorer](../lark-openapi-explorer/SKILL.md) 查找原生接口