remotion-claude-agent-demo 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +160 -0
  2. package/apps/web/README.md +36 -0
  3. package/apps/web/env.example +20 -0
  4. package/apps/web/eslint.config.mjs +18 -0
  5. package/apps/web/next.config.ts +7 -0
  6. package/apps/web/package-lock.json +10348 -0
  7. package/apps/web/package.json +35 -0
  8. package/apps/web/postcss.config.mjs +7 -0
  9. package/apps/web/public/file.svg +1 -0
  10. package/apps/web/public/globe.svg +1 -0
  11. package/apps/web/public/next.svg +1 -0
  12. package/apps/web/public/vercel.svg +1 -0
  13. package/apps/web/public/window.svg +1 -0
  14. package/apps/web/src/app/.well-known/agent-card.json/route.ts +50 -0
  15. package/apps/web/src/app/background-tasks/[jobId]/cancel/route.ts +29 -0
  16. package/apps/web/src/app/events/stream/route.ts +58 -0
  17. package/apps/web/src/app/favicon.ico +0 -0
  18. package/apps/web/src/app/globals.css +174 -0
  19. package/apps/web/src/app/layout.tsx +34 -0
  20. package/apps/web/src/app/messages/answer/route.ts +57 -0
  21. package/apps/web/src/app/messages/stream/route.ts +381 -0
  22. package/apps/web/src/app/page.tsx +358 -0
  23. package/apps/web/src/app/tasks/[taskId]/cancel/route.ts +24 -0
  24. package/apps/web/src/app/tasks/[taskId]/route.ts +24 -0
  25. package/apps/web/src/app/tasks/route.ts +13 -0
  26. package/apps/web/src/components/chat/agent-blocks.tsx +111 -0
  27. package/apps/web/src/components/chat/ask-user-question-panel.tsx +172 -0
  28. package/apps/web/src/components/chat/session-sidebar.tsx +222 -0
  29. package/apps/web/src/components/chat/subagent-activity-sidebar.tsx +248 -0
  30. package/apps/web/src/components/chat/tool-blocks.tsx +550 -0
  31. package/apps/web/src/lib/a2a/activity-store.ts +150 -0
  32. package/apps/web/src/lib/a2a/client.ts +357 -0
  33. package/apps/web/src/lib/a2a/sse.ts +19 -0
  34. package/apps/web/src/lib/a2a/task-store.ts +111 -0
  35. package/apps/web/src/lib/a2a/types.ts +216 -0
  36. package/apps/web/src/lib/agent/answer-store.ts +109 -0
  37. package/apps/web/src/lib/agent/background-delivery.ts +343 -0
  38. package/apps/web/src/lib/agent/background-tool.ts +78 -0
  39. package/apps/web/src/lib/agent/background.ts +452 -0
  40. package/apps/web/src/lib/agent/chat.ts +543 -0
  41. package/apps/web/src/lib/agent/session-store.ts +26 -0
  42. package/apps/web/src/lib/chat/types.ts +44 -0
  43. package/apps/web/src/lib/env.ts +31 -0
  44. package/apps/web/src/lib/hooks/useA2AChat.ts +863 -0
  45. package/apps/web/src/lib/state/chat-atoms.ts +52 -0
  46. package/apps/web/src/lib/workspace.ts +9 -0
  47. package/apps/web/tsconfig.json +35 -0
  48. package/bin/remotion-agent.js +451 -0
  49. package/package.json +34 -0
  50. package/templates/.claude/CLAUDE.md +95 -0
  51. package/templates/.claude/README.md +129 -0
  52. package/templates/.claude/agents/composer-agent.md +188 -0
  53. package/templates/.claude/agents/crafter.md +181 -0
  54. package/templates/.claude/agents/creator.md +134 -0
  55. package/templates/.claude/agents/perceiver.md +92 -0
  56. package/templates/.claude/settings.json +36 -0
  57. package/templates/.claude/settings.local.json +39 -0
  58. package/templates/.claude/skills/agent-browser/SKILL.md +349 -0
  59. package/templates/.claude/skills/agent-browser/references/authentication.md +188 -0
  60. package/templates/.claude/skills/agent-browser/references/proxy-support.md +175 -0
  61. package/templates/.claude/skills/agent-browser/references/session-management.md +181 -0
  62. package/templates/.claude/skills/agent-browser/references/snapshot-refs.md +186 -0
  63. package/templates/.claude/skills/agent-browser/references/video-recording.md +162 -0
  64. package/templates/.claude/skills/agent-browser/templates/authenticated-session.sh +91 -0
  65. package/templates/.claude/skills/agent-browser/templates/capture-workflow.sh +68 -0
  66. package/templates/.claude/skills/agent-browser/templates/form-automation.sh +64 -0
  67. package/templates/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
  68. package/templates/.claude/skills/algorithmic-art/SKILL.md +405 -0
  69. package/templates/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
  70. package/templates/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
  71. package/templates/.claude/skills/asset-validator/SKILL.md +376 -0
  72. package/templates/.claude/skills/audio-video-sync/SKILL.md +219 -0
  73. package/templates/.claude/skills/bgm-manager/SKILL.md +334 -0
  74. package/templates/.claude/skills/remotion-best-practices/SKILL.md +45 -0
  75. package/templates/.claude/skills/remotion-best-practices/rules/3d.md +86 -0
  76. package/templates/.claude/skills/remotion-best-practices/rules/animations.md +29 -0
  77. package/templates/.claude/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
  78. package/templates/.claude/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
  79. package/templates/.claude/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
  80. package/templates/.claude/skills/remotion-best-practices/rules/assets.md +78 -0
  81. package/templates/.claude/skills/remotion-best-practices/rules/audio.md +172 -0
  82. package/templates/.claude/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
  83. package/templates/.claude/skills/remotion-best-practices/rules/can-decode.md +75 -0
  84. package/templates/.claude/skills/remotion-best-practices/rules/charts.md +58 -0
  85. package/templates/.claude/skills/remotion-best-practices/rules/compositions.md +141 -0
  86. package/templates/.claude/skills/remotion-best-practices/rules/display-captions.md +126 -0
  87. package/templates/.claude/skills/remotion-best-practices/rules/extract-frames.md +229 -0
  88. package/templates/.claude/skills/remotion-best-practices/rules/fonts.md +152 -0
  89. package/templates/.claude/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
  90. package/templates/.claude/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
  91. package/templates/.claude/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
  92. package/templates/.claude/skills/remotion-best-practices/rules/gifs.md +138 -0
  93. package/templates/.claude/skills/remotion-best-practices/rules/images.md +130 -0
  94. package/templates/.claude/skills/remotion-best-practices/rules/import-srt-captions.md +67 -0
  95. package/templates/.claude/skills/remotion-best-practices/rules/lottie.md +68 -0
  96. package/templates/.claude/skills/remotion-best-practices/rules/maps.md +403 -0
  97. package/templates/.claude/skills/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
  98. package/templates/.claude/skills/remotion-best-practices/rules/measuring-text.md +143 -0
  99. package/templates/.claude/skills/remotion-best-practices/rules/parameters.md +98 -0
  100. package/templates/.claude/skills/remotion-best-practices/rules/sequencing.md +118 -0
  101. package/templates/.claude/skills/remotion-best-practices/rules/tailwind.md +11 -0
  102. package/templates/.claude/skills/remotion-best-practices/rules/text-animations.md +20 -0
  103. package/templates/.claude/skills/remotion-best-practices/rules/timing.md +179 -0
  104. package/templates/.claude/skills/remotion-best-practices/rules/transcribe-captions.md +19 -0
  105. package/templates/.claude/skills/remotion-best-practices/rules/transitions.md +122 -0
  106. package/templates/.claude/skills/remotion-best-practices/rules/trimming.md +53 -0
  107. package/templates/.claude/skills/remotion-best-practices/rules/videos.md +171 -0
  108. package/templates/.claude/skills/remotion-components/SKILL.md +453 -0
  109. package/templates/.claude/skills/render-config/SKILL.md +290 -0
  110. package/templates/.claude/skills/script-writer/SKILL.md +59 -0
  111. package/templates/.claude/skills/style-director/script-writer/SKILL.md +82 -0
  112. package/templates/.claude/skills/style-director/style-director/SKILL.md +287 -0
  113. package/templates/.claude/skills/style-director/style-director/references/audience-and-scenarios.md +43 -0
  114. package/templates/.claude/skills/style-director/style-director/references/interaction-innovation.md +26 -0
  115. package/templates/.claude/skills/style-director/style-director/references/motion-grammar.md +66 -0
  116. package/templates/.claude/skills/style-director/style-director/references/quality-checklist.md +29 -0
  117. package/templates/.claude/skills/style-director/style-director/references/scene-recipes.md +38 -0
  118. package/templates/.claude/skills/style-director/style-director/references/visual-style-system.md +148 -0
  119. package/templates/.claude/skills/subtitle-composer/SKILL.md +304 -0
  120. package/templates/.claude/skills/subtitle-processor/SKILL.md +308 -0
  121. package/templates/.claude/skills/timeline-generator/SKILL.md +253 -0
  122. package/templates/.claude/skills/video-preflight-check/SKILL.md +353 -0
  123. package/templates/.claude/skills/voice-synthesizer/SKILL.md +296 -0
  124. package/templates/.claude/skills/voice-synthesizer/scripts/synthesize_voice.py +315 -0
  125. package/templates/.claude/skills/voice-synthesizer/scripts/tts_cli.py +142 -0
  126. package/templates/.claude/skills/web-design-guidelines/SKILL.md +36 -0
  127. package/templates/.claude/skills/youtube-downloader/SKILL.md +99 -0
  128. package/templates/.claude/skills/youtube-downloader/scripts/download_video.py +145 -0
@@ -0,0 +1,290 @@
1
+ ---
2
+ name: render-config
3
+ version: 1.0.0
4
+ description: 渲染配置技能。管理视频输出规格、编码参数、质量预设等渲染设置。
5
+ triggers:
6
+ - 渲染配置
7
+ - 输出设置
8
+ - render
9
+ - 视频导出
10
+ tools:
11
+ - Read
12
+ - Write
13
+ - Bash
14
+ ---
15
+
16
+ # 渲染配置技能 (Render Config)
17
+
18
+ 管理Remotion视频渲染的各项配置,提供标准化的输出规格和质量预设。
19
+
20
+ ## 输出规格预设
21
+
22
+ ### 1. 分辨率选项
23
+
24
+ | 预设名称 | 分辨率 | 宽高比 | 适用场景 |
25
+ |----------|--------|--------|----------|
26
+ | 1080p | 1920×1080 | 16:9 | YouTube、通用 |
27
+ | 4K | 3840×2160 | 16:9 | 高清展示 |
28
+ | 720p | 1280×720 | 16:9 | 快速预览 |
29
+ | vertical | 1080×1920 | 9:16 | 抖音、小红书 |
30
+ | square | 1080×1080 | 1:1 | Instagram |
31
+
32
+ ### 2. 帧率选项
33
+
34
+ | 帧率 | 适用场景 |
35
+ |------|----------|
36
+ | 30fps | 标准视频(默认) |
37
+ | 60fps | 流畅动画 |
38
+ | 24fps | 电影感 |
39
+
40
+ ## Remotion 渲染命令
41
+
42
+ ### 基础命令结构
43
+
44
+ ```bash
45
+ npx remotion render <entry-file> <composition-id> <output-path> [options]
46
+ ```
47
+
48
+ ### 常用预设命令
49
+
50
+ ```bash
51
+ # 1080p 标准质量(推荐)
52
+ npx remotion render src/index.ts MyVideo out/video.mp4 \
53
+ --codec h264 \
54
+ --crf 18 \
55
+ --pixel-format yuv420p
56
+
57
+ # 4K 高质量
58
+ npx remotion render src/index.ts MyVideo out/video-4k.mp4 \
59
+ --codec h264 \
60
+ --crf 15 \
61
+ --scale 2 \
62
+ --pixel-format yuv420p
63
+
64
+ # 720p 快速预览
65
+ npx remotion render src/index.ts MyVideo out/preview.mp4 \
66
+ --codec h264 \
67
+ --crf 28 \
68
+ --scale 0.67 \
69
+ --every-nth-frame 2
70
+
71
+ # 竖屏视频(需要在 Root.tsx 中配置 1080×1920)
72
+ npx remotion render src/index.ts MyVideoVertical out/video-vertical.mp4 \
73
+ --codec h264 \
74
+ --crf 18
75
+
76
+ # GIF 预览(前 3 秒)
77
+ npx remotion render src/index.ts MyVideo out/preview.gif \
78
+ --frames 0-90 \
79
+ --scale 0.5
80
+ ```
81
+
82
+ ## 编码参数详解
83
+
84
+ ### CRF (恒定质量因子)
85
+
86
+ CRF 控制视频质量和文件大小的平衡:
87
+
88
+ | CRF 值 | 质量 | 文件大小 | 推荐场景 |
89
+ |--------|------|----------|----------|
90
+ | 15-17 | 极高 | 最大 | 存档、后期编辑 |
91
+ | 18-20 | 高 | 较大 | 最终发布(推荐) |
92
+ | 21-23 | 中等 | 中等 | 一般用途 |
93
+ | 24-28 | 较低 | 较小 | 预览、快速分享 |
94
+
95
+ ### 编码器选项
96
+
97
+ ```bash
98
+ # H.264 - 兼容性最好(默认)
99
+ --codec h264
100
+
101
+ # H.265 - 更小文件,更高质量
102
+ --codec h265
103
+
104
+ # ProRes - 专业后期
105
+ --codec prores
106
+
107
+ # VP9 - 网页优化
108
+ --codec vp9
109
+ ```
110
+
111
+ ### 像素格式
112
+
113
+ ```bash
114
+ # YUV 4:2:0 - 标准格式,兼容性好
115
+ --pixel-format yuv420p
116
+
117
+ # YUV 4:4:4 - 高质量,文件更大
118
+ --pixel-format yuv444p
119
+ ```
120
+
121
+ ## 配置文件
122
+
123
+ ### remotion.config.ts
124
+
125
+ ```typescript
126
+ import { Config } from "@remotion/cli/config";
127
+
128
+ // 默认配置
129
+ Config.setCodec("h264");
130
+ Config.setCrf(18);
131
+ Config.setPixelFormat("yuv420p");
132
+ Config.setConcurrency(8); // 并行渲染线程数
133
+
134
+ // 输出目录
135
+ Config.setOutputLocation("out/video.mp4");
136
+
137
+ // 日志级别
138
+ Config.setLogLevel("info"); // verbose | info | warn | error
139
+ ```
140
+
141
+ ### package.json 脚本
142
+
143
+ ```json
144
+ {
145
+ "scripts": {
146
+ "preview": "remotion preview src/index.ts",
147
+ "render": "remotion render src/index.ts MyVideo out/video.mp4",
148
+ "render:hq": "remotion render src/index.ts MyVideo out/video-hq.mp4 --crf 15",
149
+ "render:preview": "remotion render src/index.ts MyVideo out/preview.mp4 --crf 28 --scale 0.5",
150
+ "render:4k": "remotion render src/index.ts MyVideo out/video-4k.mp4 --scale 2 --crf 15",
151
+ "render:vertical": "remotion render src/index.ts MyVideoVertical out/video-vertical.mp4",
152
+ "render:gif": "remotion render src/index.ts MyVideo out/preview.gif --frames 0-90"
153
+ }
154
+ }
155
+ ```
156
+
157
+ ## 多分辨率输出
158
+
159
+ 在 Root.tsx 中定义多个 Composition:
160
+
161
+ ```tsx
162
+ import { Composition } from "remotion";
163
+ import { MainVideo, TOTAL_DURATION } from "./MainVideo";
164
+
165
+ export const RemotionRoot: React.FC = () => {
166
+ return (
167
+ <>
168
+ {/* 标准 1080p */}
169
+ <Composition
170
+ id="MyVideo"
171
+ component={MainVideo}
172
+ durationInFrames={TOTAL_DURATION}
173
+ fps={30}
174
+ width={1920}
175
+ height={1080}
176
+ />
177
+
178
+ {/* 竖屏 9:16 */}
179
+ <Composition
180
+ id="MyVideoVertical"
181
+ component={MainVideo}
182
+ durationInFrames={TOTAL_DURATION}
183
+ fps={30}
184
+ width={1080}
185
+ height={1920}
186
+ />
187
+
188
+ {/* 方形 1:1 */}
189
+ <Composition
190
+ id="MyVideoSquare"
191
+ component={MainVideo}
192
+ durationInFrames={TOTAL_DURATION}
193
+ fps={30}
194
+ width={1080}
195
+ height={1080}
196
+ />
197
+ </>
198
+ );
199
+ };
200
+ ```
201
+
202
+ ## 批量渲染脚本
203
+
204
+ ```bash
205
+ #!/bin/bash
206
+ # scripts/render-all.sh
207
+
208
+ echo "🎬 开始批量渲染..."
209
+
210
+ # 1080p 标准版
211
+ echo "📹 渲染 1080p 版本..."
212
+ npx remotion render src/index.ts MyVideo out/video-1080p.mp4 --crf 18
213
+
214
+ # 720p 预览版
215
+ echo "📹 渲染 720p 预览版..."
216
+ npx remotion render src/index.ts MyVideo out/video-720p.mp4 --crf 23 --scale 0.67
217
+
218
+ # 竖屏版
219
+ echo "📹 渲染竖屏版本..."
220
+ npx remotion render src/index.ts MyVideoVertical out/video-vertical.mp4 --crf 18
221
+
222
+ # GIF 预览
223
+ echo "📹 生成 GIF 预览..."
224
+ npx remotion render src/index.ts MyVideo out/preview.gif --frames 0-90 --scale 0.5
225
+
226
+ echo "✅ 所有渲染完成!"
227
+ ls -la out/
228
+ ```
229
+
230
+ ## 渲染性能优化
231
+
232
+ ### 1. 并行渲染
233
+
234
+ ```bash
235
+ # 使用更多线程(默认为 CPU 核心数的一半)
236
+ npx remotion render ... --concurrency 16
237
+ ```
238
+
239
+ ### 2. 跳帧预览
240
+
241
+ ```bash
242
+ # 每隔2帧渲染一帧,速度翻倍
243
+ npx remotion render ... --every-nth-frame 2
244
+ ```
245
+
246
+ ### 3. 指定帧范围
247
+
248
+ ```bash
249
+ # 只渲染前100帧
250
+ npx remotion render ... --frames 0-100
251
+
252
+ # 渲染中间部分
253
+ npx remotion render ... --frames 500-1000
254
+ ```
255
+
256
+ ### 4. GPU 加速
257
+
258
+ ```bash
259
+ # 启用 GPU 编码(如果支持)
260
+ npx remotion render ... --gl angle
261
+ ```
262
+
263
+ ## 质量检查清单
264
+
265
+ 渲染完成后的检查项:
266
+
267
+ - [ ] 文件大小合理(1分钟约 10-30MB)
268
+ - [ ] 播放流畅无卡顿
269
+ - [ ] 音画同步
270
+ - [ ] 字幕清晰可读
271
+ - [ ] 颜色正确无偏色
272
+ - [ ] 开头结尾无黑屏
273
+
274
+ ## 推荐工作流
275
+
276
+ ```
277
+ 1. 开发阶段
278
+ └─ npm run preview (实时预览)
279
+
280
+ 2. 测试阶段
281
+ └─ npm run render:preview (快速低质量渲染)
282
+
283
+ 3. 最终输出
284
+ └─ npm run preflight (预检)
285
+ └─ npm run render (标准质量渲染)
286
+
287
+ 4. 多平台发布
288
+ └─ npm run render:4k (YouTube 4K)
289
+ └─ npm run render:vertical (抖音/小红书)
290
+ ```
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: script-writer
3
+ description: 视频脚本编写技能。专注于产品教程、Demo演示、SaaS介绍的脚本撰写。
4
+ ---
5
+
6
+ ## 脚本结构
7
+
8
+ ### 产品教程 (2-4分钟)
9
+ ```
10
+ 1. Hook (5秒) - 问题/痛点引入
11
+ 2. 概述 (15秒) - 今天学什么
12
+ 3. 步骤演示 (主体) - 分步讲解
13
+ 4. 总结 (10秒) - 关键点回顾
14
+ 5. CTA (5秒) - 行动号召
15
+ ```
16
+
17
+ ### Demo演示 (4-7分钟)
18
+ ```
19
+ 1. Hook (10秒) - 展示最终效果
20
+ 2. 问题 (20秒) - 用户痛点
21
+ 3. 解决方案 (30秒) - 产品定位
22
+ 4. 功能演示 (主体) - 核心功能展示
23
+ 5. 价值总结 (15秒) - 用户收益
24
+ 6. CTA (10秒) - 如何开始
25
+ ```
26
+
27
+ ### SaaS介绍 (3-5分钟)
28
+ ```
29
+ 1. Hook (10秒) - 痛点场景
30
+ 2. 产品介绍 (20秒) - 一句话定位
31
+ 3. 核心功能 (主体) - 3-5个亮点
32
+ 4. 社会证明 (15秒) - 数据/案例
33
+ 5. CTA (10秒) - 注册/试用
34
+ ```
35
+
36
+ ## 写作原则
37
+
38
+ - **语言自然** - 口语化,适合配音朗读
39
+ - **节奏紧凑** - 每句话有信息量
40
+ - **画面配合** - 标注视觉提示
41
+ - **CTA明确** - 告诉观众下一步做什么
42
+
43
+ ## 输出格式
44
+
45
+ ```yaml
46
+ script:
47
+ title: string
48
+ type: "tutorial" | "demo" | "saas_intro"
49
+ total_duration: number
50
+ language: "zh-CN" | "en-US"
51
+
52
+ segments:
53
+ - id: "seg_01"
54
+ type: "hook" | "problem" | "solution" | "demo" | "summary" | "cta"
55
+ duration: number
56
+ narration: string
57
+ visual_notes: string
58
+ emphasis: string[]
59
+ ```
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: script-writer
3
+ description: 视频脚本编写技能。专注于产品教程、Demo演示、SaaS介绍的脚本撰写。
4
+ ---
5
+
6
+ ## 脚本结构
7
+
8
+ ### 产品教程 (2-4分钟)
9
+ ```
10
+ 1. Hook (5秒) - 问题/痛点引入
11
+ 2. 概述 (15秒) - 今天学什么
12
+ 3. 步骤演示 (主体) - 分步讲解
13
+ 4. 总结 (10秒) - 关键点回顾
14
+ 5. CTA (5秒) - 行动号召
15
+ ```
16
+
17
+ ### Demo演示 (4-7分钟)
18
+ ```
19
+ 1. Hook (10秒) - 展示最终效果
20
+ 2. 问题 (20秒) - 用户痛点
21
+ 3. 解决方案 (30秒) - 产品定位
22
+ 4. 功能演示 (主体) - 核心功能展示
23
+ 5. 价值总结 (15秒) - 用户收益
24
+ 6. CTA (10秒) - 如何开始
25
+ ```
26
+
27
+ ### SaaS介绍 (3-5分钟)
28
+ ```
29
+ 1. Hook (10秒) - 痛点场景
30
+ 2. 产品介绍 (20秒) - 一句话定位
31
+ 3. 核心功能 (主体) - 3-5个亮点
32
+ 4. 社会证明 (15秒) - 数据/案例
33
+ 5. CTA (10秒) - 注册/试用
34
+ ```
35
+
36
+ ## 写作原则
37
+
38
+ - **语言自然** - 口语化,适合配音朗读
39
+ - **节奏紧凑** - 每句话有信息量
40
+ - **画面配合** - 标注视觉提示(必须可执行)
41
+ - **CTA明确** - 告诉观众下一步做什么
42
+ - **拒绝泛词** - 避免“高级/大气/科技感”等空泛描述,必须写清动作与画面结果
43
+ - **贴合用户需求** - 视觉提示需直接服务于用户场景/痛点/卖点
44
+
45
+ ## 输出格式
46
+
47
+ ```yaml
48
+ script:
49
+ title: string
50
+ type: "tutorial" | "demo" | "saas_intro"
51
+ total_duration: number
52
+ language: "zh-CN" | "en-US"
53
+
54
+ segments:
55
+ - id: "seg_01"
56
+ type: "hook" | "problem" | "solution" | "demo" | "summary" | "cta"
57
+ duration: number
58
+ narration: string
59
+ visual_notes: string # 必须遵守下方模板(单字段多行)
60
+ emphasis: string[]
61
+ ```
62
+
63
+ ## 视觉提示固定模板(必须遵守)
64
+
65
+ `visual_notes` 必须使用如下结构(单字段、多行文本):
66
+
67
+ ```
68
+ 布局:<一句话描述构图/区域划分>
69
+ 元素:<主要元素列表与层级>
70
+ 动画:<入场/停留/退场的运动方式>
71
+ 节奏:<关键时间点或秒数范围>
72
+ 风格:<色彩/光效/质感/氛围>
73
+ ```
74
+
75
+ **示例**
76
+ ```
77
+ 布局:左侧大标题 + 右侧录屏卡片
78
+ 元素:左侧标题/副标题,右侧屏幕录屏 + 光晕边框
79
+ 动画:标题自左滑入并轻弹;录屏卡片淡入+微缩放
80
+ 节奏:0-0.6s 入场,0.6-3.0s 展示,3.0-3.5s 淡出
81
+ 风格:深色科技背景,主色蓝青对比,玻璃态边框
82
+ ```
@@ -0,0 +1,287 @@
1
+ ---
2
+ name: style-director
3
+ description: 视觉风格指导技能。定义统一的视觉风格、配色、字体、动效节奏,确保产品教程 / Demo 演示 / SaaS 介绍类视频的整体一致性与高端质感。
4
+ ---
5
+
6
+ ## 核心技术约定 (Remotion Implementation)
7
+
8
+ - FPS:30(标准)/ 60(丝滑);需要电影感可用 24
9
+ - 分辨率:1920x1080(16:9)/ 1080x1920(9:16);高端交付可升级 4K
10
+ - 动效引擎:位移优先 `spring`;透明度/缩放/颜色使用 `interpolate`
11
+ - 入场位移:小元素 10–20px,大元素 20–40px;避免零位移入场
12
+ - 版式基准:8px 网格为默认,可在 6–10px 之间调整
13
+ - 尺寸用“尺度等级”标注:S / M / L(避免写死单一像素)
14
+
15
+ ## 预设风格模板 (Master Themes)
16
+
17
+ ### A. Elite Dark AI(深度科技感)
18
+ - 适用:AI 模型发布、开发者工具、黑科技展示
19
+ - 色彩体系:
20
+ - Background: #050505 (Obsidian)
21
+ - Primary: #8B5CF6 (Vivid Violet)
22
+ - Accent: #00F5FF (Cyber Cyan)
23
+ - Text: #F8FAFC
24
+ - 视觉特征:动态网格背景、霓虹流光边框、3D 空间感
25
+ - Spring Config: `{ stiffness: 120, damping: 14, mass: 1 }`(可微调 10–15%)
26
+
27
+ ### B. Glassmorphism SaaS(现代高端感)
28
+ - 适用:办公协作、B2B 产品 Demo、数据分析
29
+ - 色彩体系:
30
+ - Background: 线性渐变 (135deg, #F1F5F9 0%, #E2E8F0 100%)
31
+ - Primary: #2563EB (Royal Blue)
32
+ - Secondary: #6366F1 (Indigo)
33
+ - Card: rgba(255, 255, 255, 0.6–0.8) + blur(10–16px)
34
+ - 视觉特征:柔和多重阴影、毛玻璃容器、多层景深
35
+ - Spring Config: `{ stiffness: 80, damping: 12, mass: 0.8 }`(可微调 10–15%)
36
+
37
+ ### C. Apple-style Minimalist(极致简洁感)
38
+ - 适用:消费级 AI、创意工具、高端品牌展示
39
+ - 色彩体系:
40
+ - Background: #FFFFFF 或 #F5F5F7
41
+ - Primary: #1D1D1F (Jet Black)
42
+ - Accent: #06C (Classic Blue)
43
+ - 视觉特征:极宽留白、超大粗体字、平滑推近镜头
44
+ - Spring Config: `{ stiffness: 60, damping: 15, mass: 1.2 }`(可微调 10–15%)
45
+
46
+ ## 风格模板
47
+
48
+ ### 产品教程风格
49
+ ```yaml
50
+ style:
51
+ theme: "educational"
52
+ mood: "清晰、友好、专注"
53
+
54
+ colors:
55
+ primary: "#2563EB" # 蓝色,信任感
56
+ secondary: "#10B981" # 绿色,成功提示
57
+ background: "#F8FAFC" # 浅灰背景
58
+ text: "#1E293B" # 深色文字
59
+ accent: "#F59E0B" # 橙色强调
60
+
61
+ typography:
62
+ title: "PingFang SC Semibold, 48–56px"
63
+ subtitle: "PingFang SC Medium, 30–36px"
64
+ body: "PingFang SC Regular, 22–26px"
65
+ caption: "PingFang SC Light, 16–20px"
66
+
67
+ animation:
68
+ style: "smooth"
69
+ easing: "ease-in-out"
70
+ text_in: "8–12" # 帧
71
+ text_out: "6–10"
72
+ transition: "8–12"
73
+ highlight_duration: "40–60"
74
+
75
+ elements:
76
+ cursor_highlight: true
77
+ step_numbers: true
78
+ progress_bar: true
79
+ hotkey_badges: true
80
+ ```
81
+
82
+ ### Demo 演示风格
83
+ ```yaml
84
+ style:
85
+ theme: "showcase"
86
+ mood: "现代、动感、有冲击力"
87
+
88
+ colors:
89
+ primary: "#8B5CF6" # 紫色,创新感
90
+ secondary: "#EC4899" # 粉色,活跃
91
+ background: "#0F172A" # 深色背景
92
+ text: "#F1F5F9" # 浅色文字
93
+ accent: "#22D3EE" # 青色,科技感
94
+
95
+ typography:
96
+ title: "SF Pro Display Bold, 52–64px"
97
+ subtitle: "SF Pro Display Medium, 32–40px"
98
+ body: "SF Pro Text Regular, 22–26px"
99
+
100
+ animation:
101
+ style: "snappy"
102
+ easing: "cubic-bezier(0.34, 1.56, 0.64, 1)"
103
+ text_in: "6–10"
104
+ text_out: "5–8"
105
+ transition: "6–10"
106
+ zoom_scale: "1.03–1.08"
107
+
108
+ elements:
109
+ glassmorphism: true
110
+ gradient_overlays: true
111
+ particle_effects: "轻量" # 避免密集
112
+ screen_mockup: "macbook"
113
+ ```
114
+
115
+ ### SaaS 介绍风格
116
+ ```yaml
117
+ style:
118
+ theme: "professional"
119
+ mood: "可信赖、简洁、高端"
120
+
121
+ colors:
122
+ primary: "#0EA5E9" # 天蓝,SaaS 感
123
+ secondary: "#6366F1" # 靛蓝,专业
124
+ background: "#FFFFFF" # 纯白背景
125
+ text: "#334155" # 中性灰文字
126
+ accent: "#F97316" # 橙色 CTA
127
+
128
+ typography:
129
+ title: "Inter Bold, 48–56px"
130
+ subtitle: "Inter Semibold, 28–36px"
131
+ body: "Inter Regular, 20–24px"
132
+ stats: "Inter Bold, 56–72px" # 数据展示
133
+
134
+ animation:
135
+ style: "minimal"
136
+ easing: "ease-out"
137
+ text_in: "10–14"
138
+ text_out: "8–12"
139
+ transition: "10–14"
140
+ stagger_delay: "2–4" # 元素依次出现
141
+
142
+ elements:
143
+ logo_watermark: true
144
+ stats_counter: true
145
+ testimonial_cards: true
146
+ cta_button: true
147
+ ```
148
+
149
+ ## 场景元素指南
150
+
151
+ ### 片头 (Intro)
152
+ ```yaml
153
+ intro:
154
+ duration: 3–6s
155
+ elements:
156
+ - logo_animation
157
+ - title_text
158
+ - tagline (可选)
159
+
160
+ patterns:
161
+ tutorial: "Logo 淡入 → 标题滑入 → 副标题"
162
+ demo: "产品截图缩放 → Logo 叠加 → 标题弹入"
163
+ saas: "渐变背景 → Logo → 一句话价值主张"
164
+ ```
165
+
166
+ ### 功能演示 (Demo Scene)
167
+ ```yaml
168
+ demo_scene:
169
+ elements:
170
+ - screen_recording # 主体录屏
171
+ - cursor_highlight # 鼠标高亮圈
172
+ - step_indicator # 步骤编号
173
+ - callout_box # 说明气泡
174
+ - zoom_focus # 局部放大
175
+
176
+ best_practices:
177
+ - 录屏居中,预留字幕空间
178
+ - 鼠标移动平滑、引导明确
179
+ - 关键操作配合轻微放大
180
+ - 每步操作后停顿 0.5–1s
181
+ ```
182
+
183
+ ### 转场 (Transition)
184
+ ```yaml
185
+ transitions:
186
+ fade:
187
+ duration: 6–12帧
188
+ use_for: "温和过渡,段落切换"
189
+
190
+ slide:
191
+ duration: 8–14帧
192
+ direction: "left" | "right" | "up"
193
+ use_for: "流程推进,连续叙事"
194
+
195
+ zoom:
196
+ duration: 10–16帧
197
+ scale: 1.03–1.08
198
+ use_for: "强调重点,聚焦细节"
199
+
200
+ wipe:
201
+ duration: 8–12帧
202
+ use_for: "场景切换,时间跳转"
203
+ ```
204
+
205
+ ### 片尾 (Outro)
206
+ ```yaml
207
+ outro:
208
+ duration: 5–8s
209
+ elements:
210
+ - summary_points
211
+ - cta_text
212
+ - cta_button
213
+ - logo
214
+ - social_links (可选)
215
+
216
+ cta_examples:
217
+ tutorial: "立刻开始体验"
218
+ demo: "免费试用"
219
+ saas: "14 天免费试用"
220
+ ```
221
+
222
+ ## 交互与布局要求(必须)
223
+
224
+ - **布局要有新意**:每次输出必须给出 1 个布局签名(layout_signature),描述明确的构图策略(如分区、对角线切割、层叠卡片、数据墙等)。
225
+ - **交互要有档次**:必须给出 2–3 个交互签名(interaction_signatures),用“动作 + 结果”的方式表达(如“卡片弹入并回弹停留”)。
226
+ - **避免空泛词**:不得只写“高级/大气/科技感”,必须落到具体动作、节奏与视觉结果。
227
+ - **贴合用户需求**:交互与布局必须服务于用户痛点/卖点/场景,非装饰性堆砌。
228
+
229
+ ## 输出格式
230
+
231
+ ```yaml
232
+ style_config:
233
+ theme: string
234
+ mood: string
235
+
236
+ colors:
237
+ primary: string
238
+ secondary: string
239
+ background: string
240
+ text: string
241
+ accent: string
242
+
243
+ typography:
244
+ title: string # 建议给出范围或等级
245
+ subtitle: string
246
+ body: string
247
+
248
+ animation:
249
+ style: "smooth" | "snappy" | "minimal"
250
+ easing: string
251
+ text_in: number | range
252
+ text_out: number | range
253
+ transition: number | range
254
+
255
+ elements:
256
+ layout_signature: string # 必须:一句话布局策略
257
+ interaction_signatures: string[] # 必须:2-3条交互签名
258
+ intro: object
259
+ demo_scene: object
260
+ transitions: string[]
261
+ outro: object
262
+
263
+ brand:
264
+ logo_path: "path" # 可选
265
+ brand_colors: string[] # 可选
266
+ font_family: string # 可选
267
+ ```
268
+
269
+ ## 风格一致性检查清单
270
+ - [ ] 全片配色统一(不超过 5 种颜色)
271
+ - [ ] 字体层级清晰(标题 / 副标题 / 正文)
272
+ - [ ] 动画节奏一致(同类元素时长一致)
273
+ - [ ] 转场风格统一(避免混用太多)
274
+ - [ ] 元素间距规范(以 8px 网格为基准)
275
+ - [ ] 录屏画质一致(分辨率 / 帧率一致)
276
+ - [ ] 音频响度统一(配音约 -16dB,BGM 约 -26dB)
277
+
278
+ ## 扩展参考资料(references/)
279
+
280
+ - audience-and-scenarios.md:受众与场景定位
281
+ - visual-style-system.md:视觉风格系统(Advanced Aesthetics)
282
+ - motion-grammar.md:动效语法 + 真实交互
283
+ - scene-recipes.md:分段结构配方(15/30/45/60s)
284
+ - interaction-innovation.md:新奇交互与视觉冲击
285
+ - quality-checklist.md:成片质量检查
286
+
287
+ 使用顺序建议:受众定位 → 风格系统 → 场景配方 → 动效语法 → 创新交互 → 质量检查。