dingtalk-calendar
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese钉钉日历 Skill
DingTalk Calendar Skill
前置条件 — 执行操作前必读
Prerequisites — Must Read Before Executing Any Operation
**CRITICAL — 执行任何操作前,MUST 先用 Read 工具完整读取dws。**该轻量文件包含全局执行契约、安全底线及 shared references 的按需加载导航;不要预加载其全部 references。dingtalk-shared
<!-- VISIBLE_SHORTCUTS_START -->常用路径直接按本文件执行,不要预读大而全的 calendar.md。仅在循环日程、响应邀请、共享/ACL、附件、日历本或低频参数无法由本文件定位时按需读取对应小节;订会议室的范围与失败收束才读取 03-meeting.md。
CRITICAL — Before executing anyoperation, MUST first use the Read tool to fully readdws. This lightweight file contains the global execution contract, safety baseline, and on-demand loading navigation for shared references; do not preload all its references.dingtalk-shared
<!-- VISIBLE_SHORTCUTS_START -->For common paths, execute directly according to this file; do not pre-read the large and comprehensive calendar.md. Only read the corresponding sections on demand when recurring schedules, responding to invitations, sharing/ACL, attachments, calendars, or low-frequency parameters cannot be located from this file; read 03-meeting.md only for the scope and failure closure of meeting room booking.
Shortcuts(无专用脚本/recipe 时优先)
Shortcuts (preferred when no dedicated script/recipe exists)
以下 shortcut 同时进入公开 catalog 与 Runtime Schema。按本 skill/recipe 路由,命中时 Shortcut 优先于原子命令。参数只查 ;仅需且已发布 时查 ,字段级再查 ;缺失不以 Help/样例推断。Schema 不可用才读一次已知 leaf Help; 用同 leaf Help 修正一次。 禁 Help:错误 suggestion → 已加载 Skill/reference 明确入口;均无则报漂移。禁全 Catalog/root/parent/product Help;仅映射、接口或 provenance 审计省略 。现有路由和 reference 均无法定位低频能力时,才用 发现。
dws schema --cli-path "calendar +<shortcut>" --compact --jq '{cli_path,parameters,constraints,confirmation}' -f jsonresult--jq '{cli_path,outcomes:.result.outcomes,pagination}'data_schemaunknown flagunknown command--compactdws shortcut list --service calendar --format json| Shortcut | 风险 | 适用场景 |
|---|---|---|
| read | 查询日程列表(不传时间默认查询今天) |
| read | 查看日程参会人 |
| write | 创建日程,并可按姓名邀请参会人(自动解析 userId,失败自动回滚删除日程) |
| read | 查询用户的日历本列表 |
| read | 按名称模糊搜索日历本 |
| high-risk-write | 取消(删除)一个已有日程(删除前先确认它真实存在) |
| read | 检测我某天日程的时间冲突(重叠/双重预订,默认今天) |
| read | 按姓名查询某人在指定时间段内的忙闲状态(自动解析 userId) |
| read | 找我某天工作时段内的空闲时间段(默认今天 09:00-18:00) |
| read | 查询用户 / 会议室闲忙状态(--users 与 --rooms 至少其一) |
| write | 按姓名把参会人加入已有日程(自动解析 userId 后批量添加) |
| read | 查我自己在某时间段的忙闲(默认今天,无需输入姓名) |
| read | 查看接下来最近的一个日程(默认扫描未来 7 天) |
| write | 改一个已有日程的时间(只动开始/结束时间,其他字段不变) |
| read | 按时间段搜索可用会议室(不传时间默认当前起 1 小时) |
| read | 会议室分组列表 |
| read | 按名称模糊搜索会议室(不检查可用性) |
| read | 按姓名解析多位参与者,推荐大家都有空的可开会时间段(自动解析 userId) |
| read | 列出我今天的日程(自动计算今天的起止时间,无需手动填时间范围) |
| read | 列出我明天的日程(自动计算明天的起止时间,无需手动填时间范围) |
| read | 列出我本周的日程(自动按周一为周首计算本周起止时间,无需手动填时间范围) |
The following shortcuts are present in both the public catalog and the Runtime Schema. They are routed by this skill/recipe; when matched, a Shortcut takes precedence over atomic commands. For parameters, only query ; when only the already-published is needed, query ; for field-level details, further query ; do not infer missing information from Help or samples. Only read a known leaf Help once when Schema is unavailable; use the same leaf Help to fix an once. For , Help is forbidden: if a wrong suggestion is given, use the explicit entry already loaded in the Skill/reference; if neither exists, report drift. Full Catalog/root/parent/product Help is forbidden; omit only for mapping, interface, or provenance audits. When existing routing and references cannot locate low-frequency capabilities, use to discover.
dws schema --cli-path "calendar +<shortcut>" --compact --jq '{cli_path,parameters,constraints,confirmation}' -f jsonresult--jq '{cli_path,outcomes:.result.outcomes,pagination}'data_schemaunknown flagunknown command--compactdws shortcut list --service calendar --format json| Shortcut | Risk | Applicable scenario |
|---|---|---|
| read | Query the schedule list (defaults to today when no time is provided) |
| read | View event attendees |
| write | Create an event, and optionally invite attendees by name (automatically resolves userId; on failure, automatically rolls back and deletes the event) |
| read | Query the user's calendar list |
| read | Fuzzy search calendars by name |
| high-risk-write | Cancel (delete) an existing event (first confirm it actually exists before deleting) |
| read | Detect time conflicts in my schedule for a certain day (overlap/double-booking; default today) |
| read | Query a person's busy/free status in a specified time range by name (automatically resolves userId) |
| read | Find my free time slots within working hours on a certain day (default today 09:00-18:00) |
| read | Query user / meeting room busy-free status (at least one of |
| write | Add attendees to an existing event by name (automatically resolves userId then batch adds) |
| read | Check my own busy/free status in a time range (default today; no name input required) |
| read | View the next nearest event (default scans the next 7 days) |
| write | Reschedule an existing event (only changes start/end time; other fields unchanged) |
| read | Search available meeting rooms by time range (defaults to 1 hour from now when no time is provided) |
| read | Meeting room group list |
| read | Fuzzy search meeting rooms by name (does not check availability) |
| read | Resolve multiple participants by name and recommend time slots when everyone is free (automatically resolves userId) |
| read | List my today's schedule (automatically calculates today's start/end; no need to manually enter a time range) |
| read | List my tomorrow's schedule (automatically calculates tomorrow's start/end; no need to manually enter a time range) |
| read | List my this week's schedule (automatically calculates the week's start/end with Monday as the first day; no need to manually enter a time range) |
意图表
Intent Table
| 用户说 | 命令 |
|---|---|
| "今天 / 明天 / 本周日程" | |
| "约会议(含参会人 + 会议室)" | 先搜房取 |
| "多人共同空闲" | |
| "查闲忙" | |
| "加参会人" / "订房" / "取消" | |
| User says | Command |
|---|---|
| "today / tomorrow / this week's schedule" | |
| "Schedule a meeting (including attendees + meeting room)" | first search rooms to get |
| "Common free time for multiple people" | |
| "Check busy/free" | |
| "Add attendee" / "Book room" / "Cancel" | |
常用快路径(省略 Help / Reference)
Common Fast Paths (omit Help / Reference)
以下参数已确定时直接执行,不要再调用 、Schema 或读取 :
--helpcalendar.md| 意图 | 直接命令 |
|---|---|
| 按姓名推荐共同时间 | |
| 按姓名创建会议(无会议室) | |
| 检查第 N 天冲突 | |
| 查第 N 天空闲窗口 | |
| 搜索空闲会议室 | |
| 日程详情/参会人 | |
同一状态下,相同命令和相同参数只调用一次;只有发生写操作、拿到新游标,或首次结果明确不完整时才允许重查。按标题寻找日程时,从最可能且最窄的时间窗开始;一旦得到唯一匹配立即停止,不继续扫描其他月份。
When the following parameters are already determined, execute directly; do not call , Schema, or read again:
--helpcalendar.md| Intent | Direct command |
|---|---|
| Recommend common time by name | |
| Create a meeting by name (no meeting room) | |
| Check conflicts on day N | |
| Check free windows on day N | |
| Search available meeting rooms | |
| Event details/attendees | |
Under the same state, the same command with the same parameters is called only once; re-querying is allowed only when a write operation occurred, a new cursor was obtained, or the first result was clearly incomplete. When looking for an event by title, start from the most likely and narrowest time window; stop immediately once a unique match is obtained, and do not continue scanning other months.
标准 SOP(必遵流程)
Standard SOP (Mandatory Process)
命中以下意图必须按对应 SOP 顺序执行;禁止跳步、替换命令、编造 userId/eventId。每条命令必须带,时间参数必须是 ISO-8601(如--format json)。2026-07-03T14:00:00+08:00
When the following intents are matched, must execute in the corresponding SOP order; forbidden to skip steps, replace commands, or fabricate userId/eventId. Every command must include; time parameters must be ISO-8601 (e.g.,--format json).2026-07-03T14:00:00+08:00
SOP-1 查日程(list-events)
SOP-1 Query Events (list-events)
触发:今天/明天/本周日程/我有什么会/某时段日程。
- 首选脚本(必须):(聚合今日议程)。
python scripts/calendar_today_agenda.py today|tomorrow|week - 降级 CLI(必须):脚本不可用时 ;不传
dws calendar event list --start "<起始ISO>" --end "<结束ISO>" --format json默认查今天(00:00:00~23:59:59)。返回--start/--end时必须继续翻页,直到游标为空;不能把“单页成功”当成完整查询。nextCursor - 解析(必须):取真实 、
eventId、attendees[];按需抽取,禁止把整段 JSON 原样贴出。用户要汇总或计数时,在本地完成聚合,只输出各分组计数和必要明细,避免逐条铺满答复导致后半段被截断。start/end
禁止:用 替代闲忙查询(查闲忙走 SOP-3)、编造时间窗口、用非 ISO 时间格式。
event listTrigger: today / tomorrow / this week's schedule / what meetings do I have / events in a certain time range.
- Preferred script (mandatory): (aggregates today's agenda).
python scripts/calendar_today_agenda.py today|tomorrow|week - Fallback CLI (mandatory): when the script is unavailable, ; if
dws calendar event list --start "<起始ISO>" --end "<结束ISO>" --format json/--startare not provided, the default is today (00:00:00~23:59:59). When--endis returned, continue paging until the cursor is empty; do not treat a single successful page as a complete query.nextCursor - Parse (mandatory): extract the real ,
eventId, andattendees[]; extract only what is needed; forbidden to paste the entire JSON verbatim. When the user asks for a summary or count, complete the aggregation locally and only output per-group counts and necessary details, to avoid filling the reply line by line and causing the latter half to be truncated.start/end
Forbidden: using to replace a busy/free query (for busy/free, use SOP-3), fabricating time windows, or using non-ISO time formats.
event listSOP-2 建日程(create-event)
SOP-2 Create Event (create-event)
触发:建日程/约会议/加日程。
- 解析与会人(必须):对每个姓名 取
dws aisearch person --query "<姓名>" --dimension name --format json,多人逗号拼接。userId - 执行(必须):(按需加
dws calendar event create --title "<主题>" --start "<ISO>" --end "<ISO>" --attendees <userId1,userId2> --format json/--location/--desc)。--rooms - 验证(按需一次):从创建返回 取日程 ID(下游参数语义称
result.id)。创建返回已包含用户要求的标题、描述和时段时直接复用,不为“再看一遍”额外 list;只有返回缺字段、用户明确要求回查,或后续状态发生变化时才执行一次eventId/窄时间窗event get。event list
禁止:跳过与会人 userId 解析直接传姓名、编造会议室 roomId。
Trigger: create an event / schedule a meeting / add an event.
- Resolve attendees (mandatory): for each name, run and take
dws aisearch person --query "<姓名>" --dimension name --format json; join multiple people with commas.userId - Execute (mandatory): (add
dws calendar event create --title "<主题>" --start "<ISO>" --end "<ISO>" --attendees <userId1,userId2> --format json/--location/--descas needed).--rooms - Verify (on demand once): get the event ID from in the creation response (downstream parameter semantics call it
result.id). If the creation response already contains the title, description, and time range the user asked for, reuse it directly; do not run an extra list just to 'take another look'. Only runeventId/narrow-windowevent getonce when the response is missing fields, the user explicitly asks to verify, or the later state has changed.event list
Forbidden: skipping attendee userId resolution and passing names directly; fabricating a meeting room .
roomIdSOP-3 查闲忙(check-busy)
SOP-3 Check Busy/Free (check-busy)
触发:某人/会议室是否有空/找空闲时段/避免冲突。
- 解析对象(必须):姓名 → 取
dws aisearch person --query "<姓名>" --dimension name --format json;会议室用userId。roomId - 收敛时段(必须):/
--start必须由用户给出或明确收敛;时段不明确必须先追问,禁止默认全天窗口。--end - 执行(必须):(查会议室换
dws calendar busy search --users <userId1,userId2> --start "<ISO>" --end "<ISO>" --format json,可同时传)。禁止用--rooms <roomId...>扫日程替代闲忙查询。event list - 空闲时段(必须):找共同空闲用 。
python scripts/calendar_free_slot_finder.py
若指定窗口内确实没有满足时长的共同空闲,明确给出最长共同空闲窗口并询问是否缩短时长、扩大时间范围或换日期;未经用户确认不得擅自改时间,也不得声称已安排会议。
禁止:用 冒充 、未确认时段就默认全天查询。
event listbusy searchTrigger: whether someone / a meeting room is available / find free time / avoid conflicts.
- Resolve object (mandatory): name → to get
dws aisearch person --query "<姓名>" --dimension name --format json; for meeting room useuserId.roomId - Converge time range (mandatory): /
--startmust be explicitly provided or converged by the user; if the time range is unclear, must ask first; forbidden to default to an all-day window.--end - Execute (mandatory): (for rooms, use
dws calendar busy search --users <userId1,userId2> --start "<ISO>" --end "<ISO>" --format json, can be passed together). Forbidden to use--rooms <roomId...>to scan schedules instead of a busy/free query.event list - Free slots (mandatory): use to find common free time.
python scripts/calendar_free_slot_finder.py
If there is indeed no common free time that satisfies the requested duration within the specified window, clearly provide the longest common free window and ask whether to shorten the duration, expand the time range, or change the date; without user confirmation, do not change the time on your own, and do not claim the meeting has been arranged.
Forbidden: using to impersonate , or defaulting to an all-day query before the time range is confirmed.
event listbusy search执行硬约束
Execution Hard Constraints
- 先核对诉求,再清理资源:把用户要求看到的详情、冲突对、参会人、会议室和验证结论先从结构化返回中提取并暂存;即使随后删除临时资源,最终答复仍必须逐项呈现这些结果。工具调用成功不等于已经向用户交付结果。
- 目标验证必须点名结论:冲突/忙闲/搜索返回很多记录或输出被截断时,必须按当前 case 的标题、、人员或资源 ID 收敛核对;不能只说“运行了检查”。例如冲突任务需明确指出目标 A/B 的重叠起止时间,以及首尾相接是否被排除。
eventId - 新日程 + 新会议室优先两步完成:用户从一开始就要求创建日程并订房,且没有依赖已创建 的中间操作时,先
eventId取得真实room search,再用一次roomId完成创建和预订;参会人也可同时用event create ... --rooms <ROOM_ID>带入。只有日程已存在、用户要求先看日程再订房,或一步创建失败时,才使用--attendees,禁止无故走“create → room add”两次写入。room add - 多轮日程任务必须保留 ,后续加人、移人、订房、换房、改描述、删除都基于同一个
eventId执行;不要重新创建重复日程。eventId - 用户明确说"帮我订一个空闲会议室"时,返回可用会议室后直接选择第一个可预订且不需要自定义审批的
room search执行roomId;不要把选择权抛回用户导致任务停住。room add - 已有日程订房:→
dws calendar room search --start ... --end ... --format json→dws calendar room add --event <EVENT_ID> --rooms <ROOM_ID> --format json或event get验证。room/busy - 换会议室:先 ,再
room delete --event <EVENT_ID> --rooms <OLD_ROOM_ID>,最后回查;不要只更新room add --event <EVENT_ID> --rooms <NEW_ROOM_ID>。--location - 参会人变化用 ,日程描述变化用
attendee add/delete,删除日程用event update --desc。用户当前消息已明确要求删除/取消时可直接执行;否则先确认。event delete --id - 删除终态按需回查一次:用户明确要求“确认删除/没有残留”时,成功后用原
event delete、标题、日历本和原始起止时间做一次窄窗活跃列表核对;普通“办完后取消”以结构化删除成功为终态,不额外 get/list。eventId仍可能返回历史对象或墓碑;除非返回里真实存在event get,不得声称“状态已变为 cancelled”。status=cancelled - 脚本失败或参数不完整时,立即降级到明确的 命令,不要停在"我要查看用法"。
dws calendar event/attendee/room - 所有 dws 命令带 ;查询时间必须显式
--format json/--start。--end
- Verify the request first, then clean up resources: first extract and temporarily store the details, conflict pairs, attendees, meeting rooms, and verification conclusions the user asked to see from the structured responses; even if temporary resources are deleted afterward, the final reply must present these results item by item. A successful tool call does not mean the results have been delivered to the user.
- Target verification must name conclusions: when conflict/busy-free/search returns many records or the output is truncated, you must converge and verify by the current case's title, , person, or resource ID; you cannot just say 'ran the check'. For example, a conflict task must clearly state the overlapping start/end time of targets A/B and whether back-to-back adjacency is excluded.
eventId - New event + new meeting room: prefer completing in two steps: when the user asks from the start to create an event and book a room, and there is no intermediate operation depending on a created , first run
eventIdto get the realroom search, then use oneroomIdto complete creation and booking; attendees can also be included viaevent create ... --rooms <ROOM_ID>. Only use--attendeeswhen the event already exists, the user asks to see the event before booking, or the one-step creation failed; do not perform the two writes 'create → room add' without reason.room add - Multi-turn event tasks must retain the ; subsequent adding/removing attendees, booking a room, changing rooms, modifying the description, and deleting are all executed against the same
eventId; do not recreate duplicate events.eventId - When the user explicitly says 'help me book an available meeting room', after returns available rooms, directly select the first
room searchthat is bookable and does not require custom approval and executeroomId; do not throw the choice back to the user and stall the task.room add - Booking a room for an existing event: →
dws calendar room search --start ... --end ... --format json→ verify withdws calendar room add --event <EVENT_ID> --rooms <ROOM_ID> --format jsonorevent get.room/busy - Changing a meeting room: first , then
room delete --event <EVENT_ID> --rooms <OLD_ROOM_ID>, and finally re-check; do not only updateroom add --event <EVENT_ID> --rooms <NEW_ROOM_ID>.--location - Attendee changes use , event description changes use
attendee add/delete, and event deletion usesevent update --desc. If the user's current message explicitly requests deletion/cancellation, execute directly; otherwise confirm first.event delete --id - Deleted terminal state: verify once on demand: when the user explicitly asks to 'confirm deletion/no residue', after succeeds, perform a narrow-window active list check using the original
event delete, title, calendar, and original start/end time; for ordinary 'cancel after done', structured deletion success is the terminal state, with no extra get/list.eventIdmay still return historical objects or tombstones; unlessevent gettruly exists in the response, do not claim 'status changed to cancelled'.status=cancelled - When a script fails or parameters are incomplete, immediately fall back to explicit commands; do not stop at 'I want to view the usage'.
dws calendar event/attendee/room - All dws commands must include ; query times must explicitly use
--format json/--start.--end
跨产品协作
Cross-Product Collaboration
- 视频会议发起 / 入会链接 / 邀请入会 / 会中控制 → 当前 CLI 不支持;请在钉钉客户端完成
- 会后摘要 / 待办 → 切到
dingtalk-minutes - 参会人按人名 → 先用 解析
dingtalk-aisearch
- Video meeting initiation / join links / inviting to meeting / in-meeting controls → currently not supported by the CLI; please complete these in the DingTalk client
- Post-meeting summaries / to-dos → switch to
dingtalk-minutes - Resolving attendees by person name → first use
dingtalk-aisearch
注意
Notes
普通“给定时段 + 任意空闲会议室”直接走本文件两步快路径;只有用户限定楼宇/楼层/具体会议室、搜索为空或需要放宽范围时,才读取 03-meeting.md 的范围早停与失败门禁。任何路径都禁止假设 。
roomIdFor ordinary 'given time slot + any available meeting room' cases, go directly through the two-step fast path in this file; only when the user restricts building/floor/specific meeting room, the search is empty, or the range needs to be broadened, read the scope early-stop and failure gate in 03-meeting.md. All paths forbid assuming .
roomId局部意图与短流程
Local Intents and Short Flows
- 局部意图消歧;短流程。
- Local intent disambiguation; Short flows.