PluginBench
Skill
Review
Audit score 70

video-analysis

starchild-ai-agent/official-skills

Analyze videos natively or via frame extraction + transcription for any model.

What is video-analysis?

Video Analysis lets you understand video files by sending them directly to models that support native video input (for files under 20MB) or by extracting keyframes and transcribing audio (for larger files). Use it when a user asks you to analyze, describe, summarize, or understand a video file.

  • Send small videos (≤20MB) natively to Gemini or other video-capable models for full-frame analysis
  • Extract keyframes and transcribe audio from large videos, then analyze with the current chat model
  • Auto-detect scene changes in long videos to select the most visually distinct frames
  • Transcribe audio tracks using Whisper for speech-to-text
  • Route podcast and video URLs to transcript sources before attempting download

How to install video-analysis

npx skills add https://github.com/starchild-ai-agent/official-skills --skill video-analysis
Prerequisites
  • Local video file path (not a URL — use web-crawler for links)
  • ffmpeg installed for frame extraction on large files
  • Workspace directory configured for skill imports
Claude Code
Cursor
Windsurf
Cline

How to use video-analysis

  1. 1.Call analyze_video(path, question) with a workspace-relative video file path and your analysis question
  2. 2.For videos ≤20MB: the skill sends the full video to a native video model (default: Gemini 3.1 Flash Lite)
  3. 3.For videos >20MB: the skill extracts keyframes (scene-detected for long videos) and transcribes audio
  4. 4.Review the returned result object: check mode ('native' or 'extraction'), analysis text, frame paths, and transcript
  5. 5.Optionally customize the model, size threshold, and extraction settings in config/video-analysis.yaml

Use cases

Good for
  • User asks 'what happens in this video?' — skill sends the file natively if small, or extracts frames + transcript if large
  • Analyze a recorded meeting or presentation to summarize key points and action items
  • Transcribe a podcast episode by URL (Apple Podcasts, Spotify, etc.) via web search and scraping
  • Extract and describe specific scenes from a long video without processing the entire file
  • Identify speakers, objects, text, and actions in video content for accessibility or documentation
Who it's for
  • Content creators and analysts reviewing video material
  • Researchers and students summarizing lectures or presentations
  • Accessibility specialists transcribing video content
  • Developers building video understanding into agents
  • Anyone needing to extract insights from local video files

video-analysis FAQ

Can I analyze a YouTube video or podcast link directly?

No — this skill requires a local file path. For URLs, use web-crawler to fetch transcripts first (YouTube has captions, podcasts often have show notes), or download the file locally if the user explicitly requests it.

What happens to videos larger than 20MB?

The skill extracts keyframes using scene detection (for long videos) or fixed intervals (for short videos), transcribes the audio with Whisper, and returns frame image paths and transcript text for the agent to analyze.

Which model is used for native video analysis?

By default, google/gemini-3.1-flash-lite (budget tier, ~$0.0014 per 6MB clip). You can change it to gemini-3.1-pro-preview or qwen models in config/video-analysis.yaml for higher accuracy at higher cost.

How do I configure the skill?

Edit config/video-analysis.yaml in your workspace (created on first use). You can set the default model, native size limit, max frames, scene detection sensitivity, and whether to transcribe audio.

Can I use this skill in a Python script?

Yes — use Pattern A (cd into the skill directory and import from exports) or Pattern B (import from core.skill_tools inside a starchild-clawd script). Do NOT use dotted imports like 'from skills.video-analysis.exports' because the hyphen is a syntax error in Python.

Full instructions (SKILL.md)

Source of truth, from starchild-ai-agent/official-skills.


name: video-analysis version: 1.3.0 description: "Video understanding for any model \u2014 native passthrough for small
\ files,\nframe extraction + audio transcription fallback for large files.\n\nUse
\ when the user asks to analyze, describe, or understand a video file\n(e.g. "
what's in this video", "summarize this clip", "transcribe this recording").\n" metadata: starchild: emoji: "\U0001F3A5" skillKey: video-analysis delivery: script user-invocable: true disable-model-invocation: false

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:

  1. Podcast episode link or episode name (Apple Podcasts, Spotify, Overcast, publisher site, or just "the a16z episode about X") → web_search for the publisher's episode page / show notes / transcript page, then web-crawler.scrape_markdown(url) to read it. Most major shows publish text.
  2. Video URL → web-crawler.youtube_video(url) / youtube_transcript(url) (cloud captions, ~1 s, no download; TikTok has tiktok_transcript).
  3. web_fetch came back empty (empty_extraction, JS-rendered page) → retry the same URL with web-crawler.scrape_markdown — it renders JS. Never conclude "no transcript" from an empty plain fetch.
  4. 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):

ModelTierCostTimeAccuracyNotes
google/gemini-3.1-flash-litebudget~$0.00148.1s~88%⭐ Default — cheapest + fastest
google/gemini-3.5-flashstd~$0.015211.8s~85%More detail, higher cost
qwen/qwen3.6-plusbudget~$0.005844.2s~95%Accurate but slow
qwen/qwen3.6-flashbudget~$0.002716.6s~80%Misreads subjects sometimes
google/gemini-3.1-pro-previewstd~$0.019919.7s100%Baseline (best, most expensive)

flash-lite identifies the full scene, action sequence, and transitions correctly at ~14x lower cost than the Pro baseline. For maximum accuracy (exact character names, fine detail), switch default_model to gemini-3.1-pro-preview or gemini-3.5-flash in config/video-analysis.yaml.

Extraction Mode (large videos)

For videos over the size threshold, the skill extracts keyframes and transcribes audio:

  • Short videos (≤60s): One frame every N seconds (default: 2s)
  • Long videos (>60s): Scene-change detection picks visually distinct frames
  • Audio: Extracted and sent to Whisper for transcription
  • Max frames: Capped at 30 (configurable) to control cost

The agent receives frame image paths and transcript text, then feeds them to the current chat model as image attachments + context text.

Configuration

Edit config/video-analysis.yaml (in the workspace) to customize. This file is created automatically on first use, only needs the keys you want to override, and survives skill updates.

Do NOT edit skills/video-analysis/config.yaml — that's the factory default and is overwritten on every skill auto-update. The user file overlays it.

Both the standalone skill and the chat "send a video" flow read this same config, so one edit changes the model everywhere. Available keys:

# Model for native video understanding
default_model: google/gemini-3.1-flash-lite

# Size threshold: native (≤) vs extraction (>)
# Set to 0 → always extraction. Set to 100 → always native.
native_size_limit_mb: 20

# Frame extraction settings
extraction:
  max_frames: 30                  # Max keyframes to extract
  short_video_interval_sec: 2     # Frame interval for ≤60s videos
  scene_threshold: 0.3            # Scene detection sensitivity (0.0-1.0)
  transcribe_audio: true          # Whether to Whisper-transcribe audio

Available Video Models

ModelAliasTierNotes
google/gemini-3.1-flash-liteflash31budget⭐ Default, best price/quality
google/gemini-3.5-flashgemini35standardMore detail, higher cost
google/gemini-3.1-flash-liteflash31budgetCheapest option
google/gemini-3.1-pro-previewgeministandardHighest quality
qwen/qwen3.6-flashqwenfbudgetGood alternative
qwen/qwen3.6-plusqwenbudget—
minimax/minimax-m3mm3standard—
meta-llama/llama-4-maverickmaverickstandard—
meta-llama/llama-4-scoutscoutbudget—
xiaomi/mimo-v2.5mimostandard—
z-ai/glm-5v-turboglm5vstandard—
minimax/minimax-m2.7mm27budgetAudio-only, no image

Agent Behavior

When the user provides a video file (via upload or file path) and the current chat model does NOT support video:

  1. Call analyze_video(path, question).
  2. If result mode is "native" → return result["analysis"] directly.
  3. If result mode is "extraction" → use result["frame_paths"] as image references and result["transcript"] as context, then ask the current model to analyze based on the frames + transcript.

When the current model DOES support video, the backend handles it natively via Phase 1 (base64 content block injection) — no need for this skill.

Troubleshooting

ProblemFix
"File not found"Check path is workspace-relative (e.g. output/videos/x.mp4)
Native mode returns errorCheck default_model in config/video-analysis.yaml is valid
No audio transcriptionVideo may have no audio track; check has_audio in result
Too few frames extractedLower scene_threshold in config/video-analysis.yaml (e.g. 0.15)
Too many frames / high costReduce max_frames or raise scene_threshold