SuperAPI AI Directory

dingtalk-workflow-multi-agent-dev

Agents & models

View repository

Updated 10-15 23:59

About this skill

Multi-programming-agent collaboration (dingtalk-workflow-multi-agent-dev)

Supports three working modes: competition mode, division-of-labor mode, and pipeline mode, tracking tasks and results via DingTalk. This Skill mainly orchestrates the multi-agent capabilities of the Claude Code Agent Tool, with DingTalk serving as the task management and notification layer.

Trigger methods

"并行开发"  "多代理"  "竞赛模式"  "分工模式"  "流水线协作"  "代码对比"  "多Agent开发"

Three working modes

Mode Applicable scenarios Number of agents Execution method Analogy
Competition Need the optimal solution 2-3 Same task, each completes it independently, AI compares and selects the best Olympics
Division of labor Multiple independent tasks By number of tasks Different tasks, completed in parallel Workshop assembly line
Pipeline Complex features, requiring quality assurance 2-3 Code → review → test, sequential collaboration Code review chain

Data initialization

On first use, automatically create the aitable data tables:

# 创建 Base
dws aitable base create --name "多代理开发" --yes -f json
# 返回 baseId,记为 <mad-base-id>

# 创建 2 张表
dws aitable table create --base-id <mad-base-id> --name "开发任务" --yes -f json
# 返回 tableId,记为 <tasks-table-id>

dws aitable table create --base-id <mad-base-id> --name "竞赛记录" --yes -f json
# 返回 tableId,记为 <competition-table-id>

# 添加业务字段(表创建后自动带一个"标题"primaryDoc字段,需额外添加业务字段)
dws aitable field create --base-id <mad-base-id> --table-id <tasks-table-id> --fields '[{"fieldName":"任务描述","type":"text"},{"fieldName":"工作模式","type":"text"},{"fieldName":"分配代理","type":"text"},{"fieldName":"状态","type":"text"},{"fieldName":"结果摘要","type":"text"},{"fieldName":"推荐方案","type":"text"},{"fieldName":"耗时","type":"number"},{"fieldName":"创建时间","type":"date"},{"fieldName":"完成时间","type":"date"}]' --yes -f json

dws aitable field create --base-id <mad-base-id> --table-id <competition-table-id> --fields '[{"fieldName":"关联任务","type":"text"},{"fieldName":"代理名称","type":"text"},{"fieldName":"评分","type":"number"},{"fieldName":"优点","type":"text"},{"fieldName":"缺点","type":"text"},{"fieldName":"是否推荐","type":"text"},{"fieldName":"代码路径","type":"text"}]' --yes -f json

Table 1: Development tasks (dev_tasks)

Field name Type Description
Task description Text Task details
Working mode Text Competition/Division of labor/Pipeline
Assigned agents Text Opus/Sonnet/Haiku (comma-separated)
Status Text Pending/In progress/Completed/Failed
Result summary Text Output overview
Recommended solution Text Recommended solution in competition mode
Time taken Number Execution time (seconds)
Creation time Date Task creation time
Completion time Date Task completion time

Table 2: Competition records (competition_records)

Field name Type Description
Associated task Text Associated development task description
Agent name Text Participating agent (Opus/Sonnet/Haiku)
Score Number AI score (0-10)
Pros Text Pros of this solution
Cons Text Cons of this solution
Recommended Text Yes/No
Code path Text Code file path

Working mode

Mode 1: Competition Mode

Trigger: "Use competition mode to help me implement the user login module" / "Two agents each write one version"

Workflow:

Step 1: 解析任务描述

Step 2: 使用 Agent Tool 启动 2-3 个子代理并行执行
├── Agent 1 (Opus): 执行任务...
├── Agent 2 (Sonnet): 执行任务...
└── Agent 3 (Haiku): 执行任务...(可选)

Step 3: 收集所有代理结果

Step 4: AI 对比评估
├── 代码质量(完整性、规范性)
├── 功能实现(是否满足需求)
├── 性能考虑
├── 安全性
└── 综合评分

Step 5: 选择推荐方案

Step 6: 保存记录
├── dws aitable record create → 开发任务
├── dws aitable record create → 各代理竞赛记录(批量)
└── dws todo task create → 如需要后续工作

Step 7: 发送结果通知
└── dws chat message send-by-bot → 竞赛结果汇报

Output format:

## 竞赛结果:用户登录模块

### 方案 A(Claude Opus 4.6)
- 方案:JWT + Refresh Token
- 优点:完整性好,含密码强度校验
- 缺点:代码量较大
- 评分:8.5/10

### 方案 B(Claude Sonnet 4.6)
- 方案:Session-based 认证
- 优点:简洁清晰,易于理解
- 缺点:缺少密码强度校验
- 评分:7.0/10

### 推荐:方案 A(Opus)
JWT 方案更符合现代最佳实践。

总耗时:120s

Mode 2: Division of Labor Mode

Trigger: "I have 3 tasks to do in parallel: fix bug #123, write the login page, optimize the SQL query" / "Division of labor mode"

Workflow:

Step 1: 解析任务列表

Step 2: 为每个任务分配代理(AI 自动分配或用户指定)
├── 任务1 → Agent 1
├── 任务2 → Agent 2
└── 任务3 → Agent 3

Step 3: 使用 Agent Tool 并行启动所有代理

Step 4: 收集结果

Step 5: 保存记录
├── dws aitable record create → 批量保存开发任务
└── dws todo task create → 如有后续待办

Step 6: 发送结果汇报
└── dws chat message send-by-bot

Output format:

## 分工任务完成

| 任务 | 代理 | 状态 | 耗时 |
|------|------|------|------|
| 修 bug #123 | Agent1 (Sonnet) | 完成 ✓ | 45s |
| 写登录页面 | Agent2 (Opus) | 完成 ✓ | 120s |
| 优化SQL查询 | Agent3 (Haiku) | 完成 ✓ | 60s |

总耗时 120s(串行需 225s,加速 1.9x)

Mode 3: Pipeline Mode

Trigger: "Use pipeline mode to refactor this module" / "Code→Review→Test"

Workflow:

Step 1: 解析任务

Step 2: 按流水线阶段分配代理
├── 阶段1: 代码编写 → Opus(最强代码能力)
├── 阶段2: 代码审查 → Sonnet(平衡效率和质量)
└── 阶段3: 补充测试 → Haiku(快速执行)

Step 3: 顺序执行
├── Agent 1 (Opus): 编写/重构代码 → 输出代码
├── Agent 2 (Sonnet): 审查代码 → 输出审查意见和改进建议
└── Agent 3 (Haiku): 根据审查结果补充测试 → 输出测试代码

Step 4: 汇总结果
├── 代码文件路径
├── 审查发现的问题和改进
└── 测试覆盖情况

Step 5: 保存记录并通知

Output format:

## 流水线结果:模块重构

### 阶段 1(Opus):重构代码 ✓
- 重构了 3 个文件,优化了数据流
- 耗时:90s

### 阶段 2(Sonnet):代码审查 ✓
- 发现 3 个改进建议:
  1. 错误处理不完整
  2. 缺少输入验证
  3. 建议提取公共方法
- 耗时:60s

### 阶段 3(Haiku):补充测试 ✓
- 新增 12 个测试用例,全部通过
- 覆盖率提升到 85%
- 耗时:45s

总耗时:195s

Mode 4: Task History Review

Trigger: "What previous development tasks were there" / "Competition history" / "Development records"

Workflow:

Step 1: 查询任务记录
└── dws aitable record query --base-id <mad-base-id> --table-id <tasks-table-id> --limit 50 --yes -f json

Step 2: 格式化输出历史

dws CLI Command Reference

Create multi-agent development

dws aitable base create --name "多代理开发" --yes -f json
dws aitable table create --base-id <mad-base-id> --name "开发任务" --yes -f json
dws aitable table create --base-id <mad-base-id> --name "竞赛记录" --yes -f json

Save development task

dws aitable record create --base-id <mad-base-id> --table-id <tasks-table-id> --records '[{"cells":{"标题":"实现用户登录模块","任务描述":"实现用户登录模块","工作模式":"竞赛","分配代理":"Opus,Sonnet","状态":"已完成","结果摘要":"JWT方案胜出","推荐方案":"方案A(Opus)","耗时":120,"创建时间":"2026-04-06","完成时间":"2026-04-06"}}]' --yes -f json

Save competition record

dws aitable record create --base-id <mad-base-id> --table-id <competition-table-id> --records '[{"cells":{"标题":"用户登录模块-Opus方案","关联任务":"用户登录模块","代理名称":"Opus","评分":8.5,"优点":"完整性好","缺点":"代码量大","是否推荐":"是"}},{"cells":{"标题":"用户登录模块-Sonnet方案","关联任务":"用户登录模块","代理名称":"Sonnet","评分":7.0,"优点":"简洁清晰","缺点":"缺密码校验","是否推荐":"否"}}]' --yes -f json

Query history

dws aitable record query --base-id <mad-base-id> --table-id <tasks-table-id> --limit 50 --yes -f json
dws aitable record query --base-id <mad-base-id> --table-id <competition-table-id> --limit 100 --yes -f json

Create follow-up to-do

Note: dws todo task create The server occasionally has an NPE (errorCode 999); on failure, retry once. If it still fails, save only in aitable.

dws todo task create --title "根据竞赛结果整合最优代码" --priority "20" --yes -f json
# 失败时重试:仍失败则将待办信息存入 aitable 开发任务表的结果摘要中

Send notification

dws chat message send-by-bot --robot-code "bot_code" --group "openConversationId" --title "开发任务完成" --text "竞赛结果:方案A(Opus)胜出,评分8.5/10" --yes

Linked Skill

Linked Skill Data interaction Description
content-pipeline Content creation task Multi-agent parallel content creation
morning-brief Provide development progress Morning briefing displays in-progress development tasks

Notes

  1. All dws commands must include the --yes flag
  2. Multi-agent execution depends on the Agent Tool (sub-agents) and requires sufficient computing resources
  3. Competition mode recommends 2-3 agents; too many increases comparison cost
  4. In pipeline mode, the output of each stage is the input of the next stage, and it must be executed sequentially
  5. Recommended agent allocation strategy: Opus handles complex logic, Sonnet handles medium tasks, Haiku handles simple tasks
  6. All development tasks and competition records are stored in aitable for easy review and learning
  7. This Skill has minimal association with the DingTalk platform and mainly orchestrates the Claude Code Agent Tool
  8. dws todo task create The server occasionally has a NullPointerException; on failure, retry, and if it still fails, save only in aitable

Known issues

  • dws todo task create Occasional server-side NPE (errorCode 999): Retry once. If the retry still fails, save the to-do information in the result summary field of the aitable development task table to ensure follow-up work items are not lost.