Communitygithub.com

yazzang-homelab/motion-studio

建立並初始化 motion-studio 影片專案(使用 seek(t) 渲染器、彈簧系統、節拍網格、合成音效與評論工具),安裝依賴、設定瀏覽器並執行診斷。適合用於「設定 motion studio」、「新影片專案」、「初始化工作室」等情境。

motion-studio 是什麼?

此技能可自動建立並設定一個完整的 motion-studio 影片專案,基於 seek(t) 渲染器、彈簧動畫系統、節拍網格與合成音效,並內建評論與交付工具。它支援 scaffolding 專案結構、安裝依賴(包括 Playwright 與選擇性安裝 ffmpeg-static)、設定瀏覽器(在 Windows 上優先使用無殼 Chromium,避免帳戶鎖定問題),以及執行 `npm run doctor` 診斷。專案預設為 12 秒、60 fps、120 BPM 且支援多種格式(9x16、1x1、16x9、4x5)。可透過 `--force` 將現有專案升級至最新範本,同時保留 `studio.json`、`film/**` 以及 `docs/**`,並合併 `package.json` 與 `.gitignore`。此技能適用於 Claude Code、Cursor 及任何支援 shell 存取的 AI 代理程式,提供 medium、xhigh 與 max 三種工作強度,並可與 claude-animation、HyperFrames 或 Remotion 等輔助工具搭配使用。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Studio 初始化(課程步驟 02)

建立一個能夠渲染、聆聽並查看自身影格的影片專案。聊天應用程式可以撰寫動畫;只有具有 shell 存取權限的代理程式才能關閉渲染、查看畫面並修正循環。這項循環正是「普通的」初步嘗試與值得發布的影片之間的區別。

請求參數(可為空),僅顯示一次:

1. 選擇目錄與設定

  • 目錄:第一個參數;若工作目錄為空則使用 .;否則詢問使用者(預設為 ./<標題的 slug>)。切勿 scaffold 到外掛目錄中。
  • 根據請求設定:標題、持續時間、格式、fps、bpm、循環、品牌 URL。其餘選項保留範本的預設值(studio.json:12 秒、60 fps、4 個子影格、120 BPM、9x16 主要格式)。

2. Scaffold

node "${CLAUDE_SKILL_DIR}/scripts/init.mjs" <dir> --title "<Title>" [--duration S] [--fps N] [--bpm N] [--formats a,b] [--loop] [--brand-url URL] [--install] [--json]
旗標效果
<dir>目標目錄;若不存在則建立
--title Tstudio.json 中的標題與交付檔案 slug
--duration S、--fps N、--bpm N時間設定
--formats a,b格式子集,可選 9x16、1x1、16x9、4x5(或 all);primaryFormat 維持不變,除非未包含在清單中
--loop無縫循環影片(UI 變形)
--brand-url URL將產品 URL 存入 brand.url。在寫入任何內容之前,會先移除 user:password@ 以及看起來像機密的參數(query、;matrix、fragment:token、key、secret、password、auth、sig、session、code ...);stderr 會列出被移除的內容,--json 則在 redacted 中列出。仍請傳遞一般公開 URL:以純路徑片段(/reset/<token>)形式出現的機密無法被識別。一般 URL 會原封不動地儲存
--install在新專案中執行 npm install(在 Windows 上處理 npm.cmd)
--force將較舊的專案重新整理至目前範本(請參閱下表)
--json在 stdout 輸出單行 JSON 結果

對於已存在且非空的目錄,僅會合併缺少的檔案,並列出跳過的檔案。請將跳過清單報告給使用者;切勿刪除他們的檔案。

對現有專案使用 --force(依據 init.mjs 檢查):

路徑使用 --force 時
studio.json、film/**、docs/**、assets/fonts/fonts.json保留並列為 kept;若缺少則仍會建立。--bpm 等旗標仍會修改 studio.json
package.json合併,絕不取代:設定 type: module,新增 private、engines 以及專案缺少的每個範本 script 或相依套件。若範本 script 的指令不同,則重設為範本指令(init 會將每個項目印為 was ..., now ...,並在 packageReset 中回傳)。相依套件版本絕不變更,範本相依套件亦然:現有範圍保持不變,無論是更新、更舊或鎖定。名稱、版本、其他 script 及其他欄位保持不變
.gitignore合併:在 # motion-studio 下方附加缺少的範本行,不移除任何內容
其他所有內容(CLAUDE.md、lib/**、tools/**、prompts/**、index.html、.env.example、隨附字型)覆寫並列為 overwritten。這些檔案的本地編輯將會遺失:請先提交或複製
您自己的額外檔案保持不變

不使用 --force 時,package.json 和 .gitignore 以相同方式合併,但若 script 不同,則保留您的指令。Init 會列出每個與範本不同的 script 和相依套件版本,標示為 kept your package.json values, which differ from the template(在 --json 結果中為 packageKept):這些 npm run 名稱會執行您的指令,而 --force 僅重設範本 script(絕不重設相依套件版本)。若 scripts、devDependencies 或 optionalDependencies 區塊不是物件類型,則會保留不動並發出警告。由於 docs/** 會被保留,因此較新的範本文件永遠不會到達現有專案:請在更新後手動與外掛的 template/docs/ 進行比較。

3. 安裝、瀏覽器、診斷

  1. 若未使用 --install,請在專案內執行 npm install。playwright 是唯一必需的相依套件;ffmpeg-static 為選用,且可能在代理伺服器後方下載失敗。
  2. 瀏覽器(npm run setup:browser 與 npx 指令相同):
    • Windows:執行 npx playwright install chromium-headless-shell(約 115 MB 下載,磁碟上約 270 MB)。studio.json 中的 browser: "auto" 僅會啟動該隨附的無殼瀏覽器,絕不會啟動已安裝的 Chrome 或 Edge。原因:以全新設定檔啟動已安裝的 Chrome 或 Edge(每次工具執行時)會使 Chrome 測試 Windows 帳戶是否使用空白密碼,這會計入一次失敗的登入嘗試。經測量,筆記型電腦在 10 分鐘內發生 10 次失敗登入後會鎖定帳戶,並在 24 小時內記錄了 464 次失敗。除非使用者要求並接受風險,否則請勿將 browser 切換為 chrome 或 msedge,也不要將 MOTION_CHROME_PATH 設定為 chrome.exe 或 msedge.exe:每次啟動時會列印警告,且 10 分鐘內第 4 次啟動會被拒絕,前 3 次則可通過(啟動防護)。無殼瀏覽器未經簽署,因此即時防毒軟體可能使每次工具執行時間延長 15 至 25 秒(經測量):請告知使用者一次;由他們或 IT 決定是否為 %LOCALAPPDATA%\ms-playwright 設定防毒軟體排除規則。
    • macOS 與 Linux:auto 會先嘗試已安裝的 Chrome,然後是 Edge,最後是隨附的瀏覽器,且不發出警告。若未安裝任何瀏覽器,請執行 npx playwright install chromium-headless-shell(Linux:npx playwright install --with-deps chromium-headless-shell),或將 MOTION_CHROME_PATH 設定為 Chromium 系列的可執行檔。
  3. 執行 npm run doctor。在移交前修正所有 FAIL 的列,在 Windows 上也要修正 WARN 瀏覽器列(已選取已安裝的 Chrome 或 Edge:請清除它並安裝無殼瀏覽器);各作業系統的修正方法請參閱 references/troubleshooting.md。配備 librosa 的 Python 為選用(JS 節拍引擎已涵蓋)。Node 22+ 僅在路線 B 工具中需要。
  4. 驗證:執行 npm run stills,然後開啟 out/review/9x16/contact.png(較長的影片會分頁:contact.png 為第 1 頁,接著是 contact-2.png ...,單頁高度不超過 1800 px;請開啟每一頁)並查看。預設的 12 秒示範必須在 0 秒顯示一個合成的影格,並在每個強拍上顯示變化。npm run preview 會開啟即時預覽(空白鍵播放/暫停,方向鍵逐格移動,F 鍵切換格式,G 鍵顯示安全區域輔助線)。

4. 向使用者說明專案

簡要說明幾行,然後指向參考文件:

  • 配置與各自編輯的內容:references/project-layout.md
  • 所有指令:references/commands.md
  • 所有 lib/ 的簽名與預設值:新專案中的 docs/API.md(完整參考文件位於外掛儲存庫的 docs/ARCHITECTURE.md)
  • 專案規範位於專案的 CLAUDE.md 中,Claude Code 每次在該目錄執行時都會讀取它。

若 init 印出了一行 ★ 星號(在 --json 結果中為 starHint;每台機器僅會出現一次,在首次新專案時),請以該行作為總結的結尾。切勿為使用者標記儲存庫星號或執行 gh。

指令功能
npm run preview在瀏覽器中即時預覽
npm run stills每個節拍產生一個靜止畫面,組成 contact sheet
npm run critiquecontact sheet、strip、手機測試、指標、評論記錄區塊
npm run gate評論門檻:3 輪,所有軸線 >= 8,無 P0
npm run render:final所有格式,最終品質(強制通過門檻)
npm run sfx / npm run mix合成提示音效 / 混音至 -14 LUFS 並封裝
npm run deliver交付檢查與 out/deliver/ 套件
npm run build若缺少配樂則產生、音效、最終渲染、混音、交付

5. 工作量與路線

工作工作量使用以下設定
小型修正、重新渲染中等/effort medium
一部新影片極高/effort xhigh(motion-reel 技能會自動為您設定)
旗艦作品的前 3 秒最高/effort max

/model 在選擇 Opus 5.5 時也提供工作量選擇。路線 A(此引擎)為預設。僅在使用者明確指定時才使用 Remotion 或 HyperFrames;/motion-studio:seek-engine 提供交接,包括 Remotion 授權門檻。

6. 金鑰

僅在需要金鑰時才將 .env.example 複製為 .env(語音:ELEVENLABS_API_KEY;路線 C 圖片/影片:FAL_KEY)。告知使用者自行將值貼入 .env。在提示和日誌中僅提及變數名稱。.env 已包含在專案的 .gitignore 中。

7. 選用輔助工具

僅在相關時提及這些工具。安裝指令與注意事項:references/companions.md。

輔助工具用途備註
claude-animation (buildwithhanif)手繪、筆刷、故事書風格MIT 授權;獨立的 Node Canvas 渲染器
HyperFrames (heygen-com)HTML + GSAP 合成Apache-2.0;需要 Node 22+
RemotionReact 系列與範本超過 3 名員工的營利組織需取得公司授權

下一步:使用 /motion-studio:showreel 測試引擎,或使用 /motion-studio:motion-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

Ship every format from one timeline, then package it: layout() reframing (never crop), render all formats, per-format checks, deliver.mjs, a brand skill, a service offer. Use for 'export 9:16 and 16:9', 'deliver', 'make a skill'.

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

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'.

相關技能