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