← 返回 Skills 市场
shyzhen

dingtalk-doc-enterprise

作者 Ash · GitHub ↗ · v1.0.6 · MIT-0
cross-platform ⚠ suspicious
186
总下载
1
收藏
0
当前安装
7
版本数
在 OpenClaw 中安装
/install dingtalk-doc-enterprise
功能描述
钉钉文档操作技能。仅在消息明确包含 `alidocs.dingtalk.com`、`钉钉文档`、`钉钉知识库`、`alidocs`,或当前上下文已明确对象是钉钉文档时使用。支持 read/blocks/update/append-text/delete 命令,不支持 create。
使用说明 (SKILL.md)

\r \r

钉钉文档企业版\r

\r 使用同目录脚本 doc-enterprise.js 调用钉钉文档企业 API。OpenClaw 不会因为目录里存在 .js 文件就自动执行它;当任务命中本 skill 时,应按下面规则主动调用脚本。\r \r

何时使用\r

\r

🔑 触发关键词\r

\r 只有在已经确认对象是钉钉文档时,同时消息包含以下任一关键词时,优先使用本 skill:\r \r | 类别 | 关键词 |\r |------|--------|\r | 平台名 | 钉钉文档、钉钉知识库、alidocs |\r | 读取类 | 总结、读取、查看、浏览、列出结构 |\r | 修改类 | 更新、修改、追加、删除、覆写 |\r | 对象 | 文档、链接、这篇、这个文档 |\r \r 组合示例:\r

  • "总结一下这篇钉钉文档"\r
  • "读取这个 alidocs 链接"\r
  • "更新文档内容"\r
  • "删除第三段"\r \r

✅ 触发场景(优先级从高到低)\r

\r | 场景 | 示例 | 动作 |\r |------|------|------|\r | 钉钉文档链接 | alidocs.dingtalk.com/i/nodes/xxx | 自动识别,调用 readblocks |\r | 钉钉上下文 + 链接 | "总结 https://alidocs.dingtalk.com/..." | 根据意图选择命令 |\r | 明确命令 | "总结这篇文档"、"读取这个 alidocs 链接" | 根据意图选择命令 |\r | 已知上下文是钉钉文档 | 前文已给出 alidocs 链接,后续说"更新文档"、"删除某段" | 调用对应命令 |\r | 结构查询 | "列出结构"、"这个 alidocs 有哪些章节" | 调用 blocks |\r \r

❌ 不触发的场景\r

\r

  • 创建新文档(脚本未实现 create)\r
  • 没有文档链接、docKey、或明确钉钉文档上下文,却要求修改文档\r
  • 用户只说“总结文档”“更新这个链接”等泛化请求,但上下文无法确认对象是钉钉文档\r
  • 与钉钉无关的文档系统,例如本地 Markdown、飞书文档、语雀、Google Docs\r \r ---\r \r

🔑 链接识别规则\r

\r 支持以下格式的钉钉文档链接:\r \r

https://alidocs.dingtalk.com/i/nodes/\x3CdocKey>\r
https://alidocs.dingtalk.com/i/nodes/\x3CdocKey>?utm_scene=person_space\r
https://alidocs.dingtalk.com/i/nodes/\x3CdocKey>?utm_scene=team_space\r
alidocs.dingtalk.com/i/nodes/\x3CdocKey>  (无 https)\r
```\r
\r
脚本会自动提取 `\x3CdocKey>` 部分。\r
\r
## 运行前提\r
\r
必需环境变量:\r
\r
- `DINGTALK_CLIENTID`\r
- `DINGTALK_CLIENTSECRET`\r
\r
可选环境变量:\r
\r
- `DINGTALK_OPERATOR_ID`:默认操作人 unionId\r
- `OPENCLAW_SENDER_ID`:由 OpenClaw/连接器注入,用于自动识别当前发送者\r
- `OPENCLAW_SENDER_NAME`\r
\r
脚本优先使用 `DINGTALK_OPERATOR_ID`。若未设置,则尝试使用 `OPENCLAW_SENDER_ID` 查询 unionId。\r
\r
## 执行入口\r
\r
脚本文件:`doc-enterprise.js`\r
\r
执行时使用绝对路径,形式如下:\r
\r
```bash\r
node /absolute/path/to/doc-enterprise.js \x3Ccommand> [args]\r
```\r
\r
当本 skill 引用了相对路径文件时,将其相对于 `SKILL.md` 所在目录解析成绝对路径后再执行。\r
\r
## 命令映射\r
\r
### 1. 读取文档概览\r
\r
适用:\r
\r
- 用户只说“读取这篇文档”\r
- 用户贴了一个文档链接,想先快速看内容概况\r
\r
执行:\r
\r
```bash\r
node /absolute/path/to/doc-enterprise.js read \x3CdocKey-or-url>\r
```\r
\r
说明:\r
\r
- `read` 只输出块列表和部分预览文本\r
- 适合快速探测,不适合直接拿来做高质量总结\r
\r
### 2. 获取完整结构或用于总结\r
\r
适用:\r
\r
- 用户要求“总结这篇文档”\r
- 用户要求“列出结构”\r
- 后续操作需要 `blockId`\r
\r
执行:\r
\r
```bash\r
node /absolute/path/to/doc-enterprise.js blocks \x3CdocKey-or-url>\r
```\r
\r
说明:\r
\r
- 优先用 `blocks` 获取更完整的块结构\r
- 做总结前,先读取 `blocks` 的结果,再基于结果总结\r
- 删除或追加前,如果用户没有给出 `blockId`,先运行 `blocks`\r
\r
### 3. 覆写整篇文档\r
\r
适用:\r
\r
- 用户明确要求“更新整篇文档”\r
- 用户给出了新的 Markdown 内容\r
\r
执行:\r
\r
```bash\r
node /absolute/path/to/doc-enterprise.js update \x3CdocKey-or-url> \x3Cmarkdown>\r
```\r
\r
说明:\r
\r
- 这是整篇覆写,不是局部编辑\r
- 若用户只是想在末尾补一段,不要用 `update`\r
\r
### 4. 追加文本到段落块\r
\r
适用:\r
\r
- 用户要求在某个已知段落块后追加文本\r
- 已经拿到了目标 `blockId`\r
\r
执行:\r
\r
```bash\r
node /absolute/path/to/doc-enterprise.js append-text \x3CdocKey-or-url> \x3CblockId> \x3Ctext>\r
```\r
\r
说明:\r
\r
- 如果没有 `blockId`,先运行 `blocks`\r
- 仅在目标块确实是段落块时使用\r
- “没有 `blockId`” 不代表不触发本 skill,而是先查结构再执行追加\r
\r
### 5. 删除块元素\r
\r
适用:\r
\r
- 用户明确要求删除某一段或某个块\r
- 已经拿到了目标 `blockId`\r
\r
执行:\r
\r
```bash\r
node /absolute/path/to/doc-enterprise.js delete \x3CdocKey-or-url> \x3CblockId>\r
```\r
\r
说明:\r
\r
- 删除前先确认目标块,避免误删\r
- 如果用户说“删除第 3 段”,先运行 `blocks` 找到对应 `blockId`\r
- “没有 `blockId`” 不代表不触发本 skill,而是先查结构再执行删除\r
\r
## 工作流程\r
\r
1. 从用户消息中提取文档链接或 docKey。\r
2. 先确认对象确实是钉钉文档,再判断是读取、总结、列结构、覆写、追加,还是删除。\r
3. 需要 `blockId` 时,先运行 `blocks`。\r
4. 读取概览用 `read`;做总结或定位块时优先用 `blocks`。\r
5. 执行脚本后,把结果用自然语言返回给用户。\r
\r
## 错误处理\r
\r
若脚本报以下错误,按对应方式处理:\r
\r
- 缺少 `DINGTALK_CLIENTID` 或 `DINGTALK_CLIENTSECRET`:提示未配置钉钉应用凭证\r
- 缺少 `operatorId`:提示配置 `DINGTALK_OPERATOR_ID`,或确认连接器是否传入 `OPENCLAW_SENDER_ID`\r
- `forbidden.accessDenied`:提示当前用户对该文档无权限\r
- `docNotExist`:提示文档不存在,检查链接或 docKey\r
- `blockNotExist`:提示块不存在,先重新运行 `blocks` 核对\r
- `paramError`:提示参数格式错误,优先检查链接与文档 ID\r
\r
## 限制\r
\r
- 当前脚本未实现创建文档,不要承诺或尝试 `create`\r
- `read` 只适合概览,不足以替代完整正文提取\r
- 追加和删除依赖 `blockId`\r
- 覆写会直接替换整篇文档内容\r
\r
## 参考\r
\r
- 背景说明与人工阅读材料:`README.md`\r
- 实际执行脚本:`doc-enterprise.js`\r
安全使用建议
This skill appears to do what it says: it runs a local Node script that calls official DingTalk endpoints and needs your DingTalk app credentials. Before installing, verify you trust the author and inspect doc-enterprise.js (it’s included) — confirm the endpoints are only api.dingtalk.com / oapi.dingtalk.com and that no unexpected external URLs appear. Only provide DINGTALK_CLIENTID/DINGTALK_CLIENTSECRET if you intend the skill to act with those app permissions, and avoid giving high-privilege app secrets unless necessary. Note the script can overwrite entire documents (update/overwriteContent) and delete blocks — test on non-critical documents and ensure per-user permissions are correctly configured in DingTalk. Finally, ensure your Node runtime supports global fetch or provide an appropriate runtime; otherwise the script may fail but that is an operational, not security, issue.
功能分析
Type: OpenClaw Skill Name: dingtalk-doc-enterprise Version: 1.0.6 The skill bundle provides a legitimate interface for managing DingTalk Enterprise documents using official DingTalk APIs. The Node.js script (doc-enterprise.js) implements standard CRUD operations such as reading, updating, and deleting document blocks by communicating directly with api.dingtalk.com. It correctly handles authentication via environment variables (DINGTALK_CLIENTID/SECRET) and includes logic to resolve user identities (unionId) for multi-user environments. No evidence of malicious intent, data exfiltration to third-party domains, or prompt injection was found in the code or instructions.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
Name/description, SKILL.md, README, and the included script all focus on reading/updating DingTalk (alidocs) documents. Required binaries (node) and env vars (DINGTALK_CLIENTID, DINGTALK_CLIENTSECRET) are appropriate for calling DingTalk APIs.
Instruction Scope
Runtime instructions explicitly limit use to DingTalk documents and describe exact commands to run (read, blocks, update, append-text, delete). The script only accesses environment variables relevant to identifying the operator (DINGTALK_OPERATOR_ID, OPENCLAW_SENDER_ID/DINGTALK_SENDER_ID) and calls DingTalk endpoints; it does not instruct reading unrelated local files or exfiltrating data to third-party endpoints.
Install Mechanism
There is no remote install step (instruction-only install spec). The repository includes a local Node script (doc-enterprise.js) which the SKILL.md instructs the agent to execute directly. This is low-risk compared to downloading remote archives, but users should review the included script before running it since it will be executed locally.
Credentials
Requested environment variables (DINGTALK_CLIENTID, DINGTALK_CLIENTSECRET) are required to obtain DingTalk access tokens. Optional variables for operator identification (DINGTALK_OPERATOR_ID, OPENCLAW_SENDER_ID, DINGTALK_SENDER_ID) are used by the script and are justified. The skill does not request unrelated credentials or broad system secrets.
Persistence & Privilege
always is false and the skill does not request persistent elevated privileges or modify other skills or system settings. The skill will run only when invoked per SKILL.md rules; autonomous invocation is allowed by default but is ordinary for skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dingtalk-doc-enterprise
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dingtalk-doc-enterprise 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.6
- Clarified usage rules: skill now only triggers if the message or context clearly indicates a DingTalk document. - Updated trigger conditions: will not respond to generic document/edit requests unless context confirms DingTalk docs. - Expanded "Do not trigger" list to exclude other document platforms and generic links. - Added emphasis on prerequisite: confirm object is DingTalk document before running commands. - Small editorial and instruction clarifications throughout documentation.
v1.0.5
No user-visible changes; only documentation reorganization and simplification. - Updated documentation for clarity, focusing on trigger conditions, command mapping, and concise setup instructions. - Removed extensive background, API tables, and low-level details from SKILL.md. - Added direct command mapping for document read, structure, update, append, and delete operations. - Clarified scenarios where this skill triggers and cases where it does not. - Retained essential environment variable and error handling instructions.
v1.0.4
- No changes detected in this version. - The documentation and configuration remain unchanged from the previous release.
v1.0.3
- 增加了对 Node.js 运行环境的依赖声明。 - 明确了所需环境变量,新增 requires/env 字段,说明变量如何从 ~/.openclaw/.env 自动加载。 - 优化了环境变量配置说明,强调不需要在技能代码中手动读取 .env 文件。 - 其余功能和接口说明保持不变。
v1.0.2
init
v1.0.1
dingtalk-doc-enterprise 1.0.1 - 屏蔽或模糊了文档中的敏感环境变量示例,提升了安全性。 - 其余功能和配置保持不变,无新增功能或结构调整。
v1.0.0
init
元数据
Slug dingtalk-doc-enterprise
版本 1.0.6
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 7
常见问题

dingtalk-doc-enterprise 是什么?

钉钉文档操作技能。仅在消息明确包含 `alidocs.dingtalk.com`、`钉钉文档`、`钉钉知识库`、`alidocs`,或当前上下文已明确对象是钉钉文档时使用。支持 read/blocks/update/append-text/delete 命令,不支持 create。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 186 次。

如何安装 dingtalk-doc-enterprise?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dingtalk-doc-enterprise」即可一键安装,无需额外配置。

dingtalk-doc-enterprise 是免费的吗?

是的,dingtalk-doc-enterprise 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

dingtalk-doc-enterprise 支持哪些平台?

dingtalk-doc-enterprise 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 dingtalk-doc-enterprise?

由 Ash(@shyzhen)开发并维护,当前版本 v1.0.6。

💬 留言讨论