Video Content Analyzer
Analyze short-form videos with Gemini AI to extract hooks, content structure, delivery style, and CTA strategies.
Prerequisites
GEMINI_API_KEY environment variable
google-genai and requests Python packages
Usage
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
--input outliers.json \
--output video-analysis.json \
--platform instagram \
--max-videos 5
Parameters
| Arg |
Description |
--input, -i |
Input JSON file with outlier posts (required) |
--output, -o |
Output JSON file for results (required) |
--platform, -p |
Platform: instagram, tiktok, or youtube (default: instagram) |
--max-videos, -n |
Max videos to analyze (default: 5) |
Input Format
Accepts outlier JSON from platform-specific research skills. Handles both formats:
- Direct list:
[{post1}, {post2}, ...]
- Wrapped:
{"outliers": [{post1}, {post2}, ...]}
The script automatically maps platform-specific fields:
| Platform |
Video URL Fields |
Caption |
Username |
| Instagram |
videoUrl |
caption |
ownerUsername |
| TikTok |
videoUrl, video_url, webVideoUrl |
text, desc |
authorUsername |
| YouTube |
videoUrl, url |
title |
channelTitle |
TikTok Note: The Apify TikTok Scraper returns webVideoUrl (the TikTok page URL) rather than a direct video download URL. Gemini will attempt to analyze from this page URL.
Output
Returns JSON array with analysis for each video:
[
{
"post_id": "ABC123",
"username": "creator",
"url": "https://...",
"platform": "instagram",
"likes": 50000,
"comments": 1200,
"views": 500000,
"analysis": {
"hook": {
"technique": "pattern-interrupt",
"opening_line": "Stop scrolling if you...",
"attention_grab": "Creates urgency and targets specific audience",
"replicable_formula": "Stop scrolling if you [pain point]"
},
"content_structure": {
"format": "problem-solution",
"sections": [...],
"pacing": "fast",
"retention_techniques": ["pattern interrupts", "text overlays"]
},
"delivery_style": {
"speaking": "direct-to-camera",
"energy": "high-energy",
"text_overlays": true,
"visual_style": "quick cuts with b-roll"
},
"cta_strategy": {
"type": "follow",
"cta_text": "Follow for more tips",
"placement": "end"
},
"why_it_works": "..."
}
}
]
Hook Techniques
The analyzer identifies these hook types:
pattern-interrupt - Breaks expected patterns
question - Opens with engaging question
bold-claim - Makes surprising statement
story-tease - Hints at compelling narrative
visual-shock - Striking visual opening
curiosity-gap - Creates information gap
direct-address - Speaks to specific audience
controversial-take - Polarizing opinion
relatable-pain - Targets common struggle
transformation-preview - Shows before/after
Content Formats
problem-solution - Present problem, offer fix
listicle - Numbered tips/items
story - Narrative arc
tutorial - Step-by-step how-to
before-after - Transformation reveal
day-in-life - Lifestyle content
reaction - Response to other content
hot-take - Opinion piece
tool-demo - Product/tool showcase
1---2name: video-content-analyzer3description: Analyze short-form videos with Gemini AI to extract hooks, content structure, and replicable patterns. Supports Instagram Reels, TikTok, and YouTube Shorts. Use when asked to: - Analyze video content for hooks and structure - Extract replicable formulas from viral videos - Understand why a video performed well - Get AI analysis of video content patterns Triggers: "analyze videos", "extract hooks", "video analysis", "analyze reels", "what makes this video work", "hook analysis", "content structure analysis"4---56# Video Content Analyzer78Analyze short-form videos with Gemini AI to extract hooks, content structure, delivery style, and CTA strategies.910## Prerequisites1112- `GEMINI_API_KEY` environment variable13- `google-genai` and `requests` Python packages1415## Usage1617```bash18python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \19 --input outliers.json \20 --output video-analysis.json \21 --platform instagram \22 --max-videos 523```2425### Parameters2627| Arg | Description |28|-----|-------------|29| `--input`, `-i` | Input JSON file with outlier posts (required) |30| `--output`, `-o` | Output JSON file for results (required) |31| `--platform`, `-p` | Platform: `instagram`, `tiktok`, or `youtube` (default: instagram) |32| `--max-videos`, `-n` | Max videos to analyze (default: 5) |3334## Input Format3536Accepts outlier JSON from platform-specific research skills. Handles both formats:37- Direct list: `[{post1}, {post2}, ...]`38- Wrapped: `{"outliers": [{post1}, {post2}, ...]}`3940The script automatically maps platform-specific fields:4142| Platform | Video URL Fields | Caption | Username |43|----------|-----------------|---------|----------|44| Instagram | `videoUrl` | `caption` | `ownerUsername` |45| TikTok | `videoUrl`, `video_url`, `webVideoUrl` | `text`, `desc` | `authorUsername` |46| YouTube | `videoUrl`, `url` | `title` | `channelTitle` |4748**TikTok Note**: The Apify TikTok Scraper returns `webVideoUrl` (the TikTok page URL) rather than a direct video download URL. Gemini will attempt to analyze from this page URL.4950## Output5152Returns JSON array with analysis for each video:5354```json55[56 {57 "post_id": "ABC123",58 "username": "creator",59 "url": "https://...",60 "platform": "instagram",61 "likes": 50000,62 "comments": 1200,63 "views": 500000,64 "analysis": {65 "hook": {66 "technique": "pattern-interrupt",67 "opening_line": "Stop scrolling if you...",68 "attention_grab": "Creates urgency and targets specific audience",69 "replicable_formula": "Stop scrolling if you [pain point]"70 },71 "content_structure": {72 "format": "problem-solution",73 "sections": [...],74 "pacing": "fast",75 "retention_techniques": ["pattern interrupts", "text overlays"]76 },77 "delivery_style": {78 "speaking": "direct-to-camera",79 "energy": "high-energy",80 "text_overlays": true,81 "visual_style": "quick cuts with b-roll"82 },83 "cta_strategy": {84 "type": "follow",85 "cta_text": "Follow for more tips",86 "placement": "end"87 },88 "why_it_works": "..."89 }90 }91]92```9394## Hook Techniques9596The analyzer identifies these hook types:97- `pattern-interrupt` - Breaks expected patterns98- `question` - Opens with engaging question99- `bold-claim` - Makes surprising statement100- `story-tease` - Hints at compelling narrative101- `visual-shock` - Striking visual opening102- `curiosity-gap` - Creates information gap103- `direct-address` - Speaks to specific audience104- `controversial-take` - Polarizing opinion105- `relatable-pain` - Targets common struggle106- `transformation-preview` - Shows before/after107108## Content Formats109110- `problem-solution` - Present problem, offer fix111- `listicle` - Numbered tips/items112- `story` - Narrative arc113- `tutorial` - Step-by-step how-to114- `before-after` - Transformation reveal115- `day-in-life` - Lifestyle content116- `reaction` - Response to other content117- `hot-take` - Opinion piece118- `tool-demo` - Product/tool showcase