video-analysis
Video understanding for any model \u2014 native passthrough for small\ \ files, frame extraction + audio transcription fallback for large files. Use\ \ when…
от Starchild-ai-agent★ 34 звезды на GitHub
Установить video-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Video Analysis
Analyze video files using either native model understanding or frame extraction + transcription.
⚠️ URL input (YouTube / TikTok / IG / Apple Podcasts / Spotify / any link)? This skill takes a local file path. For a link, do NOT download the media. Route by input type, in order, and STOP at the first level that yields text:
- Podcast episode link or episode name (Apple Podcasts, Spotify, Overcast,
publisher site, or just "the a16z episode about X") →
web_searchfor the publisher's episode page / show notes / transcript page, thenweb-crawler.scrape_markdown(url)to read it. Most major shows publish text. - Video URL →
web-crawler.youtube_video(url)/youtube_transcript(url)(cloud captions, ~1 s, no download; TikTok hastiktok_transcript). web_fetchcame back empty (empty_extraction, JS-rendered page) → retry the same URL withweb-crawler.scrape_markdown— it renders JS. Never conclude "no transcript" from an empty plain fetch.- Nothing found → report exactly that and ask. Local download +
analyze_video()runs ONLY when the user explicitly asks to download the media, or hands you a file. It is not a fallback: datacenter IPs hit bot-checks and a 100 MB audio pull takes minutes and usually fails.
Transcript text is speech only — never name a speaker from it alone (see web-crawler's metadata-first rule).
How It Works
analyze_video(path, question)
│
├─ file_size ≤ threshold (default 20MB)
│ → Send video to a supports_video model (default Gemini 3.1 Flash Lite)
│ → Model sees full video natively (best quality)
│
└─ file_size > threshold
→ ffmpeg extracts keyframes (scene detection for long videos)
→ Whisper transcribes audio track
→ Returns frame image paths + transcript text
→ Agent feeds these to the current chat model
Quick Start
⚠️ Invocation — do NOT use dotted imports. The directory name contains a
hyphen (video-analysis), so from skills.video-analysis.exports import ...
is a Python syntax error (- is parsed as minus). This is true for every
hyphenated skill, not just this one. Use one of the two patterns below.
Pattern A — from workspace root (recommended for scripts):
cd /data/workspace/skills/video-analysis && \
python3 -c "from exports import analyze_video; \
import json; \
print(json.dumps(analyze_video('output/videos/clip.mp4', \
question='What happens in this video?'), ensure_ascii=False))"
Note: pass the video path workspace-relative (analyze.py resolves it
against WORKSPACE_DIR), even though you cd into the skill dir.
Pattern B — inside a starchild-clawd script:
from core.skill_tools import video_analysis
result = video_analysis.analyze_video("output/videos/clip.mp4",
question="What happens in this video?")
❌ Do NOT exec(open('skills/video-analysis/analyze.py').read()) — analyze.py
uses __file__ at import time, which is undefined under exec, so it crashes.
Load it by file path with importlib.util.spec_from_file_location if you must
avoid both patterns above.
# result keys (same for both patterns):
# Analyze a video — auto-selects native or extraction mode
# result = analyze_video("output/videos/clip.mp4", question="What happens in this video?")
# result keys:
# success: bool
# mode: "native" | "extraction"
#
# If mode == "native":
# analysis: str (model's text response)
# model: str (which model was used)
# tokens: {input, output, video, audio}
#
# If mode == "extraction":
# frame_paths: list[str] (workspace-relative paths to keyframe JPEGs)
# transcript: str | None (Whisper transcription text)
# frame_count: int
# duration_sec: float
Using the Exports
from core.skill_tools import video_analysis
# Full analysis (auto-selects mode)
result = video_analysis.analyze_video("output/videos/my_video.mp4", question="Describe this video")
# Check current config
config = video_analysis.get_config()
# Get video metadata without analyzing
info = video_analysis.get_video_info("output/videos/my_video.mp4")
# → {"duration": 45.2, "size": 12345678, "width": 1920, "height": 1080, "has_audio": true}
Native Mode (small videos)
For videos under the size threshold, the skill sends the full video to a model that supports native video input. The model sees every frame and hears the audio.
Default model: google/gemini-3.1-flash-lite — best price/quality for video.
Model benchmark (6MB clip, vs gemini-3.1-pro-preview baseline):
| Model | Tier | Cost | Time | Accuracy | Notes |
|---|---|---|---|---|---|
| google/gemini-3.1-flash-lite | budget | ~$0.0014 | 8.1s | ~88% | ⭐ Default — cheapes |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- analyze.py
- config.yaml
- exports.py
FAQ
Что делает скилл video-analysis?
Video understanding for any model \u2014 native passthrough for small\ \ files, frame extraction + audio transcription fallback for large files. Use\ \ when the user asks to analyze, describe, or understand a video file (e.g. "\ what's in this video", "summarize this clip", "transcribe this recording").
Как установить скилл video-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл video-analysis запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…