breath57 avatar

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-code

Installs 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 自动转换

工作流程(每次执行前)

  1. 先识别本次任务类型 → 例如:列知识库、读文档、写文档、创建文档、成员管理
  2. 按本次任务校验所需配置 → 通过 bash scripts/dt_helper.sh --get KEY 读取;仅校验本任务必须项
  3. 仅收集缺失配置 → 若缺少某项,一次性询问用户所有缺失值,用 bash scripts/dt_helper.sh --set KEY=VALUE 写入
  4. 获取 Token / operatorId → 直接调用 bash scripts/dt_helper.sh,token 获取与缓存细节无需关心
  5. 执行操作 → 凡是包含变量替换、管道或多行逻辑的命令,写入 /tmp/<task>.sh 再 bash /tmp/<task>.sh 执行。不要把多行命令直接粘到终端里(终端工具会截断),也不要用 <<'EOF' 语法(heredoc 在工具中同样会被截断导致变量丢失)

Sponsors

Details

Repository
github.com/breath57/dingtalk-skills
Category
Documentation
First seen
Apr 16, 2026

More from breath57/dingtalk-skills

All 6
1brightdata avatarbright-data-best-practicesbrightdata/skillsBuild production-ready Bright Data integrations with best practices baked in. Reference documentation for developers using coding assistants (Claude Code, Curso1.8Kskills.sh installs
2mohitmishra786 avatarcmakemohitmishra786/low-level-dev-skillsCMake build system skill for C/C++ projects. Use when writing or refactoring CMakeLists.txt, configuring out-of-source builds, selecting generators (Ninja, Make1.8Kskills.sh installs
3refoundai avatardefining-product-visionrefoundai/lenny-skillsHelp users create compelling product visions. Use when someone is writing a vision statement, defining a long-term product direction, aligning teams on the futu1.8Kskills.sh installs
4tursodatabase avatarcode-qualitytursodatabase/tursoGeneral Correctness rules, Rust patterns, comments, avoiding over-engineering. When writing code always take these into account1.8Kskills.sh installs
5anthropics avatarskill-creatoranthropics/financial-servicesGuide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabil1.7Kskills.sh installs
6screenci avatarscreenciscreenci/screenciCreate, show, and guide with ScreenCI videos in an already-initialized project by editing `.screenci.ts` files and running the Screenci workflow.1.7Kskills.sh installs