Skills2026年3月30日·1 分钟阅读

Lark CLI Skill: Contact — User & Org Directory

Lark/Feishu CLI skill for contacts. Search users by name/email/phone, get user profiles, query org structure.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 17/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
CLI Tool
安装
Stage only
信任
信任等级:Community
入口
Lark CLI Skill: Contact — User & Org Directory
安全暂存命令
npx -y tokrepo@latest install 74908524-8dcd-45c6-8156-d2038c4030a9 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

TL;DR
Search Lark/Feishu users by name, email, or phone and query organizational structure via CLI.
§01

What it is

This Lark CLI skill provides programmatic access to the Lark/Feishu contact and organizational directory. It lets you search users by name, email, or phone number, retrieve detailed user profiles, and query the organizational structure including departments and reporting hierarchies.

The skill targets developers and automation engineers who need to look up user information or org data from Lark/Feishu without navigating the web interface.

§02

How it saves time or tokens

Manual user lookup in Lark requires logging into the admin console and navigating multiple screens. This CLI skill provides instant access to the same data with a single command. For AI agents managing team workflows, the skill provides the user IDs needed to assign tasks, send messages, or create calendar events.

Batch lookups across departments are especially efficient compared to manual search.

§03

How to use

  1. Configure the Lark CLI with your app credentials (App ID and App Secret)
  2. Use the contact search command to find users by name, email, or phone
  3. Use the profile command to get detailed user information
  4. Use the org command to query department hierarchies
§04

Example

# Search for a user by name
lark contact search --name 'Alice Wang'

# Get user profile by user ID
lark contact get --user-id 'ou_abc123'

# List all users in a department
lark contact list --department-id 'od_dept001'

# Query org structure
lark contact org --department-id 'od_root' --recursive

The output includes user IDs, names, emails, phone numbers, departments, and job titles in JSON format.

§05

Related on TokRepo

§06

Common pitfalls

  • Contact API access requires the app to have 'contact:user.employee:readonly' scope; missing permissions return empty results
  • User IDs differ between open_id, union_id, and user_id formats; use the correct format for downstream API calls
  • Rate limits apply to batch queries; add delays when iterating over large departments

常见问题

What permissions does the contact skill need?+

The Lark app needs 'contact:user.employee:readonly' for user search and profile access, and 'contact:department.organize:readonly' for department queries. These are configured in the Lark Developer Console.

Can I search by email or phone?+

Yes. The search command supports name, email, and phone lookups. Partial matching works for names. Email and phone require exact matches for privacy reasons.

What user data is returned?+

User profiles include name, email, phone, department, job title, employee type, avatar URL, and various user IDs (open_id, union_id, user_id). The exact fields depend on your app permissions.

Does this work with Feishu or Lark?+

Both. Feishu (Chinese version) and Lark (international version) use the same API with different base URLs. The CLI detects the environment from your app configuration.

Can I export the entire org directory?+

Yes, with the recursive flag on the org command. Start from the root department and query recursively to get all departments and users. Be mindful of rate limits for large organizations.

引用来源 (3)
🙏

来源与感谢

Created by LarkSuite. Licensed under MIT. larksuite/cli — 4,100+ GitHub stars

Part of the Lark CLI Official Skills Collection on TokRepo.

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产