tuzi-short-video
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShort Video Creator
短视频生成器
Creates short videos for social media platforms. Analyzes content, adapts to platform specs, generates prompts, and calls tuzi-video-gen backend.
为社交媒体平台生成短视频。分析内容,适配平台规格,生成提示词并调用tuzi-video-gen后端。
Script Directory
脚本目录
This is a workflow-only skill (no scripts). It delegates video generation to .
tuzi-video-genVIDEO_GEN_DIR: Resolve from relative to project root.
skills/tuzi-video-gen/SKILL.md这是一个仅包含工作流的skill(无独立脚本),它将视频生成任务委托给处理。
tuzi-video-genVIDEO_GEN_DIR: 从项目根目录下的路径解析得到。
skills/tuzi-video-gen/SKILL.mdStep 0: Load Preferences ⛔ BLOCKING
步骤0:加载偏好设置 ⛔ 阻塞步骤
CRITICAL: This step MUST complete BEFORE any video generation.
重要提示:该步骤必须在所有视频生成操作之前完成。
0.1 Check API Key
0.1 检查API密钥
bash
echo "${TUZI_API_KEY:-not_set}"
grep -s TUZI_API_KEY .tuzi-skills/.env "$HOME/.tuzi-skills/.env"| Result | Action |
|---|---|
| Key found | Continue to Step 0.2 |
| Key NOT found | ⛔ Run API key setup (see references/config/first-time-setup.md) |
bash
echo "${TUZI_API_KEY:-not_set}"
grep -s TUZI_API_KEY .tuzi-skills/.env "$HOME/.tuzi-skills/.env"| 结果 | 操作 |
|---|---|
| 找到密钥 | 继续执行步骤0.2 |
| 未找到密钥 | ⛔ 运行API密钥设置(参考 references/config/first-time-setup.md) |
0.2 Check EXTEND.md
0.2 检查EXTEND.md文件
bash
test -f .tuzi-skills/tuzi-short-video/EXTEND.md && echo "project"
test -f "$HOME/.tuzi-skills/tuzi-short-video/EXTEND.md" && echo "user"| Result | Action |
|---|---|
| Found | Load, parse, apply settings |
| Not found | ⛔ Run first-time setup (references/config/first-time-setup.md) |
| Path | Location |
|---|---|
| Project directory |
| User home |
EXTEND.md Supports: Default platform | Default model
Schema:
references/config/preferences-schema.mdbash
test -f .tuzi-skills/tuzi-short-video/EXTEND.md && echo "project"
test -f "$HOME/.tuzi-skills/tuzi-short-video/EXTEND.md" && echo "user"| 结果 | 操作 |
|---|---|
| 已找到 | 加载、解析并应用配置 |
| 未找到 | ⛔ 运行首次设置(参考 references/config/first-time-setup.md) |
| 路径 | 存储位置 |
|---|---|
| 项目目录 |
| 用户家目录 |
EXTEND.md支持配置项:默认平台 | 默认模型
配置Schema:
references/config/preferences-schema.mdStep 1: Analyze User Input
步骤1:分析用户输入
Analyze the user's content (text, article, script, topic description):
- Identify main topic and key points
- Determine content type (tutorial, story, showcase, explainer)
- Estimate ideal video length and segment count
分析用户提供的内容(文本、文章、脚本、主题描述):
- 识别核心主题和关键要点
- 确定内容类型(教程、故事、展示、讲解)
- 估算理想视频时长和片段数量
Step 2: Confirm Platform and Parameters
步骤2:确认平台和参数
Use AskUserQuestion to let user choose target platform (unless specified or saved in EXTEND.md):
yaml
header: "Target Platform"
question: "目标发布平台?"
options:
- label: "小红书"
description: "9:16 竖屏, 720x1280"
- label: "抖音"
description: "9:16 竖屏, 1080x1920"
- label: "X/Twitter"
description: "16:9 横屏, 1280x720"
- label: "视频号"
description: "9:16/16:9, 1080x1920"使用AskUserQuestion让用户选择目标发布平台(除非用户已指定或配置已保存在EXTEND.md中):
yaml
header: "Target Platform"
question: "目标发布平台?"
options:
- label: "小红书"
description: "9:16 竖屏, 720x1280"
- label: "抖音"
description: "9:16 竖屏, 1080x1920"
- label: "X/Twitter"
description: "16:9 横屏, 1280x720"
- label: "视频号"
description: "9:16/16:9, 1080x1920"Platform Presets
平台预设
| Platform | Aspect | Size | Duration | Notes |
|---|---|---|---|---|
| 小红书 | 9:16 | 720x1280 | 15-60s | 竖屏短视频 |
| 抖音 | 9:16 | 1080x1920 | 15-60s | 竖屏,高分辨率 |
| X/Twitter | 16:9 | 1280x720 | 5-140s | 横屏为主 |
| 视频号 | 9:16 | 1080x1920 | 15-60s | 竖屏优先 |
Platform details: See references/platforms/
| 平台 | 宽高比 | 分辨率 | 时长 | 备注 |
|---|---|---|---|---|
| 小红书 | 9:16 | 720x1280 | 15-60s | 竖屏短视频 |
| 抖音 | 9:16 | 1080x1920 | 15-60s | 竖屏,高分辨率 |
| X/Twitter | 16:9 | 1280x720 | 5-140s | 横屏为主 |
| 视频号 | 9:16 | 1080x1920 | 15-60s | 竖屏优先 |
平台详情参考:references/platforms/
Step 3: Generate Video Script
步骤3:生成视频脚本
Based on content analysis and platform:
基于内容分析结果和目标平台执行以下操作:
Single Video (content fits one clip)
单条视频(内容适合单片段展示)
- Write a detailed video generation prompt in English
- Include: visual scenes, camera movements, style, mood, lighting
- Save prompt to
prompts/01-video-prompt.md
- 编写详细的英文视频生成提示词
- 包含内容:视觉场景、镜头运动、风格、情绪、光线
- 将提示词保存到
prompts/01-video-prompt.md
Long Video (content needs multiple segments)
长视频(内容需要多片段展示)
- Split content into logical segments (opening + body + ending)
- Write per-segment prompts with continuity notes
- Save to ,
prompts/01-segment-opening.md, etc.02-segment-main.md
Workflow details: See references/workflows/
- 将内容拆分为逻辑片段(开场+主体+结尾)
- 编写每个片段的提示词并标注连贯性说明
- 分别保存到、
prompts/01-segment-opening.md等文件02-segment-main.md
工作流详情参考:references/workflows/
Step 4: Generate Video
步骤4:生成视频
Single Video
单条视频
bash
npx -y bun ${VIDEO_GEN_DIR}/scripts/main.ts \
--promptfiles <output-dir>/prompts/01-video-prompt.md \
--video <output-dir>/01-video-<slug>.mp4 \
--size <platform-size> \
--seconds <duration>bash
npx -y bun ${VIDEO_GEN_DIR}/scripts/main.ts \
--promptfiles <output-dir>/prompts/01-video-prompt.md \
--video <output-dir>/01-video-<slug>.mp4 \
--size <platform-size> \
--seconds <duration>Long Video
长视频
bash
npx -y bun ${VIDEO_GEN_DIR}/scripts/main.ts \
--video <output-dir>/01-video-<slug>.mp4 \
--segments <N> \
--segment-prompts <output-dir>/prompts/01-segment-opening.md <output-dir>/prompts/02-segment-main.md ... \
--size <platform-size> \
--seconds <per-segment-seconds>bash
npx -y bun ${VIDEO_GEN_DIR}/scripts/main.ts \
--video <output-dir>/01-video-<slug>.mp4 \
--segments <N> \
--segment-prompts <output-dir>/prompts/01-segment-opening.md <output-dir>/prompts/02-segment-main.md ... \
--size <platform-size> \
--seconds <per-segment-seconds>Step 5: Completion Report
步骤5:生成完成报告
Display:
- Output video path
- Platform and specs used
- Model used
- Duration
展示以下信息:
- 输出视频路径
- 所用平台和规格参数
- 所用生成模型
- 视频时长
Output Directory
输出目录
short-video/{topic-slug}/
├── source-{slug}.md
├── prompts/
│ ├── 01-video-prompt.md (single video)
│ ├── 01-segment-opening.md (long video)
│ ├── 02-segment-main.md
│ └── 03-segment-ending.md
├── segments/ (long video temp, cleaned up)
└── 01-video-{slug}.mp4 (final output)short-video/{topic-slug}/
├── source-{slug}.md
├── prompts/
│ ├── 01-video-prompt.md (单条视频场景)
│ ├── 01-segment-opening.md (长视频场景)
│ ├── 02-segment-main.md
│ └── 03-segment-ending.md
├── segments/ (长视频临时文件,生成后自动清理)
└── 01-video-{slug}.mp4 (最终输出视频)Extension Support
扩展支持
Custom configurations via EXTEND.md. See Step 0 for paths and supported options.
可通过EXTEND.md进行自定义配置,路径和支持的配置项参考步骤0。