Communitygithub.com

yazzang-homelab/motion-studio

從單一時間軸匯出所有格式,並以 layout() 重新構圖(絕不裁切)、為每種格式進行轉譯與檢查,透過 deliver.mjs 交付,最終打包成品牌技能與服務方案。用於「匯出 9:16 與 16:9」、「交付」、「製作技能」。

motion-studio 是什麼?

此技能「motion-studio」專為動態設計師與影片製作者打造,提供從一個時間軸同時產出多種畫面比例(9:16、1:1、16:9、4:5)的完整工作流程。它利用獨特的 layout() 系統進行安全重新構圖(而非單純裁切),並透過 L.u、L.S、L.split 等工具確保所有格式中的關鍵內容始終位於安全區域內。技能支援 Claude Code、Cursor 等 AI 代理平台,透過自動化轉譯、混音與 deliver.mjs 檢查(如幀數、音量、靜音區段、檔案大小)來保證交付品質。最後,它能將整個流程封裝成使用者自己的品牌技能(如 `<brand>-reel`),讓下一支影片只需一個句子即可啟動,甚至可進一步轉化為付費服務方案,實現商業化。

相容平台✓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尺寸單位:在 1080 px 短邊時為 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 build配樂(若缺少)、音效、所有格式的最終渲染、混音、交付
最終渲染(有閘門)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 秒內、位於最後一秒內或位於 critique.allowSilence 區間內);檔案大小相對於 deliver.maxBytes(預設值 x:536,870,912 位元組 = 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 launch video for dark mode, 20 s, vertical):

  1. 選擇名稱:<brand>-reel,僅使用小寫字母、數字和連字號。
  2. 在品牌的儲存庫中建立 .claude/skills/<brand>-reel/SKILL.md(專案範圍,透過 git 共享)或在 ~/.claude/skills/<brand>-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/<brand>-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 分鐘內完成)的一年之前,他支付了約 $1,000 美元以上(https://x.com/tdinh_me/status/2103703135902740699)。協助使用者填寫;請勿代為發布或寄送。

下一步:使用 /motion-studio:motion-reel 或使用者的新 /<brand>-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'.

相關技能