Communitygithub.com

yazzang-homelab/motion-studio

从单一时间轴导出所有格式,然后打包:layout() 重构(永不裁剪)、渲染所有格式、每种格式的质量检查、deliver.mjs、品牌技能、服务报价。用于“导出 9:16 和 16:9”、“交付”、“创建技能”。

motion-studio 是什么?

Motion Studio 是一个面向 AI 代理(如 Claude Code)的高级技能,用于将动态影像项目从一段剪辑转化为可重复的商业化产品。它支持在单一时间轴内渲染多种视频格式(9:16、1x1、16:9、4x5),无需裁剪,而是通过 layout() 系统智能重构每一帧的布局,使重要内容始终保持在安全区内。该技能内置了完整的交付管道,包括最终渲染、混音、格式检查(时长、响度、静音检测、文件大小等),并通过 critiqueloop 确保每个格式都经过独立审查。此外,它还指导用户将当前项目包装成可复用的品牌技能(SKILL.md),甚至生成服务报价,从而将视频制作流程从手动操作升级为一句自然语言指令即可触发的自动化模板。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/yazzang-homelab/motion-studio/tree/HEAD/skills/ship-formats

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

导出格式、技能与服务(课程第 12 步)

三个步骤将一段好剪辑转化为可重复的业务:从单一时间轴导出所有格式,将管道打包成一个技能(这样下一个视频只需一句话),并在用户需要时将其作为服务出售。所有操作在影片项目根目录中进行。参数(仅显示一次):

此技能的文件位于 ${CLAUDE_SKILL_DIR}(模板在 assets/ 中)。

1. 每种格式重构,永不裁剪

场景基于布局 L(工厂中为 ctx.L,绘制中为 c.L)绘制,因此一个时间轴可以渲染 9:16、1:1、16:9(和 4:5),每种形状的文字和 UI 都经过专门放置。

格式尺寸标签
9x161080x1920Reels、TikTok、Shorts
1x11080x1080X / 信息流
16x91920x1080YouTube、网站
4x51080x1350信息流竖版
工具用途
L.u尺寸单位:1080px 短边时为 1;120 * L.u 在所有格式中读取相同的大小
L.S安全区域 {x, y, w, h},取自 studio.json 中 safe[fmt](平台 UI 边距)
L.pos(ax, ay)安全区域内的一个点,ax, ay 取值范围 0 到 1
L.pick({ '9x16': a, '1x1': b, '16x9': c, portrait, landscape, square, default })每种格式的值:精确键,然后是方向,最后是默认值
L.split('auto', ratio, gap)两个区域:竖版和方形中上下堆叠,横版中并排
L.cols(n, gap) / L.rows(n, gap)安全区域内的列或行
fitFontSize(g, text, maxW, (s) => font(s, family, weight), lo, hi, { tracking, step })适应宽度的最大字号(lib/layout.js + lib/draw.js);step: 16 用于位图字体
wrapText(g, text, maxW, font(size, family), { maxLines, ellipsis })多行文本分行,绝不会在韩语音节内部断字(lib/draw.js)
draw(g, lt, c) {
  const { L, brand } = c;
  const { a, b } = L.split('auto', L.pick({ landscape: 0.45, default: 0.4 }), 32 * L.u);   // 标题 | 产品
  const size = Math.min(L.pick({ '9x16': 170, '1x1': 140, '16x9': 150 }) * L.u,
                        fitFontSize(g, 'MAKE IT MOVE.', a.w, (s) => font(s, brand.fonts.display, 400)));
  kinetic(g, 'MAKE IT MOVE.', a.x, a.y + a.h * 0.6, lt, { size, family: brand.fonts.display, weight: 400, color: brand.colors.fg, spring: 'default' });
  drawProduct(g, b, lt, c);                                         // 产品 UI 填充所有格式中的区域 b
}

规则:不得使用固定像素值;关键内容必须位于 L.S 内部;同一时刻在所有格式中发生相同的事件(仅位置和大小变化);若某格式看起来像是另一格式的裁剪,则在评审中被标记为 P1。在 studio.json 中调整 safe 边距,而非在代码中。使用 npm run preview 预览每种格式(F 键循环切换格式,G 键显示安全辅助线)。

2. 审核每种格式

评审循环在主格式上运行;在最终版本前,至少对其他每种格式运行一轮,每轮均需附带各自的证据(每次实时通过约需 115 秒工具时间,每次 --video 通过约需 85 秒,基于 12 到 20 秒的影片测量):

node tools/stills.mjs --format 1x1
node tools/render.mjs --format 16x9 --draft --sub 1 --scale 0.5     # 约 20 秒;然后:npm run sfx, node tools/mix.mjs --format 16x9
node tools/critique.mjs --format 16x9                                 # 实时影片 -> out/review/16x9/
node tools/critique.mjs --format 16x9 --video out/16x9/final.mp4      # 混音渲染 -> out/review/16x9/video/

将每轮记录为独立的轮次(## 第 <n> 轮 — 16x9 — ...)。门控机制读取最后一轮,因此请以通过轮次结束。

3. 渲染、混音、交付

这些步骤需要数分钟:12 秒的演示版本以 60 fps 渲染三个格式约需 4 分钟(每秒影片约需 20 秒处理),mix 需 40 到 80 秒,deliver 约需 40 秒。使用 Bash 工具的 run_in_background 选项并记录日志来启动 npm run build、render:final、mix 和 deliver,轮询日志(tail -n 3),在出现 exit 行后读取结果,切勿在前台等待超过约 2 分钟;对于三个或更多格式或超过约 30 秒的最终版本,添加 --chunk 10。motion-reel 运行手册(“长命令”)中有此模式。

步骤命令输出
全部按顺序npm run buildscore(若缺失)、sfx、所有格式的最终渲染、mix、deliver
最终渲染(门控)npm run render:finalout/<fmt>/silent.mp4、poster.png、render.json(针对 studio.json 中 formats 的每种格式)
混音与合成npm run mixout/score.wav、out/<fmt>/final.mp4、out/final.mp4(主格式)、out/poster.png
检查与打包npm run deliverout/deliver/<slug>_<fmt>.mp4 + 海报 + 联系表的每一页(<slug>_<fmt>_contact.png,然后是 _contact-2.png ...)、out/deliver/manifest.json、docs/production.json

deliver.mjs 对每种格式检查 out/<fmt>/final.mp4 与当前的 studio.json 是否一致:帧数(时长 x fps)、格式尺寸、fps 和精确时长(在编辑 duration 或 fps 之前渲染的剪辑会失败并提示“stale render”;草稿或缩放渲染也会失败),综合响度和真峰值对照 audio.lufs +- audio.lufsTolerance 和 audio.truePeak;静音片段(超过 1 秒低于 -50 dB 的片段会失败并提示“silence”,例如 silence 2.2 s at 00:02.1,除非静音起始于前 0.3 秒内、最后 1 秒内或位于 critique.allowSilence 间隔中);文件大小对照 deliver.maxBytes(默认 x:536870912 字节 = X 平台的 512 MB 上传限制;可在此处添加其他平台的限制);海报是否存在;循环影片的接缝;以及评审门控。当影片源文件比渲染结果更新时会发出警告(不失败)。若失败则退出 1 并列出所有未通过检查项;无法读取的 final.mp4 也会失败。使用 --json 时,失败会输出一行 { ok: false, error, failed: [...] },当运行无法启动时(无效的 studio.json、未知格式、错误标志)也是如此。 --format 1x1 仅重新交付该格式,并保留其他格式已交付的文件和清单条目(carriedOver);失败的门控会撤回所有已交付文件。docs/production.json 记录标题、格式、时长、响度、轮次、最终评分、努力水平(设置 CLAUDE_EFFORT 时)和工具版本。

检查失败项修复方法
帧数或时长不符,或“stale render”重新运行 npm run render:final;切勿交付部分渲染
响度或真峰值/motion-studio:sound-design(混音报告表格)
silence某个音轨提前结束或底层音轨播放时无内容:重新生成(npm run score、sfx、voice),npm run mix,然后再次交付
大小超限node tools/render.mjs --format <f> --final --crf 18 然后再次 npm run mix
海报缺失设置 studio.json 中的 poster(秒数)或取消 --no-poster
门控/motion-studio:critique-loop

向用户报告:out/deliver/ 中的每个文件、清单中每种格式的数据、最后一轮的评分以及下一步改进建议。

4. 将管道打包为用户自己的技能

这样下一个视频只需一句话(/acme-reel 为暗色模式制作启动视频,20 秒,竖屏):

  1. 选择名称:<品牌>-reel,小写字母、数字和连字符。
  2. 在品牌仓库中创建 .claude/skills/<品牌>-reel/SKILL.md(项目范围,通过 git 共享)或 ~/.claude/skills/<品牌>-reel/SKILL.md(个人范围)。从 ${CLAUDE_SKILL_DIR}/assets/brand-skill-template.md 开始(assets/brand-skill-template.md)。
  3. 从本项目填充内容,而非凭记忆:studio.json 的品牌值、docs/style_guide.md、已批准的 docs/shotlist.md 作为故事节拍模式,以及 docs/review_log.md 中的经验教训(评审者一直标记的内容将成为硬性规则)。将标志复制到 .claude/skills/<品牌>-reel/assets/。
  4. 描述保持在约 230 字符以内,包含具体的触发短语,正文保持在约 200 行以内。
  5. 在新的会话中使用真实请求进行测试,并检查它仅询问每个视频中变化的内容。
  6. 若要超越单个仓库进行共享,请将其发布为插件(包含 .claude-plugin/plugin.json 和 skills/<name>/SKILL.md 的仓库),就像 buildwithhanif/claude-animation-skill 和本插件一样。

5. 将其转化为服务(可选)

${CLAUDE_SKILL_DIR}/assets/service-offer.md(assets/service-offer.md)是一个可填写的报价模板:包含内容(音乐、任意风格吉祥物、产品功能、结尾报价、任何语言、最多 3 次修改)、格式、交付周期、客户提供内容、权利与披露以及定价。价格锚:Tony Dinh 报告在制作一个类似启动视频(使用 Opus 5.5 在 30 分钟内完成)之前,支付了约 1000 美元以上(https://x.com/tdinh_me/status/2103703135902740699)。帮助用户填写;不要替他们发布或发送。

下一步:开始下一部影片,使用 /motion-studio:motion-reel,或用户新的 /<品牌>-reel 技能。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

yazzang-homelab/motion-studio

Make Claude watch its own frames: critique.mjs evidence, harsh 7-axis scores, timestamped P0/P1/P2 problems in docs/review_log.md, fix the 3 worst, re-check, pass the gate. Use for 'critique it', 'review the frames', 'is it good'.

yazzang-homelab/motion-studio

Plan long-form or overnight films: director's brief (PLAN FIRST or GO, budget, definition of done), ANIMATION_GUIDE + STORYBOARD, chapter subagents, gates, chunked render. Use for 'overnight film', 'music video', '2-minute film'.

yazzang-homelab/motion-studio

Make a launch video, app or product reel, explainer or motion ad from code, end to end: brand assets from a URL, beat-grid shot list, synced sound, critique loop, all formats. Default for new video requests; not footage edits.

yazzang-homelab/motion-studio

Brand-asset stage of a product film (motion-reel runs the whole film): capture real screenshots, logo, colors and fonts from a URL, never redraw UI; brand story beats; voice + mascot. Use to grab or fix a brand's assets.

yazzang-homelab/motion-studio

Turn a reference (a frame, a video or an image library) into docs/style_guide.md and a beat-grid shot list: measure cuts, palette and pace, take grammar not content, wait for OK. Use when the user supplies or names a look.

yazzang-homelab/motion-studio

Build, debug or speed up the seek(t) render engine: render contract, canvas vs page capture, workers/subframes/chunks, determinism fixes, Remotion or HyperFrames handoff. Use for 'render is slow', 'frames differ', 'use Remotion'.

yazzang-homelab/motion-studio

The viral one-line 'showreel for a résumé' prompt: why it works (anatomy), the credited quote, and seeded variants that avoid look-alike reels; runs it as an engine test. Use for that prompt, its variations, or a showreel.

yazzang-homelab/motion-studio

Score a film to its beat grid: measure a track (beats.mjs) or synthesize one (score.mjs), cue SFX from the film, add voice, mix to -14 LUFS / -1 dBTP at exact length. Use for 'add music', 'sync to the beat', 'SFX', 'loudness'.

yazzang-homelab/motion-studio

Make motion feel physical with closed-form springs from lib/motion.js: presets, springFromFeel, track() for multi-target values, loopTrack loops, indicators, text swaps. Use for 'feels linear', 'add bounce', 'easing to springs'.

yazzang-homelab/motion-studio

Scaffold a motion-studio film project (seek(t) renderer, springs, beat grid, synthesized sound, critique tools), install it, set up the browser, run doctor. Use for 'set up the motion studio', 'new film project', 'init studio'.

yazzang-homelab/motion-studio

Write a six-part XML state spec for a one-shape UI morph film (inputs, direction, structure, build, gotchas, start): states on downbeats, cursor-driven changes, seamless loop, approval gate. Use for 'UI morph', 'state list'.

相关技能