
Dingtalk Todo
Manages DingTalk todos through Claude, handling the full lifecycle from creation to deletion. The skill caches access tokens for two hours and automatically converts between userId and unionId (DingTalk's two identity schemes), which saves you from wrestling with their API docs. It persists credentials to disk so you configure once per machine. One gotcha: todos created via API land in the Teambition section of DingTalk's UI, not the personal section, and you can't delete them manually, only through the API. Useful if you're already living in DingTalk and want to script task management without opening the app.
- skills.sh installs
- 420
- GitHub stars
- 102
- last updated
- Aug 21, 2026
Install
$ npx -y skills add breath57/dingtalk-skills --skill dingtalk-todo --agent claude-codeInstalls into .claude/skills of the current project.
Files
钉钉待办技能
负责钉钉待办(Todo)的所有操作。本文件为策略指南,仅包含决策逻辑和工作流程。完整 API 请求格式见文末「references/api.md 查阅索引」。
工作流程(每次执行前)
- 读取配置 → 用一条
grep -E命令一次性读取配置文件~/.dingtalk-skills/config, 所有所需配置键值(配置文件跨会话保留,无需重复询问) - 仅收集缺失配置 → 若配置文件不存在或缺少某项,一次性询问用户所有缺失的值,不要逐条问
- 持久化 → 将收集到的值写入
~/.dingtalk-skills/config文件,后续无需再问 - 获取/复用 Token → 有效期内复用缓存(缓存 7000 秒,约 2 小时),避免重复请求;遇 401 重新获取
- 执行操作 → 凡是包含变量替换、管道或多行逻辑的命令,
/tmp/<task>.sh再bash /tmp/<task>.sh执行。不要把多行命令直接粘到终端里(终端工具会截断),也不要用<<'EOF'语法(heredoc 在工具中同样会被截断导致变量丢失)
凭证禁止在输出中完整打印,确认时仅显示前 4 位 +
****
所需配置
| 配置键 | 说明 | 如何获取 |
|---|---|---|
DINGTALK_APP_KEY | 应用 AppKey | 钉钉开放平台 → 应用管理 → 凭证信息 |
DINGTALK_APP_SECRET | 应用 AppSecret | 同上 |
DINGTALK_MY_USER_ID | 当前用户的企业员工 ID(userId) | 管理后台 → 通讯录 → 成员管理 → 点击姓名查看(不是手机号、不是 unionId) |
DINGTALK_MY_OPERATOR_ID | 当前用户的 unionId | 首次由脚本自动通过 userId 转换获取并写入 |
身份标识说明
钉钉有两种用户 ID,不同 API 使用不同的 ID:
| 标识 | 说明 | 如何获取 |
|---|---|---|
userId(= staffId) | 企业内部员工 ID,最容易获取 | 管理后台 → 通讯录 → 成员管理 → 点击姓名查看;或调用手机号查询 API |
unionId | 跨企业/跨应用唯一 | 通过 userId 调用 API 转换获取 |
Sponsors
Details
- Repository
- github.com/breath57/dingtalk-skills
- First seen
- Jun 3, 2026