返回顶部
c

complex-task-subagent复杂任务子代理

Complex task orchestration and subagent command framework. Execute multi-stage complex tasks via subagent (sessions_spawn), including task breakdown, state management, checkpoint-driven, timeout retry, auto-progress and sync. Suitable for serial task orchestration scenarios requiring reliable execution, auto-recovery and unattended operation.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 2.0.1
安全检测
已通过
219
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

complex-task-subagent

复杂任务指挥子代理(Complex Task Subagent)

安装

当前安装方式(推荐)

暂不支持 clawhub 安装,后续公开上架后可使用下发指令安装。

当前使用 git 安装且无需重启即可生效。

bash

克隆仓库


git clone https://gitee.com/GoSundayPlus/complex-task-subagent-skill.git ~/.openclaw/workspace/skills/complex-task-subagent

更新方法:

bash
cd ~/.openclaw/workspace/skills/complex-task-subagent
git pull

⚠️ 注意: 无需重启 OpenClaw Gateway,技能修改后自动生效。

快速开始

适用场景:当你需要通过子代理执行多阶段复杂任务时使用此技能。

触发条件:当用户提到以下关键词时,本技能会被自动激活:

  • - 深度工作模式
  • 深夜工作模式
  • 深夜无人模式
  • deepwork模式
  • 无人值守
  • 自动推进
  • 任务编排
  • 子代理

核心价值

  • - 可靠的任务编排和状态管理
  • 自动检测和推进已完成的阶段
  • 超时和重试机制,提高鲁棒性
  • 检查点驱动,支持任务恢复
  • 集成 OpenClaw Heartbeat 实现无人值守
  • 🌙 夜间无人模式:提前收集必要信息,在用户休息时自助决策完成任务
  • 🔑 关键节点确认模式:重要决策点自动提醒用户,超时自动切换无人模式
  • 💾 智能缓存管理:子代理临时缓存,正常完成自动回收,异常中断可恢复
  • 深度工作模式:完全无人值守的自动化任务执行框架

Cron 任务调用方法参考

想让定时任务发送消息到聊天窗口,必须先获取目标 ID(可以从终端获取)。

基本参数说明

参数说明必需
--name任务名称
--cron
Cron 表达式(标准 5 字段格式) | ✅ | | --session | 会话类型(isolated) | ✅ | | --message | 要发送的消息内容或任务描述 | ✅ | | --agent | 指定子代理(可选,默认使用主 agent) | ⚠️ | | --tz | 时区(推荐:Asia/Shanghai) | ⚠️ | | --announce | 开启消息投递 | ✅ | | --channel | 指定渠道 | ✅ | | --to | 指定目标(用户/群组/话题 ID) | ✅ | | --best-effort-deliver | 失败不影响任务(推荐) | ⚠️ |

Cron 表达式周期规则

重要说明:

  1. 1. 不支持相对时间:❌ now + 10m、in 5 minutes 等
  2. 标准格式要求:✅ 必须是 5 个空格分隔的字段:分 时 日 月 周
  3. 周期性执行:❌ 不支持一次性执行,只能周期性执行
  4. 时区设置:⚠️ 默认使用 UTC,建议添加 --tz Asia/Shanghai 使用北京时间

Cron 表达式示例

bash

每 5 分钟


/5 *

每 10 分钟

/10 *

每 30 分钟

/30 *

每小时(整点)

0

每天早上 9 点

0 9 *

每天晚上 10 点

0 22 *

每周一早上 9 点

0 9 1

每月 1 日早上 9 点

0 9 1

获取目标 ID 的方法

从终端获取:

  1. 1. 当前会话信息:查看终端输出的 inboundmeta,找到 chatid
  2. 飞书群组 ID:从飞书群 URL 中提取
  3. 用户 ID:从飞书设置中查看

示例:
bash

当前飞书群聊 ID


chatid: oc2495bf92d31c385fc9818642325fb3d0

用户 ID

userid: ouf2aa56becf853be2f515f64e1904d760

完整示例(单行指令)

重要:所有指令必须在一行完成,换行符会导致解析错误。

bash

每日 9 点提醒(北京时间)


openclaw cron add --name 每日提醒 --cron 0 9 * --session isolated --message 早上好!今日任务... --announce --channel feishu --to 7808697964 --tz Asia/Shanghai --best-effort-deliver

每 5 分钟测试

openclaw cron add --name 快速测试 --cron /5 * --session isolated --message 🧪 cron功能测试成功! --announce --channel feishu --to oc_2495bf92d31c385fc9818642325fb3d0 --tz Asia/Shanghai --best-effort-deliver

每小时查询天气(指定子代理)

openclaw cron add --name 天气查询 --cron 0 --session isolated --agent weatheragent --message 查询当前天气和时间 --announce --channel feishu --to oc2495bf92d31c385fc9818642325fb3d0 --tz Asia/Shanghai --best-effort-deliver

每 30 分钟喝水提醒

openclaw cron add --name 喝水提醒 --cron /30 * --session isolated --message 💧 记得喝水哦! --announce --channel feishu --to oc_2495bf92d31c385fc9818642325fb3d0 --tz Asia/Shanghai --best-effort-deliver

重要提示

  1. 1. 单行指令:❌ 多行会导致解析错误,✅ 必须在一行完成
  2. 标准 cron 表达式:❌ 不支持相对时间,✅ 必须是 5 字段格式
  3. 时区设置:⚠️ 默认 UTC,建议添加 --tz Asia/Shanghai 使用北京时间
  4. Message 参数:✅ 可以填写任务要求,会由对应的代理收到并作出响应再返回给用户
  5. Agent 参数:⚠️ 如果任务复杂,可以指定子代理 --agent agentid,否则使用默认 agent 的上下文
  6. 隔离会话:使用 --session isolated 避免影响主会话
  7. 最佳投递:添加 --best-effort-deliver 失败不影响任务执行

Message 参数的工作原理

经过测试验证:

  • - ✅ --message 参数可以填写任务要求
  • ✅ 任务会由对应的代理收到并作出响应
  • ✅ 响应会返回给用户(通过指定的 channel 和 to)
  • ✅ 可以指定 --agent 使用特定子代理,否则使用默认 agent 的上下文

示例:
bash

发送固定消息


openclaw cron add --name 固定提醒 --cron 0 9 * --session isolated --message 早上好! --announce --channel feishu --to oc_2495bf92d31c385fc9818642325fb3d0 --tz Asia/Shanghai --best-effort-deliver

发送任务描述,由代理处理

openclaw cron add --name 任务提醒 --cron 0 9 * --session isolated --message 查询今日天气和日程,并汇报给我 --announce --channel feishu --to oc_2495bf92d31c385fc9818642325fb3d0 --tz Asia/Shanghai --best-effort-deliver

指定子代理处理任务

openclaw cron add --name 天气查询 --cron 0 --session isolated --agent weatheragent --message 查询当前天气和时间 --announce --channel feishu --to oc2495bf92d31c385fc9818642325fb3d0 --tz Asia/Shanghai --best-effort-deliver

Cron 任务管理命令

bash

列出所有 cron 任务(包含名称和 id)


openclaw cron list

删除指定 cron 任务(使用 cron id,不是任务名称)

open

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 complex-task-subagent-1776062243 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 complex-task-subagent-1776062243 技能

通过命令行安装

skillhub install complex-task-subagent-1776062243

下载

⬇ 下载 complex-task-subagent v2.0.1(免费)

文件大小: 43.97 KB | 发布时间: 2026-4-15 12:16

v2.0.1 最新 2026-4-15 12:16
**Changelog for version 2.0.1:**

- Updated installation instructions: now only supports git-based install; ClawHub install instructions removed.
- Clarified that skill changes are effective immediately without restarting the gateway.
- Added detailed usage and trigger keywords for automatic activation.
- Extensive new documentation on cron tasks: parameters, message passing, agent selection, and troubleshooting.
- Included practical examples and troubleshooting advice for cron and heartbeat features.
- Improved clarity for new users, especially regarding cron/heartbeat set-up and differences.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部