Communitygithub.com

升級 Remotion 及相關套件

此技能會檢查專案中的 Remotion 依賴,並透過 CLI 或手動方式將它們升級至最新穩定版本。

升級 Remotion 及相關套件 是什麼?

這個技能專為需要管理 Remotion 專案依賴的開發者設計,提供自動化升級流程。它首先檢查專案中 `@remotion/cli` 是否可用,若可用則直接執行 `npx remotion upgrade` 指令,同時更新本機的 Remotion 技能。若 CLI 不可用,技能會引導使用者手動升級:讀取 `remotion` 與 `@remotion/*` 套件的最新版本,並對所有相關依賴進行版本統一;同時根據 `@remotion/studio` 的依賴表,調整諸如 `zod`、`mediabunny` 等輔助套件的版本。最後,技能會執行套件管理器更新鎖定檔,並檢查版本一致性,確保所有 Remotion 套件版本一致且輔助套件符合建議版本。支援的開發環境包括任何使用 npm 或 yarn 等標準套件管理器的專案,並提供 CLI 檢查(`npx remotion versions`)作為額外驗證步驟。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Guilhermeslvg/video-portfolio/tree/HEAD/.agents/skills/remotion-upgrade

在你喜歡的 AI 中提問

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

說明文件

升級 Remotion

  1. 檢查專案的 manifest 和鎖定檔,識別套件管理器與工作區。保留無關的變更。

  2. 判斷是否已安裝本機端的 @remotion/cli。如果有,則執行:

    npx remotion upgrade
    

    這也會更新專案本機的 Remotion 技能。請跳過下方的手動升級步驟。

  3. 如果 @remotion/cli 未安裝,則手動升級:

    • 使用 npm view remotion version 取得最新的穩定 Remotion 版本。
    • 找出專案中所有已安裝的 remotion 與 @remotion/* 依賴,並將它們全部升級到該確切版本。保留它們的 dependencies 區段以及專案的工作區或 catalog 慣例。
    • 使用 npm view @remotion/studio@<版本> dependencies --json 讀取目標 Remotion 版本所需的 @remotion/studio 依賴。將已安裝的輔助套件(如 zod、mediabunny、@huggingface/transformers)與其中列出的版本對齊。對於已安裝的 @mediabunny/* 套件,請使用 mediabunny 的版本。
    • 執行專案的套件管理器來更新其鎖定檔。
  4. 如果 @remotion/cli 未安裝,更新已安裝的 Remotion 技能:

    npx skills update remotion-best-practices remotion-captions remotion-create remotion-docs remotion-interactivity remotion-maps remotion-markup remotion-multimedia remotion-render remotion-saas remotion-studio remotion-upgrade --yes
    
  5. 檢查 manifest 與鎖定檔的 diff。確保所有 Remotion 套件使用同一個版本,且已安裝的輔助套件使用其建議版本。如果 CLI 可用,請執行 npx remotion versions 作為額外檢查。

Remotion 版本發布 內含變更日誌,可協助在升級後彙整相關變更摘要。

Individual skills in this repo

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

相關技能