← Back to Skills Marketplace
breath57

Dingtalk Calendar Only Curl

by breath57 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
130
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install dingtalk-calendar-only-curl
Description
钉钉日程与日历。当用户提到"钉钉日程"、"日历"、"创建日程"、"新建会议"、"视频会议"、"钉钉会议"、"会议室"、"约会议室"、"会议室忙闲"、"空闲会议室"、"签到"、"签退"、"签到链接"、"签退链接"、"循环日程"、"重复日程"、"recurrence"、"查日程"、"日程列表"、"修改日程"、"删除日...
README (SKILL.md)

钉钉日程技能

负责钉钉日历(Calendar)API 的操作。本文件为策略指南;完整请求格式见 references/api.md

dt_helper.sh 位于本 SKILL.md 同级目录的 scripts/dt_helper.sh

核心概念

  • 路径中的 userId:日程 API 路径 /v1.0/calendar/users/{userId}/... 中的 {userId}unionId(与待办、文档一致),不是 staffId。
  • 主日历:个人默认日历的 calendarId 固定使用字符串 primary(小写)。创建/查询/列表/更新/删除均针对 .../calendars/primary/events...
  • 时间格式start / end、闲忙的 startTime/endTime、列表的 timeMin/timeMax 须使用 UTC ISO8601 且含毫秒,例如 2026-03-24T07:02:48.000Z。省略毫秒易触发 ParsedISO8601TimestampError
  • 修改日程:HTTP 方法为 PUT(与「部分更新」语义对应的路径相同),请求体需包含日程 id 及要改的字段(如 summary)。
  • 视频会议:创建日程时在请求体中加 "onlineMeetingInfo":{"type":"dingtalk"},响应含 onlineMeetingInfo.url 等。
  • 会议室:先通过 会议室忙闲 接口按 roomIds + 时间窗查询;再在已有日程上 添加会议室(需企业内会议室 roomId,管理后台或开放平台可查)。集成测试可用环境变量 TEST_MEETING_ROOM_IDS(逗号分隔)。
  • 签到/签退:日程创建后,可 GET 签到/签退链接 分发参会人;组织者/参与者 POST 签到;详情用 GET signin / signOut 列表接口(见 api.md)。是否与线下会议、审批流联动以钉钉侧能力为准。

场景路由(先分类再调 API)

用户意图 优先接口方向
订会议室、查会议室有没有空 POST .../meetingRooms/schedules/query
给已有日程加会议室 POST .../events/{eventId}/meetingRooms
要签到码、签退链接 GET .../signInLinksGET .../signOutLinks
每周重复、每天重复 创建日程时带 recurrence(见 api.md)
只看人忙闲(不针对会议室) POST .../querySchedule

工作流程(每次执行前)

  1. 识别任务 → 按上表归类后,再选具体 API(见 references/api.md)。
  2. 校验配置bash scripts/dt_helper.sh --get 读取 DINGTALK_APP_KEYDINGTALK_APP_SECRETDINGTALK_MY_USER_IDDINGTALK_MY_OPERATOR_ID(缺 unionId 时 --to-unionid)。
  3. 收集缺失项 → 一次性询问并 --set 写入 ~/.dingtalk-skills/config
  4. 获取新版 TokenNEW_TOKEN=$(bash scripts/dt_helper.sh --token),请求头 x-acs-dingtalk-access-token
  5. 执行 API → 多行逻辑写入 /tmp/\x3Ctask>.sh 再执行;禁止 heredoc。

按任务校验配置

  • 通用必需DINGTALK_APP_KEYDINGTALK_APP_SECRETDINGTALK_MY_USER_ID;调用前需 unionIdDINGTALK_MY_OPERATOR_ID 或通过 --to-unionid 生成)。

未通过校验前不得调用 API。凭证展示仅前 4 位 + ****

所需配置

配置键 必填 说明
DINGTALK_APP_KEY Client ID(AppKey)
DINGTALK_APP_SECRET Client Secret
DINGTALK_MY_USER_ID 当前用户 userId(管理后台通讯录)
DINGTALK_MY_OPERATOR_ID 当前用户 unionId(--to-unionid 可写入)

身份标识说明

标识 说明
userId 企业员工 ID,管理后台可见
unionId 日程路径参数与 body 中的用户标识均使用 unionId

userId → unionId:使用旧版 access_tokenPOST https://oapi.dingtalk.com/topapi/v2/user/get(见 references/api.md),取 result.unionid(无下划线)。

执行脚本模板

#!/bin/bash
set -e
HELPER="./scripts/dt_helper.sh"
NEW_TOKEN=$(bash "$HELPER" --token)
UNION_ID=$(bash "$HELPER" --get DINGTALK_MY_OPERATOR_ID)
CAL_ID="primary"

curl -s -X POST "https://api.dingtalk.com/v1.0/calendar/users/${UNION_ID}/calendars/${CAL_ID}/events" \
  -H "x-acs-dingtalk-access-token: $NEW_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"summary":"周会","start":{"dateTime":"2026-03-25T02:00:00.000Z","timeZone":"UTC"},"end":{"dateTime":"2026-03-25T03:00:00.000Z","timeZone":"UTC"}}'

Token 异常时:bash "$HELPER" --token --nocache

references/api.md 查阅索引

grep -A 35 "^## 1. 创建日程" references/api.md
grep -A 25 "^## 2. 查询单个日程" references/api.md
grep -A 30 "^## 3. 查询日程列表" references/api.md
grep -A 25 "^## 4. 更新日程" references/api.md
grep -A 15 "^## 5. 删除日程" references/api.md
grep -A 28 "^## 6. 查询闲忙" references/api.md
grep -A 22 "^## 7. 视频会议" references/api.md
grep -A 28 "^## 8. 查询会议室忙闲" references/api.md
grep -A 25 "^## 9. 添加与移除会议室" references/api.md
grep -A 18 "^## 10. 签到与签退链接" references/api.md
grep -A 22 "^## 11. 签到与签退详情列表" references/api.md
grep -A 18 "^## 12. 签到与签退操作" references/api.md
grep -A 35 "^## 13. 循环日程" references/api.md
grep -A 15 "^## 14. 订阅日历" references/api.md
grep -A 15 "^## 错误码" references/api.md
grep -A 18 "^## 所需应用权限" references/api.md
Usage Guidance
What to check before installing: 1) Metadata mismatch — the package metadata lists no required credentials but the skill needs your DingTalk AppKey/AppSecret and user IDs; only proceed if you trust the source. 2) Inspect scripts/dt_helper.sh yourself — it stores secrets in ~/.dingtalk-skills/config and caches tokens; ensure the config file's permissions are set restrictively (e.g., chmod 600) after creation. 3) Use a least-privilege DingTalk app (limit scopes to calendar-only) and an app secret you can rotate. 4) Be aware the agent will create and execute scripts under /tmp and call DingTalk endpoints with your token — avoid installing on shared or high-value environments unless you review/modify the helper to enforce stricter file handling. 5) If you need stronger assurance, ask the publisher to update package metadata to declare required env vars and to add explicit safe-handling (permissions) for the credential file.
Capability Analysis
Type: OpenClaw Skill Name: dingtalk-calendar-only-curl Version: 0.1.0 The skill bundle provides a legitimate integration with the DingTalk Calendar API. It includes a helper script (scripts/dt_helper.sh) for managing OAuth tokens and configuration, and detailed instructions (SKILL.md) for the agent to perform CRUD operations on calendar events. While it stores credentials in a local config file (~/.dingtalk-skills/config), it includes logic to mask these secrets during display and only communicates with official DingTalk API endpoints (api.dingtalk.com and oapi.dingtalk.com).
Capability Assessment
Purpose & Capability
The skill's name/description (DingTalk calendar operations) align with the included code and API calls. The included scripts and SKILL.md implement calendar CRUD, meeting-room queries, signin/signout, and token management — all consistent with the stated purpose. However, registry metadata lists no required env vars/credentials while the SKILL.md and scripts clearly require AppKey/AppSecret/userId/unionId, which is an incoherence between declared metadata and actual needs.
Instruction Scope
SKILL.md instructs the agent to use scripts/dt_helper.sh to read/write a local config (~/.dingtalk-skills/config), obtain tokens, build /tmp/<task>.sh and execute it, and call only DingTalk API endpoints. These actions are within the calendar skill's scope, but the instructions grant the agent the ability to write persistent config with secrets and to create/execute arbitrary shell scripts in /tmp — behavior meriting awareness and review.
Install Mechanism
There is no external install/download; the skill is instruction + a bundled helper script. No remote code download or extraction from untrusted URLs is used. The installation surface is minimal (no package installs).
Credentials
The helper requires sensitive values (DINGTALK_APP_KEY, DINGTALK_APP_SECRET, DINGTALK_MY_USER_ID, DINGTALK_MY_OPERATOR_ID) which are appropriate for DingTalk API access. The problem is that the registry declares no required env vars/primary credential — a metadata mismatch. Additionally, secrets are persisted to ~/.dingtalk-skills/config with no explicit file-permission hardening in the script, which could expose credentials on multi-user systems if the file permissions are not restrictive.
Persistence & Privilege
The skill does create and persist a local config file and token cache in the user's home directory (normal for API helpers). always:false and no cross-skill or system config modifications are present. Autonomous invocation is allowed (platform default) — combine this with the above notes when reasoning about risk.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dingtalk-calendar-only-curl
  3. After installation, invoke the skill by name or use /dingtalk-calendar-only-curl
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
dingtalk-calendar-only-curl 0.1.0 - Initial release with core support for DingTalk calendar API operations using only curl. - Provides skill routing based on user intent for scheduling, calendar events, meeting rooms, video meetings, sign-in/out, and recurrence. - Includes configuration validation and environment variable management before API calls. - Documents standard script templates and API reference lookup commands. - Only unionId is supported as user identifier in API requests (not staffId).
Metadata
Slug dingtalk-calendar-only-curl
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Dingtalk Calendar Only Curl?

钉钉日程与日历。当用户提到"钉钉日程"、"日历"、"创建日程"、"新建会议"、"视频会议"、"钉钉会议"、"会议室"、"约会议室"、"会议室忙闲"、"空闲会议室"、"签到"、"签退"、"签到链接"、"签退链接"、"循环日程"、"重复日程"、"recurrence"、"查日程"、"日程列表"、"修改日程"、"删除日... It is an AI Agent Skill for Claude Code / OpenClaw, with 130 downloads so far.

How do I install Dingtalk Calendar Only Curl?

Run "/install dingtalk-calendar-only-curl" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Dingtalk Calendar Only Curl free?

Yes, Dingtalk Calendar Only Curl is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Dingtalk Calendar Only Curl support?

Dingtalk Calendar Only Curl is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Dingtalk Calendar Only Curl?

It is built and maintained by breath57 (@breath57); the current version is v0.1.0.

💬 Comments