钉钉文件管理(存储层,覆盖钉盘与文档空间)。Use when 用户说 钉盘/文档空间/我的文档中的普通文件或文件夹、查找/上传/下载/复制/移动/重命名/删除/回收站/权限/元信息,或本地与钉盘文件夹比较、拉取、推送、双向同步;也承接在线文档节点的存储管理。文档正文编辑与导出走 dingtalk-doc;明确的知识库空间及空间内节点组织走 dingtalk-wiki。命令前缀:dws drive。
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
dws CLI 操作钉钉;结构化读取使用 --format json,按真实返回判断结果。isOrgCurrent=true 默认账号;没有默认账号时要求用户指定,禁止选择第一项、最近登录或最近使用账号。--yes。dingtalk-shared 中对应 reference;不要连续猜测替代命令。drive 当前有 28 条公开 shortcut,完整清单保留在 Runtime Catalog 与 Schema,不在高频产品根 Skill 中重复展开。已知意图按下方路由。
仅当现有路由和 reference 都无法定位低频能力时,才执行 dws shortcut list --service drive --format json 做最后回退;不要为已知高频意图加载完整 Shortcut Catalog 或产品级 Schema。
| 用户意图 | 唯一推荐入口 | 关键边界 |
|---|---|---|
| 全局按名称或关键词找文件 | dws drive +search --query <关键词> | 多候选停止;在线文档正文搜索走 doc +search |
| 浏览根目录或已知文件夹 | dws drive +list [--folder <dentryUuid>] | 默认一页,处理 nextCursor |
| 发现钉盘企业空间或“我的文件”空间 | dws wiki space list --type <orgSpace|mySpace> --format json | Drive 只读前置;orgSpace 按 nextToken 续页,取 spaceId/rootFolderId 后回到 Drive |
| 查看最近访问/编辑 | dws drive +recent [--operate-type 1] --limit <N> | 1=最近编辑;默认最近访问 |
| 查看节点类型和元数据 | dws drive +inspect --node <dentryUuid> | 按需加 stats/publish/cover,不为普通列表强制调用 |
| 下载普通文件 | dws drive +download --node <dentryUuid> --output <相对路径> | 当前 shortcut 接受 ID;在线文档用 doc +export |
| 上传新文件或覆盖普通文件 | dws drive +upload --file <相对路径> | 新建可加 folder;覆盖改加 node,二者互斥 |
| 创建文件夹 | dws drive +create-folder --name <名称> [--folder <ID>] | Shortcut 已提交并读回 |
| 复制在线文档节点 | dws drive +copy --node <ID> [--folder <目标ID>] | 普通钉盘文件会被拒绝;Base 结构复制走 AITable +base-copy --base-id <ID> --target-folder-id <真实ID> --only-struct |
| 移动节点 | dws drive +move --node <ID> --folder <目标ID> | 破坏性变更,按 Runtime confirmation |
| 重命名节点 | dws drive +rename --node <ID> --name <新名称> | 写后检查最终名称 |
| 比较本地与钉盘文件夹 | dws drive status --local-folder <绝对路径> --remote-folder <folderId> | 只读;默认精确 MD5,不先拉取或推送 |
| 钉盘文件夹拉到本地 | dws drive pull --local-folder <绝对路径> --remote-folder <folderId> --if-exists skip | 安全默认不覆盖;先以相同参数 --dry-run,再按确认执行 |
| 本地文件夹推到钉盘 | dws drive push --local-folder <绝对路径> --remote-folder <folderId> --if-exists skip | 安全默认不覆盖;先 dry-run;不会删除远端多余文件 |
| 双向补齐文件夹 | dws drive sync --local-folder <绝对路径> --remote-folder <folderId> --on-conflict skip | 先 dry-run;冲突策略必须显式保留 |
+delete/+recycle-list/+recycle-restore;版本:+version-history/+version-get/+version-download/+version-revert。+star-*;公开状态:+publish-get/+publish-unset(+publish-set 不进入 Agent 路由);统计/封面用 +inspect;快捷方式用 +create-shortcut。+list 逐层遍历。兼容别名不选路:+info→+inspect,+find-file→+search,+search-docs→doc +search。
orgSpace 或“我的文件”mySpace,用 dws wiki space list --type <类型> --format json 发现空间;orgSpace 在 nextToken 非空时以 --cursor <nextToken> 续页,mySpace 固定单条且不分页。按后续命令取真实 spaceId 或 rootFolderId 后立即回到 Drive;已知这些 ID 时不做空间发现。+search → 唯一候选的 nodeId → 目标命令;不得自动选择第一项。+list,不要从根目录无界递归。+upload;不要退回 upload-info + 手写 HTTP + commit。+inspect。status/pull/push/sync,不先 status;写操作先用完全相同参数 dry-run,再正式执行。type=able 后按业务动词重路由:结构复制/删除/Base 内操作走 AITable。结构复制按当前 leaf 提供源 Base ID 和真实 --target-folder-id;缺少目标 ID 时停止,不猜根 ID或发明 --target-root。+inspect/+download/+list 只保证 dentryUuid;只有 URL 时先用 dws drive info --node <URL> --format json 解析并核对 nodeId。最短路径不省略类型检查、确认、传输验证或写后校验。
+list/+search/+recent 检查集合、hasMore 和 nextCursor;缺少集合不能当空结果,多候选禁止默认第一项。+download 验证相对路径存在且 sizeBytes > 0;+upload 检查最终 nodeId、名称、类型和大小。只有源端与结果都提供可比哈希时才核对 checksum;缺失时保留现有证据,不虚构端到端校验和。ok/outcome 和读回;partial_success 不是完成。--node、--folder 使用 dentryUuid/fileId,不使用数字型 dentryId;回收站 restore 使用 recycleItemId。+list --limit 最大 50,+search --limit 最大 30;超过时分页,不以非法参数反复试错。--yes,否则先确认。预览不带,参数变化重新确认;禁止用缺少 --yes 的失败探测。..;文件夹 status/pull/push/sync 按 leaf 契约使用绝对 --local-folder。--quick,且不会删除任一侧多余文件。Golden Route 参数足够时禁止读取 reference。其余最多读取一个精确 reference:
| 触发条件 | Reference |
|---|---|
| URL、文件类型或跨产品边界 | intent-guide |
| 文件夹比较、拉取、推送或双向同步 | folder-sync |
| 低频权限、版本、回收站、公开状态 | drive reference 的对应章节 |
| 文档查询、导入和模板保形流程 | lite-recipes |
unknown flag:只查一次当前 leaf Help;unknown command:只查一次 Drive shortcut 清单。doc +export,不重复尝试 Drive download。+copy 被拒绝时不要重试或伪装成功;独立副本改走经用户授权的 download→upload。AITable 结构复制缺少或无法验证目标文件夹时停止,不猜 ID或创建测试文件夹。+base-delete)及 Base 内操作走 AITable。dws wiki space list --type orgSpace|mySpace;只取真实 spaceId/rootFolderId 后回到 Drive。spaceId 用于空间参数,rootFolderId 才可作为空间根目录 folder;orgWikiSpace/myWikiSpace 返回 workspaceId,不能混入 Drive 参数。doc +import;Drive upload 只保留原文件。e9de685
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.