Task Director — turn complex tasks into movie storyboards. Create a plan, review it, then execute step by step with fallback support. Pause, retry, skip anytime.
把复杂任务编排成电影剧本。先看分镜,确认后再开机。
不再跑完再祈祷。先规划,再自信执行。
普通 Agent 的工作方式:
用户:部署这个项目
Agent:冲!(5分钟后报错)啊... 从头再来...
用任务导演的 Agent:
用户:部署这个项目
Agent:我给你写了个分镜,你看看?
🎬 第一幕:环境检查(预计 30s)
🎬 第二幕:安装依赖(预计 2min)
🎬 第三幕:构建部署(预计 5min)
🎭 备选:先本地测试
🎬 杀青:验证服务能访问
用户:第三幕的备选方案换成本地构建
Agent:好的,改了。开机?
用户:开机!
Agent:🎬 Action! 第一幕...
DIRECTOR = python
bash
$DIRECTOR create --title 部署全栈项目 --scenes scenes.json
scenes.json 格式:
json
[
{
name: 环境准备,
description: 检查并配置运行环境,
estimated_time: 1 min,
shots: [
{
action: 检查 Node.js 版本,
command: node --version
},
{
action: 安装项目依赖,
command: npm install,
fallback: {
action: 使用 yarn 安装,
command: yarn install
}
}
]
},
{
name: 构建部署,
shots: [
{
action: 执行构建,
command: npm run build
}
]
}
]
Shot 的字段:
bash
$DIRECTOR show # 显示当前活跃的剧本
$DIRECTOR show --id movie_xxx # 按 ID 查看
bash
$DIRECTOR approve
状态从 draft → approved,可以开始执行了。
bash
$DIRECTOR action
输出下一个待执行的 shot 信息(JSON 格式),Agent 根据这个信息去实际执行。
指定某一幕某个镜头:
bash
$DIRECTOR action --scene 2 --shot 1
Agent 执行完后,回报结果:
bash
bash
$DIRECTOR cut # 暂停(导演喊卡)
$DIRECTOR action # 继续拍摄
bash
$DIRECTOR skip --scene 1 --shot 3 --reason 不需要这一步
bash
$DIRECTOR wrap
显示最终统计:耗时、完成率、失败数。
bash
$DIRECTOR list
python
import json
scenes = [
{
name: 环境检查,
estimated_time: 30s,
shots: [
{action: 检查 Python 版本, command: python --version},
{action: 检查依赖是否安装, command: pip list | grep flask},
]
},
{
name: 启动服务,
estimated_time: 10s,
shots: [
{
action: 启动 Flask 服务,
command: python app.py,
fallback: {
action: 使用 gunicorn 启动,
command: gunicorn app:app
}
},
]
},
{
name: 验证,
estimated_time: 5s,
shots: [
{action: 检查端口是否监听, command: curl http://localhost:5000/health},
]
},
]
with open(scenes.json, w) as f:
json.dump(scenes, f, ensure_ascii=False, indent=2)
draft → approved → filming → wrapped
↘ cut → filming
Shot 状态:
pending → running → done / ng → fallback (if available) → done
↘ skipped
task-director/
├── SKILL.md # 本文件
├── scripts/
│ └── director.py # CLI 工具
└── templates/
└── example-scenes.json # 示例剧本
剧本保存在 ~/.openclaw/memory/movies/,每个剧本一个 JSON 文件。
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 task-director-1775878742 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 task-director-1775878742 技能
skillhub install task-director-1775878742
文件大小: 8.51 KB | 发布时间: 2026-4-12 11:36