Dingtalk profile

From ahang1598/doubao-workbuddy-qwenwork-skills · View interactive version

Dingtalk profile is an AI agent skill from the GitHub repository ahang1598/doubao-workbuddy-qwenwork-skills. 钉钉多组织 / profile 管理与跨组织取数。Use when 用户说 切换组织/换组织/跨组织/另一个钉钉/别的公司/多组织/看登录了哪些组织/profile,或在当前组织找不到群/人/数据需要去其他组织找。命令前缀:dws profile / dws auth / 全局 --profile。

How to use this skill

Skill file

钉钉多组织 / profile Skill

🧪 EXPERIMENTAL · 试验版 / Preview — multi 模式当前未达 stable 标准;接口、命名、跨 skill 引用后续可能调整。生产 / 共享环境请优先使用 mono 模式(dws skill setup --mode mono)。

PREREQUISITE: Read the dws-shared skill first for auth, global flags, product routing, URL preflight, error codes, and safety rules. The dws binary must be on PATH.

<!-- SAFETY_PREAMBLE_INJECT -->

dws 可同时登录多个钉钉账号,同一组织也可保留多个账号。一个 profile = 一个 corpId + userId 身份;当前 profile 决定本次命令注入哪个身份。

触发条件(命中任一即用本 skill)

不触发:只登录 1 个组织时,按当前组织正常处理,不带 --profile。

命令

selector 支持 corpId:userId、corpId:userName、corpName:userId、corpName:userName,也兼容单独的 corpId、唯一 corpName 和本地 profile 名。名称只用于输入;重名时必须按报错候选改用 profile list 返回的稳定 corpId:userId。

只传组织时必须存在唯一 isOrgCurrent=true 账号。多账号组织没有默认账号时先让用户指定账号;禁止选择第一项、最近登录或最近使用账号。primaryProfile/isPrimary 仅兼容输出,不参与选择。

跨组织铁律(必须执行,不得跳过)

「找群 / 找人 / 找数据」(chat search、aisearch / contact、doc / wiki 搜索等读 / 搜场景)在当前组织没命中、且 dws profile list 按 corpId 去重后显示 ≥2 个组织时,每个组织使用唯一 isOrgCurrent=true 项的 profile 各搜一遍;命中即用,全部组织都没有才追问用户。多账号组织没有默认账号时先询问用户。禁止把同一组织的多个账号重复当成多个组织。

跨组织聚合(agent 编排,无内置 --all-orgs)

① dws profile list --format json 按 corpId 分组 → ② 每组取唯一 isOrgCurrent=true 的稳定 profile;没有则询问用户 → ③ 对每个稳定 profile 各取一次数 → ④ 合并并标注来源组织和账号。

安全护栏(务必遵守)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.