video-understand
Video understanding and transcription with intelligent multi-provider fallback. Use when: (1) Transcribing video or audio content, (2) Understanding video content including visual elements and scenes, (3) Analyzing YouTube videos by URL, (4) Extracting information from local video files, (5) Getting timestamps, summaries, or answering questions about video content. Automatically selects the best available provider based on configured API keys - prefers full video understanding (Gemini/OpenRouter) over ASR-only providers. Supports model selection per provider.
What this skill does
# Video Understanding
Multi-provider video understanding with automatic fallback and model selection.
## Quick Start
```bash
# Check available providers
python3 scripts/check_providers.py
# Process a video (auto-selects best provider)
python3 scripts/process_video.py "https://youtube.com/watch?v=..."
python3 scripts/process_video.py /path/to/video.mp4
# Custom prompt
python3 scripts/process_video.py video.mp4 -p "List all products shown with timestamps"
# Use specific provider/model
python3 scripts/process_video.py video.mp4 --provider openrouter -m google/gemini-3-pro-preview
# List available models
python3 scripts/process_video.py --list-models
```
## Provider Hierarchy
Automatically selects the best available provider:
| Priority | Provider | Capability | Env Var | Default Model |
|----------|----------|------------|---------|---------------|
| 1 | Gemini | Full video | `GEMINI_API_KEY` | gemini-3-flash-preview |
| 2 | Vertex AI | Full video | `GOOGLE_APPLICATION_CREDENTIALS` | gemini-3-flash-preview |
| 3 | OpenRouter | Full video | `OPENROUTER_API_KEY` | google/gemini-3-flash-preview |
| 4 | FFMPEG | Frames + ASR | None (requires ffmpeg + whisper) | scene |
| 5 | OpenAI | ASR only | `OPENAI_API_KEY` | whisper-1 |
| 6 | AssemblyAI | ASR + analysis | `ASSEMBLYAI_API_KEY` | best |
| 7 | Deepgram | ASR | `DEEPGRAM_API_KEY` | nova-2 |
| 8 | Groq | ASR (fast) | `GROQ_API_KEY` | whisper-large-v3-turbo |
| 9 | Local Whisper | ASR (offline) | None | base |
**Full video** = visual + audio analysis. **Frames + ASR** = extracted screenshots + audio transcription (free, offline). **ASR** = audio transcription only.
## CLI Options
```
python3 scripts/process_video.py [OPTIONS] SOURCE
Arguments:
SOURCE YouTube URL, video URL, or local file path
Options:
-p, --prompt TEXT Custom prompt for video understanding
--provider NAME Force specific provider
-m, --model NAME Force specific model
--asr-only Force ASR-only mode (skip visual analysis)
-o, --output FILE Write JSON to file instead of stdout
-q, --quiet Suppress progress messages
--list-models Show available models per provider
--list-providers Show available providers as JSON
```
## Model Selection
Each provider supports multiple models. Use `--list-models` to see options:
```bash
python3 scripts/process_video.py --list-models
```
**OpenRouter models:**
- `google/gemini-3-flash-preview` (default) - Fast, free tier
- `google/gemini-3-pro-preview` - Higher quality
**Gemini models:**
- `gemini-3-flash-preview` (default) - Latest, fast
- `gemini-3-pro-preview` - Highest quality
- `gemini-2.5-flash` - Stable production fallback
**Local Whisper models:**
- `tiny`, `base` (default), `small`, `medium`, `large`, `large-v3`
**FFMPEG modes** (frame extraction strategy):
- `scene` (default) - Extract frames when scene changes (smart, efficient)
- `keyframe` - Extract I-frames only (fastest)
- `interval` - Extract frames at regular intervals (predictable)
## Quick Reference
| Task | Reference |
|------|-----------|
| **Setup & API keys** | [setup-guide.md](references/setup-guide.md) |
| Use Gemini for video | [gemini.md](references/gemini.md) |
| Use OpenRouter | [openrouter.md](references/openrouter.md) |
| **FFMPEG frames (free)** | [ffmpeg-frames.md](references/ffmpeg-frames.md) |
| ASR providers | [asr-providers.md](references/asr-providers.md) |
| Output JSON schema | [output-format.md](references/output-format.md) |
| Video sources & downloading | [video-sources.md](references/video-sources.md) |
## Verify Setup
```bash
python3 scripts/setup.py # Check dependencies and API keys
```
## Output Format
All providers return consistent JSON:
```json
{
"source": {
"type": "youtube|url|local",
"path": "...",
"duration_seconds": 120.5,
"size_mb": 15.2
},
"provider": "openrouter",
"model": "google/gemini-3-flash-preview",
"capability": "full_video",
"response": "...",
"transcript": [{"start": 0.0, "end": 2.5, "text": "..."}],
"text": "Full transcript..."
}
```
## Features
- **Automatic provider selection** based on available API keys
- **Model selection** per provider with sensible defaults
- **Robust path handling** for macOS special characters and unicode
- **Progress output** (use `-q` for quiet mode)
- **File size warnings** for API limits
- **Auto-conversion** of video formats when needed
- **YouTube URL support** (direct or via download)
## Requirements
**For full video understanding:**
```bash
pip install google-generativeai # Gemini
pip install openai # OpenRouter
```
**For ASR fallback:**
```bash
brew install yt-dlp ffmpeg # Video tools
pip install openai # OpenAI Whisper
pip install groq # Groq Whisper
pip install assemblyai # AssemblyAI
pip install deepgram-sdk # Deepgram
pip install openai-whisper # Local Whisper
```
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.