Before starting, first read ../lark-shared/SKILL.md(authentication, permission handling).
CRITICAL — For anything involving scheduled times/meeting rooms, adjusting times, or querying/searching meeting rooms, the first step MUST be to read references/lark-calendar-schedule-meeting.md. If only editing fields (changing title/description) or adding/removing attendees (not involving time or meeting rooms), you may skip it and directly read references/lark-calendar-update.md。
Identity
Byschedule ownershipchoose identity:
- View/manage the logged-in user's own schedule →
--as user(default, the vast majority of scenarios). - View/manage schedules created/owned by the bot itself →
--as bot
Conversational person mapping: "I" = the logged-in user, "you" = the app (bot); persons used as field values (attendees, meeting owner, etc.) do not participate in identity determination, e.g., "you create the schedule, invite me, and the meeting owner is me" → --as bot creates it, and the logged-in user is only an attendee and meeting owner.
# 用户本人日程 → user
lark-cli calendar +agenda --as user
# bot 自建或参与的日程 → bot
lark-cli calendar +agenda --as bot
Shortcuts
| Shortcut | Description |
|---|---|
+agenda |
View schedule (default today) |
+meeting |
Get the associated video meeting information (meeting_id, meeting_note) via the schedule event ID; there will only be a meeting_id if a video meeting was held for the schedule,Note: to get the video meeting link, use the +get command |
+create |
Create a schedule and invite attendees (ISO 8601 time) |
+update |
Update existing schedule fields, or independently incrementally add/remove attendees and meeting rooms; for recurring schedules/exceptions you must pass --apply-to(see Recurring Schedule Operation Guidelines) |
+delete |
Delete a schedule; for recurring schedules/exceptions you must pass --apply-to(see Recurring Schedule Operation Guidelines) |
+freebusy |
Query the main calendar's busy/free status/RSVP status/available time slots. (If you need to book/recommend time slotsuse +suggestion—it recommends based on working hours, busy intervals, and break times.) |
+room-find |
For one or moreexplicittime blocks, find available meeting rooms (when there is no explicit time, calling directly is prohibited; you must first use +suggestion) |
+rsvp |
Reply to a schedule (accept/decline/tentative) |
+join-event |
Join a schedule via a share token (share link/QR code/share card/RSVP card) |
+suggestion |
Recommend multiple available time block options based on non-explicit times or a time range |
+transfer |
Transfer schedule ownership to another user or bot; irreversible, requires --yes |
+list-attendees |
List a schedule's attendees and meeting rooms (supports filtering by --type : user / resource / chat / third_party) |
+get — single schedule details
Via calendar_id + event_id geta single scheduledetails.
# calendar_id不传,默认primary
lark-cli calendar +get --calendar-id <calendar_id> --event-id <event_id>
Schedule descriptions uniformly use description a single field, handled as Markdown rich text. When reading a schedule, description returns Markdown rich text (if there is only a plain text description, it returns that plain text); when creating/updating a schedule, also pass Markdown via --description .
+getdoes not return attendees or meeting rooms. If you need the participant perspective (user / meeting room / group / third-party email), call+list-attendees。
+search-event — search schedules by keyword, time range, and attendees
Returns only basic fields (event_id/summary/start/end , etc.); for details, use +get。
# query 按关键词 可选
# start/end 按时间范围(ISO 8601 或 YYYY-MM-DD)可选
# attendee-ids 按参会人(自动识别 ou_ 用户 / oc_ 群聊 / omm_ 会议室前缀)可选
# page-token 分页游标,用于继续翻页 可选
# page-size 每页数量,默认 30 可选
lark-cli calendar +search-event --query "周会" --start 2026-04-20 --end 2026-04-27 --attendee-ids "ou_user1,oc_chat1,omm_room1" --page-token <page_token> --page-size 30
--attendee-ids multi-value semantics:Within the same type, it is OR (union)— as long as the schedule matches any one ID of the same type in the list, it will be returned.
--attendee-ids "ou_A,ou_B"= A or schedules that B attends (not ones that both A and B attend).
+delete — Delete schedule
# calendar_id不传,默认primary
lark-cli calendar +delete --calendar-id <calendar_id> --event-id <event_id> --notify=true
+agenda — View upcoming schedule
The default query is for the current day. Results should be organized into an easy-to-read timeline grouped by date and sorted ascending by start time.
# start/end 时间范围(ISO 8601 / YYYY-MM-DD / Unix 秒),均可选;默认当天
# calendar-id 日历 ID(默认primary)可选
lark-cli calendar +agenda --start 2026-03-10 --end 2026-03-17 --calendar-id <calendar_id>
Note:
- Canceled schedules are automatically filtered out; when there are no schedules, directly state "schedule cleared".
- If the time range exceeds 40 days, the query will automatically be split and the results merged.
+freebusy — Query the main calendar's busy/free periods / events / public free time
+freebusy One entry point handles four perspectives: geometric calculation type (busy / free / common_free) goes through automatic merging; event dimension type (raw_busy) retains each upstream schedule + rsvp_status。
# start/end 时间范围(ISO 8601 / YYYY-MM-DD / Unix 秒),均可选;默认当天
# user-id 目标用户 open_id,可重复或用逗号分隔;默认当前登录用户,bot 身份必须显式传至少一个
# type 视角四选一(默认 busy):
# busy 每个 user 合并后的忙碌区间(找空档、看忙碌时段)
# raw_busy 每个 user 的原始日程块 + rsvp_status(数会议、看每个会的 rsvp)
# free 每个 user 在时间窗内的空闲区间(可带 --min-duration 过滤)
# common_free 所有 user 的共同空闲区间(可带 --min-duration 过滤)
# min-duration 仅对 free / common_free 生效;Go duration 格式,例如 30m、1h、90m
# 查询忙碌时间段(去重并合并相邻/重叠段)
lark-cli calendar +freebusy --start 2026-03-11 --end 2026-03-11 --user-id ou_a,ou_b --type busy
# 看别人有几个会、每个会的起止 + rsvp(不合并相邻/重叠段,带rsvp状态)
lark-cli calendar +freebusy --start 2026-03-11 --end 2026-03-11 --user-id ou_a,ou_b --type raw_busy
# 查询用户空闲时间段
lark-cli calendar +freebusy --start 2026-03-11 --end 2026-03-11 --user-id ou_a,ou_b --type free
# 多人公共空闲时间段(推荐替代手工合并)
lark-cli calendar +freebusy --start 2026-03-11T09:00:00+08:00 --end 2026-03-11T18:00:00+08:00 --user-id ou_a,ou_b --type common_free --min-duration 30m
Usage tips:
+freebusyonly applies to querying the fact of busy/free time periods. If the goal is "recommendrecommenda suitable time slot for a meeting" (single-person or multi-person), you must prioritize using+suggestion— it comprehensively considersworking hours, busy periods, break periodsto make a recommendation,+freebusyonly answers "which intervals are free" and does not judge whether the interval is suitable for scheduling a meeting.- Multi-person public free time: if you only want "which intervals are commonly unoccupied" →
--type common_free [--min-duration <dur>]; if you want "recommended meeting time slots" → go through+suggestion。
Prerequisite routing
First determine whether it is a recurring schedule: if the operation target is a recurring schedule, you must first read Recurring Schedule Operation Specifications, and when the user has not specified the scope, first confirm "this occurrence only / all / this and following" (do not default to this occurrence only), then proceed to the specific operation flow according to the table below.
| Scenario | Prerequisite requirements |
|---|---|
| Schedule a meeting/event, adjust time, check meeting rooms | First read lark-calendar-schedule-meeting.md |
| Edit only fields (title/description) or add/remove attendees | First locate event_id, then read lark-calendar-update.md |
| Call any Shortcut | First read its corresponding reference document |
Write operation feedback
After write operations such as create, update, delete, and RSVP are completed, provide feedback to the user directly based on the command return result; do not proactively initiate a second query just to "confirm whether it took effect". A re-query is needed only when the user explicitly requests a review, or when the information returned by the command is insufficient to answer the user's question.
Core Concepts
- Schedule Instance: the concrete time instance after a recurring schedule is expanded. For "this occurrence only" operations, use the concrete instance's
event_id; for "all" or "this and following" operations, operate on the original recurring schedule (using the original scheduleevent_id), and handle exceptions as needed. - Recurring Schedule Exception: an independent schedule generated after a "this occurrence only" edit is made to a certain instance of a recurring schedule (with an independent
event_id). When deleting/updating "all", exceptions must be handled at the same time, otherwise the exceptions will remain. - All-day Event: A schedule that occupies time by date only, with no specific start or end time; the end date is included in the schedule's time.
- Time block vs time range: A time block is a specific, definite continuous period of time (such as
14:00~15:00), while a time range is general (such as "this afternoon").+room-findmust be based on a definite time block, not on a vague range. - Meeting room (Room): "room" is not a "room", it is a "meeting room". A meeting room is a type of schedule attendee (resource attendee) and cannot be booked separately from a schedule.
- Schedule meeting ID (Meeting ID): The historical video meeting ID of a schedule; it exists only if a video meeting has been held on the schedule.
- Schedule share link vs meeting link: The two are different things and must not be used interchangeably.
- Schedule share link:
https://<domain>/calendar/share?token=<token>, points to the schedule itself and is used to share schedule details.To share a schedule with a person, a group, or paste it into a document, what is needed is this schedule share link (obtained viacalendar events share_info), not an applink; do not construct an applink yourself or use an applink as a substitute. - Meeting link:
https://<domain>/j/<number>, points to the video meeting entry; all instances of the same recurring schedule series share the same meeting link.
- Schedule share link:
Term mapping
When users say in everyday language "help me book a calendar" or "check today's calendar", the actual intent is the creation or query of a **schedule (Event)**, not operating the calendar (Calendar) container itself. Automatically map the colloquial "calendar" intent to "schedule" operations.
Intent routing
Relationship between schedules and meetings: When users say "meeting", they usually do not distinguish between schedules and video meetings. For definitions and the routing rules for the three query intents (current/future/past), see Relationship between schedules and video meetings。
| User intent | Route to |
|---|---|
| Query past meetings ("yesterday's meeting", "last week's meeting") / what meetings are today / meetings currently in progress | First read Relationship between schedules and video meetings |
| Future meetings / tomorrow's or next week's meetings | This skill: video meetings do not exist in the future, equivalent to querying schedules |
| Search schedules by keyword | This skill (+search-event) |
| Get the associated video meeting ID or the user-bound meeting notes document from a schedule | This skill (+meeting) |
View a schedule's attendees / meeting rooms (including --type resource to view meeting rooms only) |
This skill (+list-attendees) |
| Share a schedule with someone / a group / paste into a document | This skill: first calendar events share_info getschedule share link, then use lark-im to send or paste the link;To share a schedule with a person, a group, or paste it into a document, what is needed is the schedule share link, not an applink, do not construct it yourself or use an applink as a substitute |
| Further get AI smart notes / verbatim transcript / Minutes artifacts from a schedule | First +meeting get meeting_id, then enter lark-meeting:vc +detail → note +detail / minutes +detail |
| Schedule/reschedule calendar events, adjust times, add/change meeting rooms, check meeting rooms | First determine new vs edit, then enter the schedule-meeting workflow |
| Only edit calendar event fields (title/description) or add/remove attendees (without involving time and meeting rooms) | First locate event_id, then read +update to perform the change |
| Edit/delete recurring calendar events ("change this recurring event", "delete the following ones", "cancel all", etc.) | First read Recurring Calendar Event Operation Guidelines;+update / +delete all via `--apply-to=single |
| Transfer calendar event organizer ("hand this calendar event to XX", "change the organizer to XX", "transfer this meeting to me", "return it to me after the bot creates it") | Read +transfer;--as usecurrent organizeridentity,--to-user-id pass the recipient, users and bots can transfer either way |
Task Type Routing
When handling "schedule/reschedule calendar events, add/remove attendees, add/change meeting rooms, adjust times", you must first determine new vs edit:
- Strong signal of editing an existing calendar event: the user mentions an anchor of an existing calendar event (title, time period,
这个日程、这场会) and expresses a modification action (add, remove, change to, switch meeting room, adjust time). Default to the edit flow; never treat it as a new creation. - New calendar event: the user expresses intent to add ("schedule a new meeting", "create a calendar event", "arrange a meeting"), and there is no modification action pointing to an existing calendar event.
Time Inference Guidelines
- Definition of weekdays: Monday is the first day of the week, and Sunday is the last day. When calculating relative dates such as "next Monday", infer based on the current real date.
- Range of a day: when the user mentions "tomorrow", "today", etc. to refer generally to a day, the time range should cover the whole day; do not narrow it on your own.
- Historical time constraint: you cannot schedule a time that has already fully passed. The only exception is a calendar event that "spans the current time" (starts in the past, ends in the future).
Meeting Room Rules
- For anything involving "booking/querying/searching for available meeting rooms", you must enter the schedule-meeting workflow. For meeting room parameter specifications, see +room-find。
+room-findtime input must be a definite time block, not a time range search.- When the user only asks to "check meeting rooms" but does not provide a clear time, you must first call
+suggestionto obtain available time blocks, then pass the time blocks to+room-find. It is strictly forbidden to guess the time and call blindly. - When editing an existing calendar event, "add meeting room" by default has incremental semantics and keeps existing meeting rooms; only when the user explicitly says "change meeting room" or "remove meeting room" should old meeting rooms be deleted.
API Resources
# 通用调用格式
lark-cli calendar <resource> <method> [flags]
# 查询用户主日历
lark-cli calendar calendars primary
# 获取日程分享链接(分享给他人/群前必须先拿到)
# 返回形如 {{domain}}/calendar/share?token=<token> 的分享链接,不是 applink;直接把该链接发给对方(对方可凭链接中的 token 走 +join-event 加入)
lark-cli calendar events share_info --calendar-id <calendar_id> --event-id <event_id>
# 删除日程
lark-cli calendar events delete --calendar-id <calendar_id> --event-id <event_id>
calendar_idcan directly passprimary, representing the primary calendar ID of the current calling identity.
List of methods for querying resources and how to use the methods
- List methods under a resource:
lark-cli calendar <resource> -h - View a method's cli flag:
lark-cli calendar <resource> <method> -h - View a method's API parameters:
lark-cli schema calendar.<resource>.<method>
<resource> is calendars(the calendar itself) / events(calendar events) / event.attendees(attendees) / freebusys(busy/free). Example:lark-cli schema calendar.events.delete。
Common commands for other domains
# 批量搜索多个用户,更多参数详见 lark-contact
lark-cli contact +search-user --queries "<q1>,<q2>" --as user
# 搜索群聊,更多参数详见 lark-im
lark-cli im +chat-search --query <query> --as user
Searching users/groups does not support bot identity, you must use
--as user。When parsing fails or the type is unclear, clarify the attendee type with the user; do not guess the type based on the name format.
Not within the scope of this skill
- Query past video conference records → lark-meeting
- To-do task management → lark-task
- Contacts → lark-contact
- Instant messaging → lark-im
- Meeting room physical facility management → Admin backend
Note (mandatory):
- When converting between date (time) strings and timestamps, be sure to call external tools such as system commands or script code to ensure absolute accuracy of the conversion; conversionmust not rely on the container's default time zone(often UTC, which causes an 8-hour offset); the target time zone must be explicitly specified. Violators will cause serious logical errors!