social-distribute — 多平台视频分发
输入参数
调用时需提供:
| 参数 |
必填 |
说明 |
video |
✅ |
视频文件绝对路径 |
topic |
✅ |
视频主题描述(用于生成文案) |
platforms |
✅ |
目标平台列表,如 ["douyin","tiktok","bilibili","xiaohongshu","youtube","linkedin","channels"] |
cover_h |
可选 |
横版封面图路径(B站/YouTube/LinkedIn 用) |
cover_v |
可选 |
竖版封面图路径(抖音/TikTok/小红书 用) |
平台 → Shortcut 映射
| 平台 |
Shortcut 文件 |
Command |
Args |
| 抖音 |
douyin-fill.yaml |
post |
video, title, desc, cover, tags |
| TikTok |
tiktok-fill.yaml |
post |
video, title, desc, tags, cover_h, cover_v |
| B站 |
bilibili-fill.yaml |
post |
video, title, desc, cover, tags |
| 小红书 |
xhs-fill.yaml |
post_video |
video, title, desc, cover |
| YouTube |
youtube-fill.yaml |
post_video |
video, title, desc, visibility |
| LinkedIn |
linkedin-fill.yaml |
post_video |
video, title, desc |
| 微信视频号 |
channels-fill.yaml |
post |
video, title, desc, cover |
执行流程
Step 1:读取 content-rules
对目标平台列表,读取对应的平台规范文件:
~/.clawfirm/bundled/skills/social-publish/{platform}/references/content-rules.md
平台目录名映射:
douyin → douyin
tiktok → tiktok
bilibili → bilibili
xiaohongshu → xiaohongshu
youtube → youtube
channels → 无 content-rules,跳过
Step 2:一次生成全平台文案
读取所有 content-rules 后,一次 LLM 调用生成所有平台的文案,输出 JSON:
{
"douyin": { "title": "...", "desc": "...", "tags": ["tag1","tag2","tag3"] },
"tiktok": { "title": "...", "desc": "...", "tags": ["tag1","tag2","tag3"] },
"bilibili": { "title": "...", "desc": "...", "tags": ["tag1","tag2","tag3"] },
"xiaohongshu": { "title": "...", "desc": "..." },
"youtube": { "title": "...", "desc": "...", "visibility": "public" },
"linkedin": { "title": "...", "desc": "..." },
"channels": { "title": "...", "desc": "..." }
}
Step 3:并行调用 browser_shortcut 填表
对每个目标平台,调用 browser_shortcut 工具:
示例(抖音):
{
"file": "douyin-fill.yaml",
"command": "post",
"args": ["/path/to/video.mp4", "标题", "描述", "/path/to/cover_v.png", "tag1 tag2 tag3"]
}
示例(TikTok):
{
"file": "tiktok-fill.yaml",
"command": "post",
"args": ["/path/to/video.mp4", "title", "desc", "tag1 tag2 tag3", "/path/to/cover_h.png", "/path/to/cover_v.png"]
}
注意:
cover 参数传路径字符串;若该平台没有传封面,传空字符串 ""
- tags 以空格分隔拼成单个字符串传入(与各 shortcut args 定义一致)
- YouTube visibility 默认传
"public"
Step 4:汇总结果
各平台填表完成后,汇报每个平台的结果(成功/失败/跳过)。
Whipflow 骨架
agent distributor:
tools: [read, bash, browser_shortcut]
prompt: "多平台视频分发专家。严格按 content-rules 生成文案,用 browser_shortcut 执行 CDP 填表。"
# Step 1+2: 读规则 + 生成文案
let copywriting = session: distributor
prompt: """
视频分发任务:
- 视频:{video}
- 主题:{topic}
- 目标平台:{platforms}
- 横版封面:{cover_h}
- 竖版封面:{cover_v}
1. 对每个平台,读取 ~/.clawfirm/bundled/skills/social-publish/{platform}/references/content-rules.md
2. 根据各平台规范,一次生成所有平台文案,输出 JSON(含 title/desc/tags)
"""
# Step 3: 并行填表
parallel:
let douyin_result = session: distributor
prompt: "用 browser_shortcut 运行 douyin-fill.yaml post,参数:{video} {copywriting.douyin.title} {copywriting.douyin.desc} {cover_v} {copywriting.douyin.tags}"
let tiktok_result = session: distributor
prompt: "用 browser_shortcut 运行 tiktok-fill.yaml post,参数:{video} {copywriting.tiktok.title} {copywriting.tiktok.desc} {copywriting.tiktok.tags} {cover_h} {cover_v}"
let bilibili_result = session: distributor
prompt: "用 browser_shortcut 运行 bilibili-fill.yaml post,参数:{video} {copywriting.bilibili.title} {copywriting.bilibili.desc} {cover_h} {copywriting.bilibili.tags}"
let xhs_result = session: distributor
prompt: "用 browser_shortcut 运行 xhs-fill.yaml post_video,参数:{video} {copywriting.xiaohongshu.title} {copywriting.xiaohongshu.desc} {cover_v}"
let youtube_result = session: distributor
prompt: "用 browser_shortcut 运行 youtube-fill.yaml post_video,参数:{video} {copywriting.youtube.title} {copywriting.youtube.desc} public"
let linkedin_result = session: distributor
prompt: "用 browser_shortcut 运行 linkedin-fill.yaml post_video,参数:{video} {copywriting.linkedin.title} {copywriting.linkedin.desc}"
let channels_result = session: distributor
prompt: "用 browser_shortcut 运行 channels-fill.yaml post,参数:{video} {copywriting.channels.title} {copywriting.channels.desc} {cover_v}"
# Step 4: 汇总
session: distributor
prompt: "汇总各平台结果:{douyin_result} {tiktok_result} {bilibili_result} {xhs_result} {youtube_result} {linkedin_result} {channels_result}"
快捷调用方式
直接告诉 agent:
分发这个视频到抖音、B站、小红书:
- 视频:~/Desktop/final_video.mp4
- 主题:AI 工具提升工作效率
- 横版封面:~/Desktop/cover_h.png
- 竖版封面:~/Desktop/cover_v.png
Agent 会自动加载本 skill,读取 content-rules,生成文案,并行填表。
1---
2name: social-distribute
3description: |
4 一键多平台视频分发。读取各平台 content-rules,一次 LLM 调用生成全平台文案,
5 再用 browser_shortcut 并行填表。支持:抖音、TikTok、B站、小红书、YouTube、LinkedIn、微信视频号。
6 触发词:分发、发布、distribute、多平台发布、一键发布、social distribute。
7---
8
9# social-distribute — 多平台视频分发
10
11## 输入参数
12
13调用时需提供:
14
15| 参数 | 必填 | 说明 |
16|------|------|------|
17| `video` | ✅ | 视频文件绝对路径 |
18| `topic` | ✅ | 视频主题描述(用于生成文案) |
19| `platforms` | ✅ | 目标平台列表,如 `["douyin","tiktok","bilibili","xiaohongshu","youtube","linkedin","channels"]` |
20| `cover_h` | 可选 | 横版封面图路径(B站/YouTube/LinkedIn 用) |
21| `cover_v` | 可选 | 竖版封面图路径(抖音/TikTok/小红书 用) |
22
23---
24
25## 平台 → Shortcut 映射
26
27| 平台 | Shortcut 文件 | Command | Args |
28|------|-------------|---------|------|
29| 抖音 | `douyin-fill.yaml` | `post` | video, title, desc, cover, tags |
30| TikTok | `tiktok-fill.yaml` | `post` | video, title, desc, tags, cover_h, cover_v |
31| B站 | `bilibili-fill.yaml` | `post` | video, title, desc, cover, tags |
32| 小红书 | `xhs-fill.yaml` | `post_video` | video, title, desc, cover |
33| YouTube | `youtube-fill.yaml` | `post_video` | video, title, desc, visibility |
34| LinkedIn | `linkedin-fill.yaml` | `post_video` | video, title, desc |
35| 微信视频号 | `channels-fill.yaml` | `post` | video, title, desc, cover |
36
37---
38
39## 执行流程
40
41### Step 1:读取 content-rules
42
43对目标平台列表,读取对应的平台规范文件:
44
45```
46~/.clawfirm/bundled/skills/social-publish/{platform}/references/content-rules.md
47```
48
49平台目录名映射:
50- `douyin` → `douyin`
51- `tiktok` → `tiktok`
52- `bilibili` → `bilibili`
53- `xiaohongshu` → `xiaohongshu`
54- `youtube` → `youtube`
55- `channels` → 无 content-rules,跳过
56
57### Step 2:一次生成全平台文案
58
59读取所有 content-rules 后,**一次 LLM 调用**生成所有平台的文案,输出 JSON:
60
61```json
62{
63 "douyin": { "title": "...", "desc": "...", "tags": ["tag1","tag2","tag3"] },
64 "tiktok": { "title": "...", "desc": "...", "tags": ["tag1","tag2","tag3"] },
65 "bilibili": { "title": "...", "desc": "...", "tags": ["tag1","tag2","tag3"] },
66 "xiaohongshu": { "title": "...", "desc": "..." },
67 "youtube": { "title": "...", "desc": "...", "visibility": "public" },
68 "linkedin": { "title": "...", "desc": "..." },
69 "channels": { "title": "...", "desc": "..." }
70}
71```
72
73### Step 3:并行调用 browser_shortcut 填表
74
75对每个目标平台,调用 `browser_shortcut` 工具:
76
77**示例(抖音):**
78```json
79{
80 "file": "douyin-fill.yaml",
81 "command": "post",
82 "args": ["/path/to/video.mp4", "标题", "描述", "/path/to/cover_v.png", "tag1 tag2 tag3"]
83}
84```
85
86**示例(TikTok):**
87```json
88{
89 "file": "tiktok-fill.yaml",
90 "command": "post",
91 "args": ["/path/to/video.mp4", "title", "desc", "tag1 tag2 tag3", "/path/to/cover_h.png", "/path/to/cover_v.png"]
92}
93```
94
95**注意:**
96- `cover` 参数传路径字符串;若该平台没有传封面,传空字符串 `""`
97- tags 以空格分隔拼成单个字符串传入(与各 shortcut args 定义一致)
98- YouTube visibility 默认传 `"public"`
99
100### Step 4:汇总结果
101
102各平台填表完成后,汇报每个平台的结果(成功/失败/跳过)。
103
104---
105
106## Whipflow 骨架
107
108```whip
109agent distributor:
110 tools: [read, bash, browser_shortcut]
111 prompt: "多平台视频分发专家。严格按 content-rules 生成文案,用 browser_shortcut 执行 CDP 填表。"
112
113# Step 1+2: 读规则 + 生成文案
114let copywriting = session: distributor
115 prompt: """
116 视频分发任务:
117 - 视频:{video}
118 - 主题:{topic}
119 - 目标平台:{platforms}
120 - 横版封面:{cover_h}
121 - 竖版封面:{cover_v}
122
123 1. 对每个平台,读取 ~/.clawfirm/bundled/skills/social-publish/{platform}/references/content-rules.md
124 2. 根据各平台规范,一次生成所有平台文案,输出 JSON(含 title/desc/tags)
125 """
126
127# Step 3: 并行填表
128parallel:
129 let douyin_result = session: distributor
130 prompt: "用 browser_shortcut 运行 douyin-fill.yaml post,参数:{video} {copywriting.douyin.title} {copywriting.douyin.desc} {cover_v} {copywriting.douyin.tags}"
131
132 let tiktok_result = session: distributor
133 prompt: "用 browser_shortcut 运行 tiktok-fill.yaml post,参数:{video} {copywriting.tiktok.title} {copywriting.tiktok.desc} {copywriting.tiktok.tags} {cover_h} {cover_v}"
134
135 let bilibili_result = session: distributor
136 prompt: "用 browser_shortcut 运行 bilibili-fill.yaml post,参数:{video} {copywriting.bilibili.title} {copywriting.bilibili.desc} {cover_h} {copywriting.bilibili.tags}"
137
138 let xhs_result = session: distributor
139 prompt: "用 browser_shortcut 运行 xhs-fill.yaml post_video,参数:{video} {copywriting.xiaohongshu.title} {copywriting.xiaohongshu.desc} {cover_v}"
140
141 let youtube_result = session: distributor
142 prompt: "用 browser_shortcut 运行 youtube-fill.yaml post_video,参数:{video} {copywriting.youtube.title} {copywriting.youtube.desc} public"
143
144 let linkedin_result = session: distributor
145 prompt: "用 browser_shortcut 运行 linkedin-fill.yaml post_video,参数:{video} {copywriting.linkedin.title} {copywriting.linkedin.desc}"
146
147 let channels_result = session: distributor
148 prompt: "用 browser_shortcut 运行 channels-fill.yaml post,参数:{video} {copywriting.channels.title} {copywriting.channels.desc} {cover_v}"
149
150# Step 4: 汇总
151session: distributor
152 prompt: "汇总各平台结果:{douyin_result} {tiktok_result} {bilibili_result} {xhs_result} {youtube_result} {linkedin_result} {channels_result}"
153```
154
155---
156
157## 快捷调用方式
158
159直接告诉 agent:
160
161```
162分发这个视频到抖音、B站、小红书:
163- 视频:~/Desktop/final_video.mp4
164- 主题:AI 工具提升工作效率
165- 横版封面:~/Desktop/cover_h.png
166- 竖版封面:~/Desktop/cover_v.png
167```
168
169Agent 会自动加载本 skill,读取 content-rules,生成文案,并行填表。