
Video Content Analyzer
Analyze Instagram Reels, TikTok, and YouTube Shorts with Gemini to extract hooks, structure, and replicable short-form patterns for content strategy.
Install
npx skills add https://github.com/bradautomates/head-of-content --skill video-content-analyzerWhat is this skill?
- Analyzes short-form video via Gemini (default model gemini-2.5-flash) for hooks and structure
- Supports Instagram Reels, TikTok, and YouTube Shorts with platform-specific field mappings
- Python CLI with argparse, optional requests and google-genai imports
- Focuses on replicable content patterns rather than vanity metrics alone
- Loads credentials via dotenv when available for API access
Adoption & trust: 502 installs on skills.sh; 111 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
Grow/content is canonical because the script targets ongoing content iteration and pattern extraction from short-form video, not initial product coding. Content subphase reflects hook analysis, captions, and platform-specific mappings aimed at creators and growth marketers.
Common Questions / FAQ
Is Video Content Analyzer safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Video Content Analyzer
#!/usr/bin/env python3 """ Analyze short-form videos with Gemini AI. Supports Instagram Reels, TikTok, and YouTube Shorts. Focuses on content structure, hooks, and replicable patterns. """ import json import argparse import os import io import time import re from pathlib import Path # Conditional imports try: import requests REQUESTS_AVAILABLE = True except ImportError: REQUESTS_AVAILABLE = False try: from google import genai from google.genai import types GEMINI_AVAILABLE = True except ImportError: GEMINI_AVAILABLE = False # Load environment variables try: from dotenv import load_dotenv load_dotenv() except ImportError: pass GEMINI_MODEL = "gemini-2.5-flash" # Platform-specific field mappings PLATFORM_MAPPINGS = { "instagram": { "video_url": ["videoUrl"], "post_id": ["shortCode", "id"], "caption": ["caption"], "username": ["ownerUsername"], "url": ["url"], "likes": ["likesCount"], "comments": ["commentsCount"], "views": ["videoViewCount", "videoPlayCount"], "is_video": lambda p: ( p.get('videoUrl') and ( p.get('type', '').lower() == 'video' or p.get('productType', '').lower() == 'clips' or p.get('isVideo') ) ), }, "tiktok": { "video_url": ["videoUrl", "video_url", "webVideoUrl"], "post_id": ["id", "video_id"], "caption": ["text", "desc", "caption", "description"], "username": ["authorUsername", "author", "authorMeta.name", "username"], "url": ["webVideoUrl", "url"], "likes": ["diggCount", "likes", "likesCount"], "comments": ["commentCount", "comments", "commentsCount"], "views": ["playCount", "plays", "viewCount", "views"], "is_video": lambda p: bool(get_field(p, ["videoUrl", "video_url", "webVideoUrl"])), }, "youtube": { "video_url": ["videoUrl", "url"], "post_id": ["videoId", "id"], "caption": ["title", "description"], "username": ["channelTitle", "channel", "author"], "url": ["url", "videoUrl"], "likes": ["likeCount", "likes"], "comments": ["commentCount", "comments"], "views": ["viewCount", "views"], "is_video": lambda p: True, # YouTube results are always videos }, } VIDEO_ANALYSIS_PROMPT = '''Analyze this short-form video focusing on CONTENT STRUCTURE and HOOK TECHNIQUE. CAPTION/TITLE CONTEXT: {caption} Analyze the video and return a JSON object with this exact structure: {{ "hook": {{ "technique": "<one of: pattern-interrupt, question, bold-claim, story-tease, visual-shock, curiosity-gap, direct-address, controversial-take, relatable-pain, transformation-preview>", "opening_line": "<exact words or description of what's said/shown in first 3 seconds>", "attention_grab": "<why this hook works - be specific about the psychological trigger>", "replicable_formula": "<template version of this hook that could be adapted, e.g. 'If you [action], you're [consequence]'>" }}, "content_structure": {{ "format": "<one of: problem-solution, listicle, story, tutorial, before-after, day-in-life, reaction, transformation, hot-take, tool-demo>", "sections": [ {{ "name": "<section name like 'Hook', 'Problem', 'Solution', 'CTA'>", "duration_pct": <percentage of video>, "description": "<what happens in this section>" }} ], "pacing": "<one of: rapid-fire, fast, moderate, slow>", "retention_techniques": ["<list techniques used to keep viewers watching>"] }}, "delivery_style": {{ "speaking": "<one of: direct-to-camera, voiceover, text-only, mixed, no-speech>", "energy": "<one of: high-energy, conversational, calm-authority, urgent>", "text_overlays": <true/false>, "visual_style": "<descri