Skills

Dingtalk Aisearch

AI搜问:人员语义搜索、跨源主题检索与行为回溯。Use when 语义找人,或目标未知时按主题或行为发现内容。原生最近列表走所属产品;完整手机号精确反查走...

Install

npx skills add DingTalk-Real-AI/dingtalk-workspace-cli --skill dingtalk-aisearch -g -a claude-code -y
Category
Engineering
Updated
6d ago
License
Apache-2.0
Context cost
Lightabout 1,179 tokens
Runs scripts
No, instructions only

What it does

AI搜问:人员语义搜索、跨源主题检索与行为回溯。Use when 语义找人,或目标未知时按主题或行为发现内容。原生最近列表走所属产品;完整手机号精确反查走 dingtalk-contact。前缀:dws aisearch。

钉钉 AI 搜问 Skill

<!-- DWS_RUNTIME_CONTRACT_START -->

最小执行契约

  • 只用 dws 操作钉钉,每条命令带 --format json,只按结构化返回下结论。
  • person/enterprise/behavior 直接调用,不预读 shared、Reference、Schema、Help 或下游 Skill。
  • 不猜命令、字段、ID、profile 或事实;多候选不取首项,不混用不同 domain 的 ID。
  • 空结果结束本次搜索;失败、不完整或候选结果不能表述成“对象不存在”、全量或唯一。
  • 来源不确定或用户列出多个来源时,第一条业务命令必须是一次合并 --types 的 aisearch enterprise,不能先逐产品搜索。
<!-- DWS_RUNTIME_CONTRACT_END -->

选路

意图入口
姓名、工号、部门、职位、职责、上下级或手机号线索找人dws aisearch person
按主题跨文档、消息、邮件、待办、日程、听记等找内容dws aisearch enterprise
以我为端点的发送/接收,或我创建、编辑、分享过什么dws aisearch behavior
<!-- dws-intent: chat.search.filtered -->仅 IM 且需逐条消息谓词过滤dws chat +search-msg
无主题地列最近访问/编辑文档dws drive +recent
枚举部门完整成员dingtalk-contact
完整手机号精确反查dws contact user search-mobile --mobile "<手机号>" --format json
已知稳定 ID 后读取/修改对应产品 Skill

顺序:资源范围 → 答案形态 → 原生谓词。

1. 人员搜索

维度:姓名=name,部门=department,职位=position,职责/负责人=duty,上级=supervisor,下属=subordinate,工号=jobNumber,手机号线索=phone;确实无法判断才用 all。

dws aisearch person --query "<用户原始目标>" --dimension <维度> --format json
  • 保留完整目标;独立条件分别查。正确维度为空就结束,不换 all、缩词或扩同音词。
  • 用 searchEvidence.returnedCandidateCount 报告本次候选数;无分页完成证据只称“本次返回”。
  • 姓名/花名包含查询只交付 _searchEvidence.exactAliasContainsQuery=true;exactAliasContainsCount=0 即无精确包含项,语义近似不能替代。
  • resolvedRelation.status=resolved 时直接使用 target/supervisor/relation 回答直属上级,不再搜索,也不把上级的上级当直属上级。
  • 产品归属与负责人用一次 dimension=duty,保留产品名和“负责”;仅职责证据明确者可称负责人,多候选就列候选及部门,共同上级不等于负责人。
  • 姓名与花名可由同一候选的 aliases 关联;不同域 ID 不可直接比较。需要更多人员详情时才用真实 userId 切 Contact。

2. 跨源内容搜索

时间词只进 --time-range,类型词只进 --types,其余主题进 --queries。

dws aisearch enterprise --queries "<主题>" --types <类型CSV> [--time-range "<原时间词>"] --format json

类型:文档/普通文件=document,消息=im,邮件=mail,日程=calendar,待办=todo,听记=minute,日志=report,AI表格=notable,知识内容=baike;用户列出的来源合并到一次调用。

Read the whole SKILL.md on GitHub

More in Engineering