setup-environment
Skill4 starsChanged 2 months agoMITView on GitHub
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'.
- Reads credentials
- Installs packages
7 other projects use a version of this.
Adopted by
Most recently taken up by
- GLinnik21/plx-nativetheir own version, first seen Nov 8, 2026
- danielvm-git/bigpowerstheir own version, first seen Nov 6, 2026
- microsoft/vscodetheir own version, first seen Nov 2, 2026
- neosigmaai/skillstheir own version, first seen Nov 1, 2026
- igmarin/rails-agent-skillstheir own version, first seen Jul 30, 2026
- hyh0620/ai-hair-salon-agenttheir own version, first seen Jul 22, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- microsoft/vscode★ 195ksame name
- GLinnik21/plx-native★ 1.2ksame name
- danielvm-git/bigpowers★ 288same name
- igmarin/rails-agent-skills★ 26same name
- danielrosehill/Claude-Data-Visualisation-And-Publishing-Plugin★ 2same name
- neosigmaai/skills★ 1same name
- hyh0620/ai-hair-salon-agent★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-footageSkill
- build-blueprintSkill
- compile-timelineSkill
- crop-photosSkill
- design-intentSkill
- evaluate-editSkill
- export-premiereSkill
- finish-business-shortSkill
- finish-creator-shortSkill
- finish-interviewSkill
- full-pipelineSkill
- import-premiereSkill
- re-editSkill
- render-videoSkill
- review-roughcutSkill
- select-clipsSkill
- select-photosSkill
- short-sound-designSkill
- troubleshoot-errorSkill
- vertical-social-compositionSkill
- vertical-social-platform-deliverySkill
The file
Files
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 torchaudioHF_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 testnpm 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に引き継ぐ
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

