
Dingtalk Document
This handles the full document lifecycle in DingTalk's knowledge base system, from creating workspaces and folders to reading and writing document content. You'll need your app credentials and user ID from the DingTalk admin console. It's built around a helper script that manages token caching and the userId to unionId conversion that DingTalk's API requires for every operation. The skill includes detailed API references for thirteen operations, covering everything from listing workspaces to managing member permissions. One thing to note is that DingTalk uses different identifiers for different operations, so you'll be juggling docKeys, dentryUuids, and nodeIds depending on whether you're reading content or deleting files.
- skills.sh installs
- 1.8K
- GitHub stars
- 102
- last updated
- Aug 21, 2026
Install
$ npx -y skills add breath57/dingtalk-skills --skill dingtalk-document --agent claude-codeInstalls into .claude/skills of the current project.
Files
钉钉文档技能
负责钉钉知识库和文档的所有操作。本文件为策略指南,仅包含决策逻辑和工作流程。完整 API 请求格式见文末「references/api.md 查阅索引」。
dt_helper.sh位于本SKILL.md同级目录的scripts/dt_helper.sh。
核心概念
- 知识库(Workspace):文档容器,有
workspaceId和rootNodeId - 节点(Node):文件或文件夹,
type为FILE或FOLDER - 文档标识(用于
/v1.0/doc/suites/documents/{id}):可用docKey或dentryUuid- 创建文档响应会返回:
docKey、dentryUuid、nodeId - 其中
docKey/dentryUuid可用于读写正文;nodeId用于删除和文档管理类接口 wiki/nodes返回的nodeId实际上是dentryUuid,可直接用于正文读写
- 创建文档响应会返回:
- operatorId:所有接口必须的 unionId 参数,通过
bash scripts/dt_helper.sh --to-unionid自动转换
工作流程(每次执行前)
- 先识别本次任务类型 → 例如:列知识库、读文档、写文档、创建文档、成员管理
- 按本次任务校验所需配置 → 通过
bash scripts/dt_helper.sh --get KEY读取;仅校验本任务必须项 - 仅收集缺失配置 → 若缺少某项,一次性询问用户所有缺失值,用
bash scripts/dt_helper.sh --set KEY=VALUE写入 - 获取 Token / operatorId → 直接调用
bash scripts/dt_helper.sh,token 获取与缓存细节无需关心 - 执行操作 → 凡是包含变量替换、管道或多行逻辑的命令,写入
/tmp/<task>.sh再bash /tmp/<task>.sh执行。不要把多行命令直接粘到终端里(终端工具会截断),也不要用<<'EOF'语法(heredoc 在工具中同样会被截断导致变量丢失)
Sponsors
Details
- Repository
- github.com/breath57/dingtalk-skills
- Category
- Documentation
- First seen
- Apr 16, 2026