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.
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.
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.
How to use
- Configure the Lark CLI with your app credentials (App ID and App Secret)
- Use the contact search command to find users by name, email, or phone
- Use the profile command to get detailed user information
- Use the org command to query department hierarchies
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.
Related on TokRepo
- Automation tools -- Workflow automation with APIs
- API tools -- API integration and management
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
Frequently Asked Questions
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.
Yes. The search command supports name, email, and phone lookups. Partial matching works for names. Email and phone require exact matches for privacy reasons.
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.
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.
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.
Citations (3)
- Lark Developer Docs— Lark/Feishu Contact API for user and department management
- Lark Open Platform— Lark Open Platform API documentation
- Lark Developer Docs— OAuth and app permission scopes for Lark applications
Related on TokRepo
Source & Thanks
Created by LarkSuite. Licensed under MIT. larksuite/cli — 4,100+ GitHub stars
Part of the Lark CLI Official Skills Collection on TokRepo.
Discussion
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.