lark-contact

Resolves Lark contact names and emails to open_ids and retrieves user profiles.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/TrayMachi/dotfiles --skill lark-contact-traymachi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-contact
Source: https://github.com/TrayMachi/dotfiles/tree/main/agents/skills/lark-contact
Command: npx skills add https://github.com/TrayMachi/dotfiles --skill lark-contact-traymachi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lark-cli, and includes references (resource) components.

What problem does it solve? When working with Feishu/Lark, you often need a user's open_id before you can send messages or schedule meetings, or you have an open_id and need to look up the person's name, department, email, or personal status. This Skill bridges that gap by resolving identities in both directions through the lark-cli contact commands. ## Core Features & Use Cases - Name/Email to open_id Resolution: Search employees by name, email, or phone keyword with filters like has-chatted, enterprise email, same-tenant, and employment status. - open_id Profile Lookup: Retrieve user details (name, department, email, activation status) by open_id, union_id, or user_id, with distinct user-identity and bot-identity command paths. - Batch Queries: Fan out up to 20 parallel name searches or batch-query personal status and signatures for multiple colleagues. - Use Case: You want to message a colleague named 张三. Search by name, review the candidate list to disambiguate same-name results, confirm the open_id, then hand off to the messaging skill. ## Quick Start Ask the assistant to find the open_id of a colleague by name using the lark contact search, then show their department and email.

Frequently Asked Questions about lark-contact

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find a Lark user's open_id by name?

Use lark-cli contact +search-user with the --query flag and the person's name, running as user identity. Add filters like --has-chatted or --exclude-external-users to narrow results, then pick the correct open_id from the candidates.

How to look up Lark user details from an open_id?

Run lark-cli contact +get-user --user-id <id> as bot identity, or +search-user --user-ids <id> as user identity for richer fields like department and email. The default ID type is open_id, but union_id and user_id are also supported.

Can I search multiple Lark contacts in one command?

Yes, use --queries with a comma-separated list of up to 20 names for parallel search. Each result row carries a matched_query field, and partial failures do not affect other queries.

Why does Lark contact search return permission denied error 41050?

Error 41050 means the current identity's visibility scope does not cover the target user. Switch between user and bot identity, or ask an administrator to adjust the visibility range in the Lark admin console.

What are the limitations of Lark contact search?

Search requires user identity and does not auto-paginate; has_more=true means you should refine the query. Cross-tenant users return empty business fields, and department trees or org charts are out of scope and require the native OpenAPI.