# Ad Orchestrator

> 端到端广告生成流水线编排，一键完成从商品信息到完整广告素材包的生成

- Skill: `lujiaheng-artpivot/ad-orchestrator` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add lujiaheng-artpivot/ad-orchestrator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lujiaheng-artpivot/ad-orchestrator/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: lujiaheng-artpivot (https://skillmd.com/u/lujiaheng-artpivot)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/lujiaheng-artpivot/ad-orchestrator

---


# 流水线编排 Skill

将所有广告生成Skills组合为端到端的一键流水线：商品信息 → 文案 → 场景图 → 视频 → 分析 → 变体。

## 使用方法

```bash
python3 scripts/run_pipeline.py \
  --product-image ./product.jpg \
  --product-info '{"name": "无线耳机", "price": "299元", "features": ["主动降噪", "40小时续航"]}' \
  --platform douyin \
  --style minimal \
  --output-dir ./ad_output
```

## 参数说明

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `--product-image` | string | ✅ | 商品主图路径 |
| `--product-info` | JSON | ✅ | 商品信息，包含名称、价格、卖点等 |
| `--platform` | string | ✅ | 目标平台：douyin/xiaohongshu/taobao/kuaishou |
| `--tone` | string |  | 文案风格：urgent/elegant/fun/professional/cute/casual/formal，默认根据平台自动选择 |
| `--style` | string |  | 视觉风格：minimal/realistic/cartoon/vintage/futuristic，默认minimal |
| `--motion` | string |  | 运镜效果：zoom/pan/rotate/parallax/static，默认zoom |
| `--duration` | number |  | 视频时长（秒），默认15 |
| `--ratio` | string |  | 视频比例，默认根据平台自动选择 |
| `--skip-variants` | boolean |  | 跳过A/B测试变体生成，默认false |
| `--variant-count` | number |  | 变体数量，默认3 |
| `--skip-analysis` | boolean |  | 跳过素材分析，默认false |
| `--output-dir` | string |  | 输出目录，默认 ./ad_output |
| `--resume` | boolean |  | 从上次中断的地方继续，默认false |

## 输出目录结构

```
ad_output/
├── task_info.json           # 任务信息
├── copy/                    # 文案
│   └── ad_copy.json
├── scenes/                  # 场景图
│   ├── scene_1.png
│   ├── scene_2.png
│   └── scene_metadata.json
├── video/                   # 主视频
│   ├── ad_video.mp4
│   └── ad_video.srt
├── analysis/                # 分析报告
│   └── analysis_report.json
├── variants/                # A/B测试变体
│   ├── original/
│   ├── variant_1/
│   ├── variant_2/
│   └── variants_report.json
└── events/                  # 事件日志
    ├── event_copy_generated.json
    ├── event_scene_generated.json
    ├── event_video_generated.json
    ├── event_analysis_completed.json
    └── event_variants_generated.json
```

## 事件流

流水线会按顺序触发以下事件：
1. `pipeline.started` → 流水线启动
2. `copy.generated` → 文案生成完成
3. `scene.generated` → 场景图生成完成
4. `video.generated` → 视频生成完成
5. `analysis.completed` → 分析完成（如果启用）
6. `variants.generated` → 变体生成完成（如果启用）

## 平台默认配置

| 平台 | 默认比例 | 默认文案风格 | 建议时长 |
|------|----------|--------------|----------|
| 抖音 | 9:16 | urgent | 10-15秒 |
| 小红书 | 3:4 | elegant | 15-30秒 |
| 淘宝 | 1:1 | professional | 15-20秒 |
| 快手 | 9:16 | fun | 10-15秒 |

## 错误处理

- 每个步骤失败都会自动重试2次
- 支持断点续传，使用`--resume`参数从中断处继续
- 所有错误都会记录到 `{output_dir}/pipeline.log`

