Communitygithub.com

remotion-math-explainer

数学の微分積分、線形代数、微分方程式、確率、証明をシングルパネル形式で美しいRemotion動画に変換します。シングルラインの式スポットライト、フルスクリーンのアニメーショングラフィックス、カラオケキャプション、高速1080p MP4レンダリング機能を提供します。

remotion-math-explainer とは?

Remotion Math Explainer は、数学の概念や証明、定理を没入型の1080p MP4説明動画に変換するAIエージェントスキルです。ロゴ2ベース(Log2Base2)シングルパネル形式を採用し、視聴者の注意を一つの統一されたビジュアルステージに集中させます。トップバーには現在のトピックと進行状況、中央のキャンバスにはアニメーションする数式や座標グラフ、3Dオブジェクト、ベクトルなどがフルスクリーンで表示され、下部にはカラオケ形式の字幕が表示されます。このスキルはClaude Code、Cursor、CodexなどのRemotion対応プラットフォームで使用でき、特に「/remotionで数学を説明して」や「証明を動画にして」といった指示に応じます。ワークフローは、会話形式のナレーション(ビーツ)を設計し、エッジTTSで音声を合成、その後フルキャンバスモーショングラフィックスを描画し、最後に高速キーフレーム重複除去レンダラーでMP4に出力する流れです。複数パネルの分割レイアウトや、一度に多くの情報を詰め込むことはせず、常に一つの式行と一つのアクティブな用語に集中する設計が特徴です。

対応✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/uzowurumauritius-rgb/remotion-stage/tree/main/skills/remotion-math-explainer

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Remotion Math Explainer (remotion-math-explainer)

概要

任意の数学の導出、定理、証明、スライドを、没入感のあるフレーム同期された1920×1080 30fps MP4のRemotion説明動画に変換します。形式はシングルパネルLog2Base2スタジオ形式です。

画面を競合するサイドバイサイドパネルや積み重ねテキストカード壁に分割することは絶対に行いません。すべての動画は1つの統合されたビジュアルステージ(<SinglePaneStage>)を使用し、視聴者の注意を完全に視覚的なストーリーに集中させます。

  1. ミニマルなトップバー(44px、SinglePaneStageに組み込み):
    • 左側にトピックタイトル+現在のアクティブセクションピル;右側に控えめなステップカウンターと細いプログレスバー。
  2. 1つの統合Log2Base2ステージ(SinglePaneStage — 100%幅):
    • フォーカスされたシングルラインスポットライトヘッダー: 現在のステップタイトルとアクティブな式が1行のみ表示されます(アクティブな発話用語をインプレースでborderBottom: "2px solid #FACC15"でハイライト、水平パディングは追加しない)。さらに、triggerFrameでバウンスしながら現れる1つのコンパクトなアクティブトークン呼び出しピル(symbol → 平易な英語での意味)を表示します。
    • フル幅の没入型SVGキャンバス(viewBox="0 0 1600 680"): 広々として連続的なモーショングラフィックス—ライブ座標グリッド上で色付きデータポイントが伸縮し、行列から数字がマイナーブロックに物理的に滑り出し、レーザーラインでクロスアウトし、符号付き大きさバー、3D単位立方体が恒等行列に戻る様子などを、同じオープンキャンバス上に直接統合します。
  3. ミニマルな下部キャプションバー(VoiceoverCaptionBar — 68px):
    • 中央揃えで単語ごとにハイライトされるクリーンなカラオケ字幕。正確なTTS WordBoundaryミリ秒タイムスタンプによって駆動されます。

依存関係

  • remotion-best-practices(~/.gemini/skills/remotion/SKILL.md): すべてのRemotionアニメーションルール(useCurrentFrame()、interpolate()、spring()、<Sequence premountFor>、<Audio>、@remotion/google-fonts、CSSトランジションゼロ)に従う必要があります。
  • uv(~/.gemini/config/plugins/science/skills/uv/SKILL.md): ニューラル音声合成に uv run --with edge-tts を実行するために必要です。

クイックスタート

# 1. Remotion数学説明動画プロジェクトをスキャフォールド
uv run python3 \
  ~/.gemini/config/skills/remotion-math-explainer/scripts/explainer_cli.py \
  scaffold \
  --project-dir "/path/to/project" \
  --output "/path/to/project/scaffold-status.json"

# 2. 自然なニューラル音声と正確なWordBoundaryおよび用語タイムスタンプを合成
uv run --with edge-tts python3 \
  ~/.gemini/config/skills/remotion-math-explainer/scripts/explainer_cli.py \
  synthesize-voiceover \
  --project-dir "/path/to/project" \
  --beats-json "/path/to/project/beats.json" \
  --voice "en-US-AndrewNeural" \
  --rate "+2%" \
  --pause-sec 0.40 \
  --output "/path/to/project/public/voiceover/manifest.json"

# 3. 高速8ワーカーのキーフレーム重複除去レンダラーで最終1080p 30fps MP4をレンダリング
uv run python3 \
  ~/.gemini/config/skills/remotion-math-explainer/scripts/explainer_cli.py \
  render-mp4 \
  --project-dir "/path/to/project" \
  --composition-id "MathExplainer" \
  --out-name "MathExplainer.mp4" \
  --concurrency 8 \
  --output "/path/to/project/render-report.json"

没入型ストーリーテリングとワークフロー

  1. エネルギッシュなビーツを設計する(beats.json):
    • 会話的でフックファーストのナレーションを書きます(教科書のような無味乾燥な表現は避ける)。やる気のない学生でも興味を持ち続けられるようにします。
    • snippetは2~4行に抑え、各行のtokenがtext内の単一の小文字triggerWordと正確に一致するようにします。
    • 連続する曲線、ベクトル、グリッド、または飛翔要素のアニメーションがあるビーツには"motionStepFrames": 2を設定します。
  2. スキャフォールドして音声を合成する:
    • scripts/explainer_cli.pyを使用してscaffold(SinglePaneStage.tsx、VoiceoverCaptionBar.tsx、render_full_mp4.mjsをコピー)とsynthesize-voiceoverを実行します。
  3. フルキャンバスモーショングラフィックスを作成する(viewBox="0 0 1600 680"):
    • <SinglePaneStage>のchildrenとして没入型SVGステージを渡します。
    • 説明するよりも見せる: 静的なテキスト/カードを、物理的なモーション—座標のワープに乗る粒子/点、位置間を飛び交う要素、スイープするレーザーライン、ライブゲージ、同じオープンキャンバス内の並列ライブプロット—に置き換えます。
    • ワープ/拡張するグリッドラインは常に<clipPath>でラップし、モーションがラベルやピルにはみ出さないようにします。
  4. スチルを確認し、最終MP4をレンダリングする:
    • npm run lintを実行し、render-mp4を実行する前に代表的なスチルフレーム(npx remotion still)をread_fileで検査します。
    • 最終的な.mp4をout/、プロジェクトルート、およびワークスペースルートにコピーします。

レート制限とよくある間違い

  • scripts/explainer_cli.pyは/tmp/remotion_edge_tts.lock(0.35秒間隔、1秒/2秒/4秒のバックオフで3回リトライ)を適用します。
  • マルチパネル分割レイアウトや境界付きサブカードの積み重ねは絶対に使用しないでください。必ず<SinglePaneStage>を使用して、画面上に1つのメインパネルのみが存在するようにします。
  • 複数ステップの証明全体を一度に画面に表示することは絶対にしないでください。一度にアクティブな式行とアクティブな呼び出しピルのみをスポットライト表示します。
  • ハイライトされたインライントークンに水平paddingを追加しないでください(borderBottom: "2px solid #FACC15"とbackgroundColorのみを使用)。

Individual skills in this repo

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

remotion-code-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for source code (Mobile/Web UI, Backend, AI/ML, Algorithms) in a pure Log2Base2 single-stage format—with a focused single-line code spotlight, full-screen animated memory boxes, pointer arrows, data packets, and live execution state on one canvas, WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain code with /remotion, build a code walkthrough video, or turn a voiceover script into an MP4 explainer.

remotion-electronic-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for Electronic Engineering (Semiconductors, PN Junctions, Diodes, BJTs, MOSFETs, CMOS Logic, Op-Amp IC Stages, ADC/DAC, PCB Signal Integrity) in a pure Log2Base2 single-stage format—with a focused single-line device equation spotlight, full-screen animated carrier/channel diagrams and live I-V curves on one canvas, WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain electronic engineering, semiconductors, transistors, or analog/digital ICs with /remotion.

remotion-physics-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for Physics (Mechanics, Electromagnetism, Thermodynamics, Optics/Waves, Quantum Mechanics, Relativity) in a pure Log2Base2 single-stage format—with a focused single-line governing law spotlight, full-screen animated free-body/field/wave simulations and live telemetry on one canvas, millisecond-accurate WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain physics with /remotion or animate a physical law/system.

remotion-software-explainer

Creates synchronized, immersive single-pane Remotion visual explainer videos for Software Engineering (System Design, Distributed Systems, Microservices, Kubernetes/Docker, Design Patterns, Database Internals, CI/CD, Networking) in a pure Log2Base2 single-stage format—with a focused single-line contract/YAML spotlight, full-screen animated architecture flows with traveling request packets and live trace timelines on one canvas, WordBoundary karaoke captions, and fast 1080p MP4 rendering. Use whenever the user asks to explain software engineering, system design, or architecture with /remotion.

関連スキル