dingtalk-doc
钉钉文档管理技能。当用户发送的消息中包含 alidocs.dingtalk.com 链接、要求总结/读取/查看/更新钉钉文档或钉钉知识库文档,或当前上下文已明确对象是钉钉文档时使用。关键词:钉钉文档、钉钉知识库、alidocs、总结、读取、查看、更新、修改、文档、链接。 Skill: dingtalk-doc Owner: shyzhen Summary: 钉钉文档管理技能。当用户发送的消息中包含 alidocs.dingtalk.com 链接、要求总结/读取/查看/更新钉钉文档或钉钉知识库文档,或当前上下文已明确对象是钉钉文档时使用。关键词:钉钉文档、钉钉知识库、alidocs、总结、读取、查看、更新、修改、文档、链接。 Tags: latest:1.0.8 Version history: v1.0.8 | 2026-06-11T03:04:40.846Z | user dingtalk-doc v1.0.8 - 移除 skill-card.md 文件,精简技能描述内容。 - 无其他功能或配置变更。 v1.0.7 | 2026-06-03T09:52:16.313Z | user - Remove unnecessary file: skill-card.md to simplify the
Rank
62
Safety
84
Downloads
1.2k
Updated
Oct 11, 2026
Version
1.0.8
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.2K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.8release · observed Jun 11, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s176r4qctym5nvv0a83rs6nkex843rkg:dingtalk-doc- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-shyzhen-dingtalk-doc/snapshot"
Documentation
CLAWHUB
145,552 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: dingtalk-doc description: 钉钉文档管理技能。当用户发送的消息中包含 alidocs.dingtalk.com 链接、要求总结/读取/查看/更新钉钉文档或钉钉知识库文档,或当前上下文已明确对象是钉钉文档时使用。关键词:钉钉文档、钉钉知识库、alidocs、总结、读取、查看、更新、修改、文档、链接。 --- # 钉钉文档管理技能 通过钉钉开放平台 API 管理钉钉文档与钉钉知识库内文档。`SKILL.md` 只保留 agent 执行所需规则;配置细节、示例、API 背景见 `README.md`。 ## 何时使用 ### 触发关键词 只有在**已经确认对象是钉钉文档**时,同时消息包含以下**任一关键词**时,优先使用本 skill: | 类别 | 关键词 | |------|--------| | **平台名** | 钉钉文档、钉钉知识库、alidocs | | **读取类** | 总结、读取、查看、浏览、列出结构 | | **修改类** | 更新、修改、追加、删除、覆写 | | **对象** | 文档、链接、这篇、这个文档 | **组合示例:** - "总结一下这篇钉钉文档" - "读取这个 alidocs 链接" - "更新文档内容" - "删除第三段" ### 触发场景(优先级从高到低) | 场景 | 示例 | 动作 | |------|------|------| | **钉钉文档链接** | `alidocs.dingtalk.com/i/nodes/xxx` | 根据意图选择:元数据→`get-doc`,正文内容→`get-content` | | **钉钉上下文 + 链接** | "总结 https://alidocs.dingtalk.com/..." | 调用 `get-content` 读取内容后总结 | | **明确命令** | "总结这篇文档"、"读取这个 alidocs 链接" | 根据意图选择命令 | | **已知上下文是钉钉文档** | 前文已给出 alidocs 链接,后续说"更新文档"、"删除某段"、"在第三段后追加" | 调用对应命令 | | **结构查询** | "列出结构"、"这个 alidocs 有哪些章节" | 调用 `get-content` | | **块级操作** | "删除第三段"、"修改这个段落"、"在这里插入一段" | 先用 `get-content` 获取 blockId 和位置,再调用 `delete-block`/`modify-block`/`insert-block` | ### 不触发的场景 - 查询本地文件、离线文档或普通文本内容,且不需要调用钉钉 API - 没有文档链接、docKey、或明确钉钉文档上下文,却要求修改文档 - 用户只说"总结文档""更新这个链接"等泛化请求,但上下文无法确认对象是钉钉文档 - 与钉钉无关的文档系统,例如本地 Markdown、飞书文档、语雀、Google Docs ## 运行前提 ### 环境变量 必须配置以下环境变量 (在 Gateway 环境中): - `DINGTALK_CLIENTID` - 钉钉应用 Client ID (AppKey) - `DINGTALK_CLIENTSECRET` - 钉钉应用 Client Secret (AppSecret) 可选环境变量: - `OPENCLAW_SENDER_ID` / `DINGTALK_SENDER_ID` - 由 OpenClaw / 钉钉连接器注入的当前用户 sender_id;也可以通过命令行 `--senderId=` 显式传入 - `DINGTALK_DEBUG` - 设置为 `true` 启用调试模式;仅输出方法、路径(查询参数已脱敏)、状态码、requestId 等,不打印文档正文与完整请求体 ### operatorId 获取方式 不需要在配置中指定!系统会自动从当前会话获取: 1. 从 `OPENCLAW_SENDER_ID` 或 `DINGTALK_SENDER_ID` 获取 sender_id 2. 调用钉钉 API 查询对应的 unionId 3. 使用 unionId 作为 operatorId 如果获取失败,会显示友好的错误提示。 ## 执行规则 - 读取操作不受白名单限制 - 默认直接在白名单配置的`workspaceId`中尝试写入 - 写入操作必须通过白名单检查;未配置 workspace 或节点名不在白名单内时,一律拒绝!**没有任何方式可以绕过白名单检查!** - `whitelist: ["/"]` 表示允许写入该 workspace 下的所有节点;更细粒度控制请配置具体文档名,例如 `"/三级目录测试文档.adoc"` - 白名单配置文件 `config/whitelist.json` 只能由用户手动修改;AI 只能读取、解释、提示用户手动调整,不能替用户改 - 如果用户没有给出目标文档的 `nodeId` / `docKey`,先运行 `list-docs`、`search` 或 `get-doc` 确认目标 ## URL 解析规则 当用户提供钉钉文档 URL 时,按以下规则提取 `nodeId`: **URL 格式:** `https://alidocs.dingtalk.com/i/nodes/<nodeId>?...` **提取方法:** 1. 从 URL 中提取 `nodes/` 和 `?` 之间的部分 2. 该部分即为 `nodeId` **示例:** ``` URL: https://alidocs.dingtalk.com/i/nodes/oP0MALyR8kOd5BGacKv6NbxE83bzYmDO?utm_scene=team_space nodeId: oP0MALyR8kOd5BGacKv6NbxE83bzYmDO ``` **提取到 nodeId 后的操作:** 1. **获取文档元数据**(名称、知识库 ID 等):`get-doc --nodeId=<提取的 nodeId>` 2. **获取文档内容**(总结、读取正文):`get-content --docKey=<提取的 nodeId>` 3. 注意:`get-doc` 只返回元数据,`get-content` 才返回正文内容 ## 执行入口 - `scripts/index.js`:主入口 - `scripts/whitelist.js`:辅助检查白名单配置 **跨平台说明:** - 本 skill 的脚本基于 Node.js 内置模块实现,Windows、Linux、macOS 只要安装了 `node` 并配置好环境变量,都可以运行 - 推荐优先使用相对路径执行:`node s
README.md
# 钉钉文档管理技能 (dingtalk-doc)
> [https://clawhub.ai/shyzhen/dingtalk-doc](https://clawhub.ai/shyzhen/dingtalk-doc)
>
> 是 [dingtalk-doc-enterprise](https://clawhub.ai/shyzhen/dingtalk-doc-enterprise) 的升级版(支持写入范围控制)
通过钉钉开放平台 API 读取和管理钉钉文档、钉钉知识库中的文档。本文件面向人类读者,重点说明配置、上手方式和排障思路;执行规则与触发策略见 `SKILL.md`。
## 能力概览
- 支持列出、搜索、读取钉钉文档
- 支持创建、更新、删除钉钉文档
- 支持多个 workspace 共用一份白名单配置
- 写入操作按 workspace + 节点名白名单控制,读取操作不受白名单限制
- 当前用户身份从钉钉连接器注入的 `sender_id` 自动解析
## 文档分工
- `SKILL.md`:给 agent 的执行手册,强调触发条件、命令映射和失败处理
- `README.md`:给人的配置说明、背景信息、排障参考
## 快速开始
### 1. 配置环境变量
本 skill 可运行在 Windows、Linux、macOS;核心要求只有:
- 安装 `node`
- 配置 `DINGTALK_CLIENTID` / `DINGTALK_CLIENTSECRET`
**编辑 `~/.openclaw/.env` 文件(推荐,优先级最高)**
OpenClaw 会在启动时自动加载此文件中的环境变量。
```bash
# ~/.openclaw/.env
DINGTALK_CLIENTID=dingxxxxxx
DINGTALK_CLIENTSECRET=your_secret
```
说明:
- `DINGTALK_CLIENTID`:钉钉应用 Client ID
- `DINGTALK_CLIENTSECRET`:钉钉应用 Client Secret
- `OPENCLAW_SENDER_ID` / `DINGTALK_SENDER_ID`:通常由 OpenClaw / 钉钉连接器自动注入;如需手工调用 CLI,也可以用 `--senderId=...`
- `DINGTALK_DEBUG=true`:可选,仅输出请求方法、接口路径、状态码、requestId 等调试信息,不再打印文档正文和请求体
- `operatorId` 不需要手工配置,脚本会优先从 `--senderId` 或 `OPENCLAW_SENDER_ID` / `DINGTALK_SENDER_ID` 解析当前钉钉用户
### 2. 确认 workspaceId
- 白名单配置:只支持 【钉钉文档 -> 知识库】下新建的根目录,也就是说可写范围必须在【知识库】中。
- 直接发一篇文档给你的钉钉机器人让他随便写入一段话,就会触发白名单检查,机器人会主动告知你当前文档的workspaceId,以及如何配置。
### 3. 配置白名单
说明:
- 读取操作不依赖白名单文件
- 写入操作才需要 `config/whitelist.json`
- 如果该文件不存在,写操作会被拒绝,并提示用户手动创建
在 `config/whitelist.json` 中声明允许写入的 workspace 和节点名:
```json
{
"workspaces": [
{
"workspaceId": "eLvJDSRX3l4moO87",
"workspaceName": "AI可写知识库一级目录",
"allowRootWrite": false,
"whitelist": ["/"]
}
]
}
```
字段说明:
- `workspaceId`:知识库 ID,必填 (只支持【钉钉文档 -> 知识库】下的目录)
- `workspaceName`:可选,便于识别
- `allowRootWrite`:保留字段;当前写入校验主要使用 `whitelist`
- `whitelist`:允许写入的节点名(文档名)列表
白名单规则:
- 读取操作不检查白名单
- 写入操作必须命中白名单
- 未配置的 workspace 默认禁止写入
- `"/"` 表示允许写入当前 `workspaceId` 下的所有节点
- 细粒度白名单按节点名匹配,例如 `"/三级文档.adoc"`;当前已验证的节点详情接口不会返回完整父目录路径
## 常用命令
这里只保留几个面向人的常见示例;完整命令映射见 `SKILL.md`。
读取:
```bash
# 当前目录运行(跨平台通用)
node scripts/index.js list-workspaces
node scripts/index.js list-docs --workspaceId=OQ0xySj6ng7lX58B --parentNodeId=root
node scripts/index.js get-doc --nodeId=YQBnd5ExVE0PDnezU2PK2RK6WyeZqMmz
node scripts/index.js get-content --nodeId=YQBnd5ExVE0PDnezU2PK2RK6WyeZqMmz
node scripts/index.js get-content --docKey=真实docKey --nodeId=YQBnd5ExVE0PDnezU2PK2RK6WyeZqMmz
```
写入:
```bash
# 当前目录运行(跨平台通用)
node scripts/index.js create-doc --workspaceId=OQ0xySj6ng7lX58B --name="新文档" --docType=DOC --parentNodeId=root
node scripts/index.js update-content --nodeId=YQBnd5ExVE0PDnezU2PK2RK6WyeZqMmz --content="# 标题\n\n内容"
node scripts/index.js update-content --docKey=真实docKey --nodeId=YQBnd5ExVE0PDnezU2PK2RK6WyeZqMmz --content="# 标题\n\n内容"
```
白名单自检:
```bash
# 当前目录运行(跨平台通用)
node scripts/whitelist.js check "/三级文档.adoc"
```
_meta.json
{
"ownerId": "kn73t8gpykqmgx10ksfb6706r5842gge",
"slug": "dingtalk-doc",
"version": "1.0.8",
"publishedAt": 1781147080846
}skill-card.md
## Description: Helps an agent read, summarize, create, update, and delete DingTalk Docs and DingTalk knowledge-base documents when a DingTalk document link or context is provided. This skill is ready for commercial/non-commercial use. ## Publisher: [shyzhen](https://clawhub.ai/user/shyzhen) ### License/Terms of Use: MIT-0 ## Use Case: Developers and teams using OpenClaw with DingTalk use this skill to locate, read, summarize, create, overwrite, modify, insert into, and delete DingTalk knowledge-base documents through DingTalk APIs. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill exposes high-impact document overwrite, block modification, and delete operations. Mitigation: Require explicit user confirmation before overwrite or delete actions and review proposed content changes before execution. Risk: The bundled whitelist configuration can allow broad workspace writes. Mitigation: Replace the bundled whitelist with narrow, user-approved workspace and document targets before installation. Risk: DingTalk app credentials and token access can affect remote documents outside the local workspace. Mitigation: Install only with trusted DingTalk credentials, avoid low-level client commands, and remove or disable the get-token command where it is not needed. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/shyzhen/skills/dingtalk-doc) - [DingTalk knowledge-base overview](https://open.dingtalk.com/document/development/knowledge-base-overview) - [DingTalk API Explorer](https://open-dev.dingtalk.com/apiExplorer) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, configuration, guidance] **Output Format:** [Markdown guidance, shell commands, configuration snippets, and JSON API responses.] **Output Parameters:** [1D] **Other Properties Related to Output:** [Requires DingTalk app credentials and a sender identity; write actions can modify or delete remote DingTalk documents.] ## Skill Version(s): 1.0.8 (source: server release evidence; artifact package.json reports 1.0.6) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
config/whitelist.json
{
"_comment": "⚠️ 此配置文件只能由用户手动编辑,AI 禁止修改!",
"workspaces": [
{
"workspaceId": "eLvJDSRX3l4moO87",
"workspaceName": "AI可写知识库一级目录",
"allowRootWrite": true,
"whitelist": ["/"]
}
]
}AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/shyzhen/skills/dingtalk-doc",
"sourceUrl": "https://clawhub.ai/shyzhen/skills/dingtalk-doc",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T00:08:36.920Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-shyzhen-dingtalk-doc/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-shyzhen-dingtalk-doc/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T00:08:36.920Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.2K downloads",
"href": "https://clawhub.ai/shyzhen/dingtalk-doc",
"sourceUrl": "https://clawhub.ai/shyzhen/dingtalk-doc",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T00:08:36.920Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.8",
"href": "https://clawhub.ai/shyzhen/dingtalk-doc",
"sourceUrl": "https://clawhub.ai/shyzhen/dingtalk-doc",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-06-11T03:04:40.846Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-shyzhen-dingtalk-doc/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-shyzhen-dingtalk-doc/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.8",
"description": "dingtalk-doc v1.0.8 - 移除 skill-card.md 文件,精简技能描述内容。 - 无其他功能或配置变更。",
"href": "https://clawhub.ai/shyzhen/dingtalk-doc",
"sourceUrl": "https://clawhub.ai/shyzhen/dingtalk-doc",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-06-11T03:04:40.846Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
