MUST USE when source footage or a material folder is provided and material understanding or 03_analysis generation is needed. Trigger not only on explicit analysis requests ('分析して', '素材を見て') but also when the user points at footage and says things like 'この動画で', 'この素材で', or any request that requires understanding the provided media before planning or editing.
setup-environment
MUST USE when the user is setting up this project for the first time, when dependencies are missing, API keys are not configured, or when 'npm run demo' fails. Triggers on: 'セットアップ', '環境構築', 'setup', 'install', 'API key', 'ffmpeg not found', 'GEMINI_API_KEY', 'cannot find module'.
含まれるファイル(3)
- SKILL.md8.5 KB
- references/api-key-guide.md3.8 KB
- references/troubleshoot-setup.md2.4 KB
SKILL.md(原文)
インストールする前に、エージェントに与えられる指示の中身を確認できます。
setup-environment — 初期セットアップ
いつ使うか(必ず発火する条件)
- ユーザーがこの repo を新しい環境で初めて使うとき
- ユーザーが「セットアップして」「環境構築したい」「install したい」と言ったとき
npm install未実行、node_modules/欠落、Cannot find module系 error が出たときffmpeg/ffprobeが見つからないときGEMINI_API_KEY、GROQ_API_KEY、OPENAI_API_KEY、HF_TOKENの設定方法を聞かれたときnpm run demoやnpx tsx scripts/analyze.ts ...が環境要因で失敗したとき
前提条件
- 作業ディレクトリは repo root であること
- 秘密情報は絶対に表示しない。
.env.localの値を読み上げたり、返答内に貼り付けたりしない .env.localは 絶対に commit しない。作成前に.gitignoreに.env.localが含まれているか確認する- この repo では
scripts/analyze.tsが.env.localを先に読み、次に.envを読む - 詳細な API キー取得手順は
references/api-key-guide.md、典型エラーはreferences/troubleshoot-setup.mdを必要時だけ読む
やること(ステップ)
Step 1: 環境チェックを自動実行する
- まず以下を実行し、環境の現在値を取る
node -v
npm -v
ffmpeg -version
ffprobe -version
ffmpeg -hide_banner -filters
which python3
test -f .env.local && echo yes || echo no
test -d node_modules && echo yes || echo no
- 結果は必ず表形式で返す。最低でも
項目 | 現在値 | 期待値 | 状態を含める - 確認対象は以下:
- Node.js バージョン:
22.x必須(.nvmrc/.node-versionと CI に合わせる) - npm バージョン:
10.x ffmpegが実際に起動できることffprobeが実際に起動できることffmpegのsubtitles/assfilter が利用できることpython3の存在.env.localの存在node_modules/の存在
- Node.js バージョン:
- 次アクションを案内するのは不足項目だけ にする
- Node.js が
22.x以外なら他の手順に進む前に揃える。目安はnvm install 22 && nvm use 22 which ffmpeg/which ffprobeだけでは合格にしない。共有 library 欠落などで binary が起動不能な状態を見逃すため、上記の version command の exit code を確認する
Step 2: ffmpeg / ffprobe を入れる
ffmpegまたはffprobeが無いときだけ実行する- OS ごとの基本コマンド:
# macOS
brew install ffmpeg
# Ubuntu / Debian
sudo apt install ffmpeg
# Windows (winget または Chocolatey)
winget install ffmpeg
choco install ffmpeg
- インストール後は必ず確認する
ffmpeg -version
ffprobe -version
ffmpeg -hide_banner -filters | grep -E ' (subtitles|ass) '
- binary が存在しても
Library not loadedなどで起動しない場合は、インストール済み扱いにせず依存 library / ffmpeg package を修復する subtitles/assのどちらかが無い build は burn-in 字幕の render に使わない- ここで詰まったら
references/troubleshoot-setup.mdのffmpeg: command not foundを読む
Step 3: npm install を実行する
node_modules/が無い、またはCannot find module系 error が出ているときだけ実行する
npm install
- install が失敗したら、エラーメッセージをそのまま確認したうえで
references/troubleshoot-setup.mdを読む npm install済みなのに module error が続く場合は、node_modules/の破損や Node.js version mismatch を疑う
Step 4: API キーと .env.local を整える
.env.localが無い、または必要なキーが空ならreferences/api-key-guide.mdを読む- 先に
.gitignoreを確認し、.env.localが無ければ追加する .env.localが無い場合は次のテンプレートを作る
# Required for VLM video understanding (contact sheets, filmstrips, peak detection)
GEMINI_API_KEY=
# Required for Speech-to-Text (Whisper Large v3 Turbo)
GROQ_API_KEY=
# Optional: Alternative STT with built-in diarization
OPENAI_API_KEY=
# Optional: Speaker diarization (pyannote)
HF_TOKEN=
.env.localが既にある場合は、既存値を消さずに不足行だけ補う- 必須度はこう扱う
GEMINI_API_KEY: 推奨。VLM 映像理解と peak 検出に使うGROQ_API_KEY: 推奨。Groq Whisper STT に使うOPENAI_API_KEY: 任意。OpenAI STT を使う場合だけ必要HF_TOKEN: 任意。pyannote 話者分離を使う場合だけ必要
- キーが足りないときの fallback も必ず伝える
GEMINI_API_KEYが無い:scripts/analyze.tsは warning を出して VLM を skip する。明示的に local/degraded path を取りたいなら--skip-vlmGROQ_API_KEYが無く、OPENAI_API_KEYがある:--stt-provider openaiGROQ_API_KEYもOPENAI_API_KEYも無い:--skip-sttHF_TOKENが無い:--skip-diarize
.env.localの値は返答内に出さない。commit もさせない
Step 5: Python + pyannote を入れる
- これは 話者分離が必要な場合だけ 行う
- 基本コマンド:
python3 -m pip install pyannote.audio torch torchaudio
HF_TOKENを.env.localに入れる- この repo の pyannote bridge は既定で
pyannote/speaker-diarization-community-1を使う。Hugging Face 側で model access の確認が出たら許可する - Groq STT + 話者分離を使わないなら、この step は飛ばしてよい
- 不要な場合は完全に
--skip-diarizeで回避できる
Step 6: 動作確認をする
- 素材を書き込む前に、共通 preflight で Node、ffmpeg/ffprobe、字幕 filter、source、作業 disk 容量をまとめて確認する
npx tsx scripts/preflight.ts <素材フォルダパス>
- preflight に
failがあれば ingest / render へ進まない - まず API キー不要の demo を確認する
npm run demo
- demo が通ったら test を流す
npm test
npm run demoが失敗したら install / Node.js / repo root を見直すnpm testが失敗したら、環境差分か repo 側不整合かを切り分ける。セットアップ起因の典型例はreferences/troubleshoot-setup.mdを読む- demo と test が両方通れば「セットアップ完了」と判断してよい
Step 7: 初回 project の作り方を案内する
- セットアップが終わったら、最小の project を作る
mkdir -p projects/my-project
- 素材は
./footage/など任意の場所に置き、まず analyze を走らせる
npx tsx scripts/analyze.ts ./footage/*.mp4 \
--project projects/my-project \
--content-hint "内容の説明"
- キー不足で degraded path を取るなら、必要に応じて
--skip-vlm、--skip-stt、--skip-diarize、--stt-provider openaiを追加する - setup 後の skill 連携も案内する
- 素材理解だけ欲しいなら
analyze-footage - analysis 後に
01_intent/creative_brief.yamlが無ければ次はdesign-intent - 「素材から rough cut までまとめて進めたい」なら
full-pipeline
- 素材理解だけ欲しいなら
出力 artifact
.env.localただし local-only。絶対に commit しないprojects/demo/05_timeline/timeline.jsonただしnpm run demo実行時projects/<project>/03_analysis/*ただし初回 analyze 実行時
注意事項
.env.localの中身を version control に入れないnpm run demoは repo root 実行が前提で、API キーは不要scripts/analyze.tsの degraded path は品質と引き換え。--skip-vlmではsummary/tags/peak_analysisの品質が落ちる- pyannote は optional。
python3やHF_TOKENが無くても、--skip-diarizeで repo 全体の利用は続けられる - setup で解決しない failure は
troubleshoot-errorに引き継ぐ
レビュー
まだレビューはありません。使ってみた感想をお寄せください。
同じリポジトリのスキル
概要と使いどころ
Use when selects_candidates.yaml exists and the user asks to design structure, build an edit blueprint, or create 04_plan/edit_blueprint.yaml.
日本語の概要は準備中です。原文の説明を表示しています。
Use when edit_blueprint.yaml and selects_candidates.yaml are ready and the user asks to compile the rough cut, generate timeline.json, or apply a review patch.
日本語の概要は準備中です。原文の説明を表示しています。
MUST USE when the user asks to crop, reframe, trim, or improve composition of still photos, especially selected event photos, album photos, portraits, speakers, panels, workshops, or group photos. Use after photo selection or correction when the task is composition improvement rather than selecting images.
日本語の概要は準備中です。原文の説明を表示しています。
MUST USE when starting a new video project, when the user provides footage and asks to edit/create a video, or when 01_intent/creative_brief.yaml does not yet exist. This skill interviews the user to understand their intent before any editing begins. Never skip this step.
日本語の概要は準備中です。原文の説明を表示しています。
Use after changing prompts, skills, the compiler, or editorial policies — or when the user asks to measure edit quality, run regression evals, check agreement with approved edits, or says '評価して', '一致率を測って', 'eval を回して'. Compares agent output against human-approved golden projects.