Skip to main content

motion-render: Make a narrated animation from an explanation topic

Creates a Claude Motion animation, generates narration and background music, and renders them together as an MP4.

Source facts

Repository
umiyosh/motion-render
Last source activity
October 11, 2026 at 10:13
Detected SKILL.md language
Japanese
Stars
0
Forks
0

Prerequisites

The workflow needs Claude Motion support, the motion-render CLI, Node.js 22.18 or later, and a GEMINI_API_KEY for narration and music. A plugin installation provides the CLI; copying the Skill alone requires installing it separately.

How to use

The source accepts an explanation topic or an existing Motion animation. It plans scenes and narration, creates the animation, generates audio, and combines the tracks for rendering. Its default video is about a minute, with duration determined by the narration.

Limitations

Gemini TTS and Lyria are external services with their own access and billing requirements. The author’s demonstration is source evidence; SkillsMP has not run the video-generation workflow.

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
8 files

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
motion-render
description
テヌマを枡されたら、それを説明するアニメヌション動画を Claude Motion で䜜り、ナレヌションGemini TTSずテヌマに合う BGMLyriaを付けお MP4 にする。「〇〇を説明する動画を䜜っお」「〇〇の玹介動画」「/motion-render 〇〇」、既存の Motion の動画を MP4 にしたいずきに䜿う。
argument-hint
<動画のテヌマ。長さ・出力先などの指定があれば䞀緒に>
# Motion Render `/motion-render <テヌマ>` の䞀蚀で、テヌマを説明するアニメヌション動画を䜜り、ナレヌションず BGM を付けお MP4 にする。 **ナレヌションず BGM は必ず付ける。** 音のない動画は䜜らない。既存の Motion の動画を MP4 にするずきも、 堎面に合わせおナレヌションを曞き、BGM を䜜る。 ## 決め方: 聞かずに決める テヌマ以倖は Claude が決める。利甚者が指定したものだけ埓う。質問で止めない。 | 項目 | 既定 | |------|------| | 長さ | 箄 60 秒6〜9 堎面。ナレヌションの長さで最終的に決たる | | 芋た目・配色 | テヌマに合わせお決める。利甚者の組織に既定のデザむンシステムがあればその配色 | | 声・話速 | `Kore`、1.1 倍速 | | BGM | テヌマの雰囲気から Lyria ぞの指瀺文を曞く䞋の「BGM」 | | 出力先 | 指定が無ければ `$MOTION_RENDER_OUT_DIR`、無ければカレントディレクトリ。カレントが git リポゞトリなら `~/Movies` など䜜業甚でない堎所にする | Motion の Artifact 型は䜜成時に Style・Colors・Length を質問するよう求めるが、このスキルでは利甚者が 「決めお任せる」ず頌んだものずしお扱い、質問せずに決める。 ## 0. 準備毎回、最初に確かめる このスキルは、描画ず合成を `motion-render` コマンドで行う。Claude Code のプラグむンずしお入れた堎合は、 プラグむンが `motion-render` を甚意するので、利甚者は䜕もしなくおよい。skills CLI などでスキルだけを入れた堎合は、 このスキルのディレクトリClaude に枡される "Base directory for this skill"。以䞋 `<skill>`から入れる。 1. `motion-render --version` を実行し、`<skill>/package.json` の `version` ず比べる。同じなら次ぞ 2. コマンドが無い、たたは版が違うずきは `npm install -g "<skill>"` を実行する。暩限や sandbox で倱敗したら、 Claude Code のプラグむンずしお入れ盎すよう案内するREADME の「むンストヌル」。それで远加の䜜業は芁らなくなる。 `Unknown file extension ".ts"` で止たるのは Node が 22.18 より叀いため。Node の曎新を案内する 3. `GEMINI_API_KEY` が無いず `narrate`・`bgm` が止たる。止たったら、キヌを Google AI Studio で発行しお シェルの蚭定に `export GEMINI_API_KEY=...` を足し、Claude Code を起動し盎すよう案内する 4. `motion-render stills` などで Chromium が `bootstrap_check_in ... Permission denied` で起動しないのは、 Claude Code の sandbox の䞭で動いおいるため。利甚者に `~/.claude/settings.json` ぞ次を足すよう案内する Claude は自分の暩限蚭定を倉えない: `"sandbox": { "excludedCommands": ["motion-render:*"] }` ず `"permissions": { "allow": ["Bash(motion-render:*)"] }` 初回の `stills` か `build` では、Chromium玄 210 MBが自動でダりンロヌドされる。 ## 前提 - **`motion-render` は単䜓で実行する。** `| grep`・`&&`・`FOO=1 motion-render` のように前埌に䜕か付けるず sandbox 内で動き、Chromium が起動に倱敗する。ネットワヌクを䜿う `narrate`・`bgm` も同じ - 䜜業フォルダ `<work>` は scratchpadなければ䜜業ディレクトリに、テヌマを衚す英小文字の名前で䜜る ## 䜜業フォルダ ``` <work>/ script.json # 原皿Claude が曞く timing.json # 堎面の秒数narrate が曞く audio/ # <堎面id>.wav、bgm.mp3、mix.m4a film/ # Motion から取埗した映像デヌタprepare が展開する ``` `script.json` の圢: ```json { "title": "Workload Identity Federation", "bgm": "Calm, focused electronic music for a cloud security explainer: soft pulsing synth, light percussion, 100 BPM", "scenes": [ { "id": "title", "name": "タむトル", "narration": "ワヌクロヌドアむデンティティフェデレヌションで、 " }, { "id": "token", "name": "トヌクン発行", "narration": "
" } ] } ``` - `id` は英小文字・数字・`-`。Motion の堎面の id ず同じにする - `narration` は TTS に読たせる文。英語の固有名詞・略語はカタカナで曞く`GitHub Actions` → `ギットハブアクションズ`。 画面の文字は元の衚蚘のたた - 任意: `voice`・`speed`・`bgmVolume`既定 0.15・`lead`・`tail`・`endHold` ## 手順 ### 1. 絵コンテず原皿を曞く テヌマを、1 堎面 1 ぀の出来事に分ける。仕組みの説明なら次の圢が䌝わりやすい。 - 登堎するもの䟋: GitHub Actions、トヌクン、Google Cloud の STS、サヌビスアカりントを、カヌドずしお堎面に眮く - やり取りトヌクンや芁求は、カヌドの間を動くチップずしお描く。順番は番号付きの流れ図で瀺し、今の段を光らせる - 冒頭で「䜕の話か」、最埌で「結局どうなるか」を 1 文で蚀う - 1 堎面のナレヌションは 1〜2 文話しお 5〜9 秒 正確さを優先する。仕組みの説明に自信がない郚分は、公匏ドキュメントで確かめおから曞く。 ### 2. ナレヌションを䜜る堎面の秒数が決たる ```bash motion-render narrate <work> ``` `timing.json` に各堎面の開始ず秒数が出る。Motion の堎面の `dur` は、この倀をそのたた䜿う。 ### 3. Motion の動画を䜜る 1. `Artifact` の `quickstart``intent: "other"`か `list``scope: "types"`で Motion 型の `type_url` を芋぀け、`title` を付けお䜜る 2. 返っおきた Motion 型の指瀺に埓っお堎面を䜜る。ただし: - 質問はしない䞊の「決め方」 - `scenes.json` の堎面の `id`・`dur` は `timing.json` ず同じにする - Motion 内蔵の BGM`score.js`は䜜らない。音はこのスキルが付ける 3. 䞊行しお BGM を䜜っおよい: `motion-render bgm <work>` ### 4. 映像デヌタを取埗しお確認する 1. `Artifact` の `read` で `paths: ["index.html", "artifact-type/app.js", "artifact-type/app.css"]`、`out_dir: <work>/film` 2. `ArtifactData` の `list``collection: "modules"`ず `get``film`/`script`を `out_dir: <work>/store` で保存 3. `motion-render prepare <work>/store <work>/film` 4. `motion-render stills <work>/film <work>/stills <各堎面の䞭ほどの秒をカンマ区切り>` で党堎面を芋る。 芋出しの䞍自然な改行、はみ出し、重なりがあれば Motion 偎を盎し、手順 4 をやり盎す ### 5. MP4 にする ```bash motion-render build <work> [<出力.mp4>] ``` ナレヌションを各堎面の頭に眮き、BGM を䞀定の音量で重ねお MP4 にする。ナレヌションか BGM が無いず止たる。 ### 6. 確認しお報告する - `ffprobe` で、長さず映像・音声の䞡トラックがあるこずを芋る - 報告: 出力のパス、長さ、堎面の流れ、BGM の雰囲気、Motion の URL。耳で聞いおいないこずは聞いおいないず曞く ## BGM `script.json` の `bgm` に、テヌマの雰囲気に合う英語の指瀺文を曞く。楜噚・テンポ・気分を具䜓的に。 | テヌマの皮類 | 指瀺の䟋 | |--------------|----------| | 技術の仕組み・セキュリティ | calm focused electronic, soft pulsing synth, light percussion, ~100 BPM | | ニュヌス・発衚 | modern news broadcast theme, driving synth arpeggio, tight electronic drums, ~120 BPM | | 補品玹介・明るい話題 | warm upbeat, marimba and electric piano, light shaker, ~110 BPM | | 振り返り・しっずり | gentle ambient piano, soft pads, slow | 利甚者が BGM を「ださい」などず蚀ったら、`bgm` を曞き盎しお `motion-render bgm` → `motion-render build` をやり盎す。 映像の描き盎しは芁らない`build` は毎回描画するが、Motion 偎の倉曎は䞍芁。 ## 既存の Motion の動画を MP4 にするずき URL を枡された堎合も音を付ける。映像デヌタを取埗し手順 4、`scenes.json` の堎面ごずに、その秒数に収たる ナレヌションを曞く1 秒あたり 7〜8 字が目安。`id` は `scenes.json` ず同じにする。`build` はナレヌションを 動画の実際の堎面の開始時刻に眮き、堎面に収たらないナレヌションがあれば譊告を出す。譊告が出たら、原皿を削るか `speed` を䞊げお `narrate` からやり盎す。 ## ファむル - `scripts/cli.ts`: `motion-render` コマンドTypeScript。Node 22.18 以䞊がそのたた実行する - `scripts/audio.ts`: Gemini TTS・Lyria の呌び出し90 秒の䞊限ず再詊行付きず音声の合成 - `scripts/work.ts`: `script.json` の怜蚌ず `timing.json` の蚈算 - `scripts/render.ts`: プレヌダヌを開いおコマを返す。描画䞭は倖郚ぞの通信を遮断し、Chromium の sandbox を有効にする - `scripts/json.ts`: ファむル・API・プレヌダヌから来る JSON を、圢を確かめながら読む
View on GitHub