CRITICAL — Before starting, you MUST first use the Read tool to read ../lark-shared/SKILL.md, which contains authentication and permission handling
Applicable Scenarios
- "Check if everyone is free tomorrow afternoon" / "check free time slots"
- "Schedule a 1-hour meeting, attendees: Zhang San, Li Si, Wang Wu" / "set up a meeting"
- "Do Zhang San, Li Si and I have time for a meeting next Wednesday afternoon" / "schedule conflict"
- "Find a time when everyone is free for a meeting" / "coordinate meeting time"
- "See if there's a gap today to hold a meeting"
Prerequisites
Only supports user identity. Before execution, ensure authorization:
lark-cli auth login --domain calendar,contact
Workflow
{参会人列表 + 时间范围 + 会议时长}
│
├── contact +search-user ──────────► 查找参会人 open_id
│
├── calendar +freebusy ────────────► 查询各参会人忙闲
│
├── AI 分析空闲交集 ──────────────► 找出共同空闲时段
│
├── [有明确时间] 冲突检测 ─────────► 报告冲突详情
│
├── [有时间段] +suggestion ────────► 推荐多个可选时段
│
└── [用户确认] calendar +create ───► 创建会议日程 + 发邀请
Step 1: Find attendees
If the user provided names, first look up the open_id:
lark-cli contact +search-user --query "<参会人姓名>" --as user
Record the returned open_id(ou_xxx format). If not found, prompt the user to check whether the name is correct.
Note: Only users within the same Feishu tenant can be looked up. Cross-tenant users' busy/free status cannot be queried.
Step 2: Query busy/free status
Query one by one
# 查询单个用户的忙闲(默认今天)
lark-cli calendar +freebusy --user-id "ou_xxx" --as user
# 指定日期范围
lark-cli calendar +freebusy \
--user-id "ou_xxx" \
--start "2026-04-10T09:00:00+08:00" \
--end "2026-04-10T18:00:00+08:00" \
--as user
Note:
--start/--endonly supports ISO 8601 format and Unix timestamp,does not supportnatural language. The AI needs to calculate based on the current date.
Batch query
For multiple attendees, call one by one +freebusy(the current lark-cli does not support passing multiple user-ids at once):
# 逐个查询,记录每个人的忙碌时段
lark-cli calendar +freebusy --user-id "ou_aaa" --start "..." --end "..." --as user
lark-cli calendar +freebusy --user-id "ou_bbb" --start "..." --end "..." --as user
lark-cli calendar +freebusy --user-id "ou_ccc" --start "..." --end "..." --as user
Step 3: AI analyzes free time slots
Integrate the busy/free data of all attendees and calculatecommon free time slots:
- Mark each person's busy time slots on the timeline
- Take the union of all busy time slots
- From the non-busy time slots, filter out continuous free segments that meet themeeting durationrequirement
- Sort by recommendation priority (working hours first, avoid lunch break)
Output format:
## 推荐会议时段
以下为 {日期} 所有参会人均空闲的时段(会议时长 {N} 分钟):
| 时段 | 推荐度 | 说明 |
|------|--------|------|
| 09:00-10:00 | 推荐 | 工作时间,无冲突 |
| 14:00-15:00 | 推荐 | 工作时间,无冲突 |
| 11:00-12:00 | 一般 | 接近午休 |
### 冲突详情
| 参会人 | 忙碌时段 | 事件 |
|--------|---------|------|
| 张三 | 10:00-11:30 | 产品评审会 |
| 李四 | 13:00-14:00 | 1v1 |
Smart recommendation (optional)
If the user gave a time range but did not specify a specific time, you can use +suggestion to get system recommendations:
lark-cli calendar +suggestion \
--start "2026-04-10T09:00:00+08:00" \
--end "2026-04-10T18:00:00+08:00" \
--attendee-ids "ou_aaa,ou_bbb,ou_ccc" \
--duration-minutes 60 \
--as user
Step 4: Create meeting (optional)
After the user confirms the time slot, create the schedule and send invitations:
lark-cli calendar +create \
--summary "会议主题" \
--start "2026-04-10T09:00:00+08:00" \
--end "2026-04-10T10:00:00+08:00" \
--attendee-ids "ou_aaa,ou_bbb,ou_ccc" \
--as user
Note: Before creating, be sure to confirm the time, topic, and attendees with the user to avoid misoperation.
Fallback Strategy
| Scenario | Fallback Plan |
|---|---|
| An attendee cannot be found | Prompt the user to confirm the name, or skip that person and continue querying |
| No common free time slot | Suggestions: expand the time range / reduce attendees / split the meeting |
| Only non-ideal time slots can be found | List "suboptimal time slots" and explain the conflict details |
| +suggestion unavailable | Fall back to +freebusy for manual analysis |
| Failed to create schedule | Output recommended time slots for the user to create manually |
Permission table
| Command | Required scope |
|---|---|
contact +search-user |
contact:user.base:readonly |
calendar +freebusy |
calendar:freebusy:readonly |
calendar +suggestion |
calendar:freebusy:readonly |
calendar +create |
calendar:calendar:write, calendar:event:write |
Reference
../lark-calendar/SKILL.md— Calendar atomic operations../lark-contact/SKILL.md— Contacts query