Install
openclaw skills install master-agent-workflow-global支持跨平台的一键安装全局主控代理工作流,具备多级代理调度、错误处理、配置迁移和模板管理能力。
openclaw skills install master-agent-workflow-globalmaster-agent-workflow-global 是一个完善的主控代理工作流技能,专为需要并行任务调度、代理层级控制和完整错误处理的场景设计。这是原始 master-agent-workflow 技能的全局可迁移版本,支持一键安装、配置迁移和跨平台使用。
# 下载并安装
cd master-agent-workflow-global
./install.sh
# 发布后可用
clawdhub install master-agent-workflow-global
# 复制到全局技能目录
cp -r master-agent-workflow-global ~/.openclaw/global-skills/
# 激活技能
~/.openclaw/global-skills/master-agent-workflow/scripts/activator.sh
# 使用默认配置执行任务
使用 master-agent-workflow-global execute "处理我的任务"
# 快捷命令
maw "处理我的任务"
# 指定并行数和超时
maw "批量处理" --max-workers 10 --timeout 2h
主代理 (Main) → 主控代理 (Master) → 工作代理 (Worker) × N
~/.openclaw/global-skills/master-agent-workflow/config/
├── default.json # 默认配置
├── production.json # 生产环境配置
├── development.json # 开发环境配置
└── custom-config.json # 自定义配置
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| max_workers | number | 5 | 最大并行工作代理数 |
| timeout_hours | number | 3 | 主控代理超时时间(小时) |
| worker_timeout_minutes | number | 30 | 工作代理超时时间(分钟) |
| stuck_threshold_minutes | number | 15 | 卡住检测阈值(分钟) |
| fail_threshold | number | 10 | 失败阈值(超过则退出) |
| auto_cleanup | boolean | true | 是否自动清理完成的工作代理 |
| report_channel | string | "feishu" | 进度报告渠道 |
# 保存自定义配置
maw configure save high-performance --max-workers 20 --timeout 4h
# 使用特定配置
maw execute "任务" --config high-performance
# 列出所有配置
maw configure list
maw execute "处理文件" --template file_processing
maw execute "调用API" --template api_calling
maw execute "处理数据" --template data_processing
my-template.json:{
"name": "my_template",
"description": "我的自定义模板",
"config": {
"max_workers": 8,
"timeout_hours": 2
}
}
cp my-template.json ~/.openclaw/global-skills/master-agent-workflow/templates/
maw execute "任务" --template my_template
# 导出所有配置和模板
maw migrate export --output maw-backup.json
# 导出包含运行状态
maw migrate export --include-state --output maw-full-backup.tar.gz
# 导入配置
maw migrate import maw-backup.json
# 从其他系统导入
scp user@remote:~/maw-backup.json .
maw migrate import maw-backup.json
# 创建完整备份
maw migrate backup
# 列出备份
maw migrate list
# 清理旧备份(30天前)
maw migrate clean 30
# 安装后会自动创建批处理文件
maw.bat "执行任务"
# 环境变量
set MAW_HOME=%USERPROFILE%\.openclaw\global-skills\master-agent-workflow
# 安装后会自动创建shell脚本
maw "执行任务"
# 环境变量
export MAW_HOME=~/.openclaw/global-skills/master-agent-workflow
技能自动处理不同操作系统的路径差异:
%USERPROFILE%~~/.openclaw/global-skills/master-agent-workflow/logs/
├── execution-20260327-0930.log
├── error-20260327-0935.log
└── performance-20260327-0940.log
# 使用环境变量设置配置
export MAW_MAX_WORKERS=20
export MAW_TIMEOUT_HOURS=4
maw "任务"
#!/bin/bash
# 自动化脚本示例
# 加载配置
CONFIG="--config production"
# 执行任务
maw "每日备份任务" $CONFIG --max-workers 8 --timeout 2h
# 检查结果
if [ $? -eq 0 ]; then
echo "✅ 任务成功"
else
echo "❌ 任务失败"
exit 1
fi
# 每日凌晨2点执行
0 2 * * * /usr/bin/maw "每日任务" --config production
原因: 权限问题或依赖缺失 解决:
# 检查权限
ls -la ~/.openclaw/
# 重新安装
./install.sh --force
原因: 环境变量未生效 解决:
# 重新加载shell配置
source ~/.bashrc # 或 source ~/.zshrc
# 或直接使用完整路径
~/.openclaw/global-skills/master-agent-workflow/scripts/maw.sh
原因: 版本不兼容或文件损坏 解决:
# 检查文件格式
file backup.json
# 使用兼容模式
maw migrate import backup.json --force
# 启用详细日志
export MAW_DEBUG=true
maw "任务" --dry-run
# 查看日志
cat ~/.openclaw/global-skills/master-agent-workflow/logs/debug.log
备份当前配置
cd ~/.openclaw/workspace/skills/master-agent-workflow
cp -r . ~/maw-v1-backup/
安装v2.0.0
cd master-agent-workflow-global
./install.sh
迁移配置
maw migrate import ~/maw-v1-backup/skill.json
验证迁移
maw --version
maw execute "测试任务" --dry-run
SKILL.md - 本文件,主技能文档references/examples.md - 使用示例references/openclaw-integration.md - OpenClaw集成指南migration-guide.md - 迁移指南scripts/activator.sh - 激活脚本scripts/migrate.sh - 迁移工具scripts/maw.sh - 快捷命令templates/file_processing.json - 文件处理模板templates/api_calling.json - API调用模板templates/data_processing.json - 数据处理模板# 查看帮助
maw help
# 查看版本
maw --version
# 查看技能状态
maw status
# 生成诊断报告
maw diagnose --output diagnosis.json
# 查看日志
cat ~/.openclaw/global-skills/master-agent-workflow/logs/error.log
MIT License - 详见LICENSE文件
技能名称: master-agent-workflow-global
版本: 2.0.0
创建时间: 2026年3月25日
全局版本发布时间: 2026年3月27日
作者: 小龙
状态: ✅ 生产就绪
兼容性: OpenClaw >= 1.0.0
更新日志: