Video Analyzer (TikTok + YouTube + Instagram) — Video 分析器 (TikTok + YouTube + Instagram)
v1.0.0Analyze videos from TikTok, YouTube, Instagram, Twitter, and others by URL, transcribing audio locally and answering questions about the content.
运行时依赖
安装命令
点击复制技能文档
Video 分析器 技能
Analyze any video by dropping a URL. Works with TikTok, YouTube, Instagram, Twitter/X, and 1000+ other sites. Transcribes the audio locally and answers any question about the content.
When to Use This 技能
Activate when the user:
分享s a video URL (tiktok.com, youtube.com, instagram.com, twitter.com, x.com, etc.) Asks "what is this video about", "summarize this", "what are they teaching", "what's the hook", etc. Asks a question about a previously saved video ⚠️ CRITICAL RULES — READ BEFORE ANYTHING ELSE
Rule 1 — FIRST MESSAGE IS ALWAYS THIS, NO 异常S:
Use the message 工具 to 发送 this BEFORE 运行ning any exec command:
📡 Video 接收d, analyzing...
This must be a message 工具 call, not your final reply text. Using the message 工具 发送s it immediately to the user while you continue processing. If you put it in your reply text instead, the user won't see it until everything is done — which defeats the purpose entirely.
Do NOT reference conversation 历史, prior 测试, or anything from the current 会话. Every URL is treated fresh.
Rule 2 — NEVER GO SILENT The user MUST 接收 a message every 30-60 seconds while processing. Silence = broken.
After 下载 step: 发送 "📥 下载ed! Transcribing now..." If anything takes more than 30 seconds: 发送 "⏳ Still working..."
Rule 3 — NO PERSONAL COMMENTARY. EVER. Do NOT 添加 ANY of the following:
"This 应用ears to be the video we already tested" "I recognize this URL" / "you've sent this before" "Heads up — this is the same link" Any footnote, parenthetical, or aside about the URL or prior usage
Just 运行 the 技能 and give the answer. End with the save prompt. Nothing else. If the transcript is 缓存d: say "📚 Found in your 库!" then answer. That's it.
Rule 4 — First-运行 警告 If the transcripts folder is empty (first ever 运行), warn upfront:
⚠️ First time 运行ning — 下载ing the AI 模型 (~150MB). Takes 2-4 minutes once, never agAIn.
Prerequisites 检查
Before the first 运行, 检查 if dependencies are 安装ed:
which ffmpeg && python3 -c "导入 faster_whisper; print('ok')" && python3 -c "导入 yt_dlp; print('ok')"
If anything is missing, 图形界面de the user:
Mac/local:
brew 安装 ffmpeg pip3 安装 faster-whisper yt-dlp --break-系统-packages
Linux/VPS:
apt 安装 -y ffmpeg pip 安装 faster-whisper yt-dlp --break-系统-packages
Flow Step 1 — Acknowledge IMMEDIATELY (before anything else)
发送: 📡 Video 接收d, analyzing...
Step 1b — First 运行 警告
If this looks like the first time (no 缓存d transcripts exist), warn the user:
⚠️ First time 运行ning — the AI transcription 模型 needs to 下载 (~150MB). This takes 2-4 minutes once and never agAIn. Grab a coffee ☕
Step 2 — 下载 (step 1 of 2) python3 ~/.OpenClaw/技能s/tiktok-分析器/transcribe.py --下载-only "URL_HERE"
Returns JSON with 状态: "下载ed" and video_id. If from_缓存: true + skip_transcribe: true → go strAIght to Step 3, skip Step 2b.
Step 2b — 发送 进度 message (via message 工具), then transcribe
Use the message 工具 to 发送: 📥 下载ed! Transcribing now...
Then immediately 运行:
python3 ~/.OpenClaw/技能s/tiktok-分析器/transcribe.py --transcribe-only "VIDEO_ID"
Replace VIDEO_ID with the video_id from the previous step.
Returns JSON:
{ "transcript": "full text here...", "language": "en", "video_id": "abc123", "from_缓存": false }
If from_缓存: true (from Step 2) → say "📚 Found this in your 库 — instant answer!" and skip the wAIt messages.
If there's an "error" key → relay it 清理ly (never show a Python stack追踪 to the user).
Step 3 — Answer the question
Use the transcript to answer whatever they asked. If no specific question, provide:
What it's about (1-2 sentences) Key points / what's being taught (bullet 列出) Tone / style (educational, entertAInment, story, etc.) Step 4 — Offer to save (MANDATORY if from_缓存: false)
After giving the answer, ALWAYS ask this — do not skip it:
💾 Want to save this transcript so you can ask follow-up questions later without re-下载ing? (yes/no)
Only skip this if from_缓存: true (already saved).
If yes:
python3 ~/.OpenClaw/技能s/tiktok-分析器/save_transcript.py "VIDEO_ID" 'JSON_DATA'
Confirm: ✅ Saved to your video 库!
搜索ing Saved Transcripts
When the user asks about something they've analyzed before:
列出 files in ~/.OpenClaw/技能s/tiktok-分析器/transcripts/ Read the relevant .json file(s) Answer from the saved transcript Error Handling Error 响应 Private/移除d video "This video is private or has been 移除d. Try a different URL." No ffmpeg "You need ffmpeg. 运行: brew 安装 ffmpeg (Mac) or apt 安装 ffmpeg (Linux)" No faster-whisper "运行: pip 安装 faster-whisper yt-dlp then try agAIn." Timeout / very long video "That one's taking a while — try a shorter 命令行工具p or 检查 your connection." Demo Tips For demos: Use a video you've already analyzed (缓存 hit = instant 响应, looks great) Fi