Repo Explainer Video Generator
johnpsasser/repo-explainerThis skill analyzes a git repository (local or remote) and automatically creates a professional 30-second explainer video featuring:
SKILL.md
Repo Explainer Video Generator
Generate stunning 30-second explainer videos from any git repository using Gemini VEO 3.1
Overview
This skill analyzes a git repository (local or remote) and automatically creates a professional 30-second explainer video featuring:
- Clean, modern graphics with dynamic infographics
- AI-generated voiceover narration
- Lo-fi/trip hop background music
- Smooth scene transitions
- 1080p HD output
How It Works
- Repository Analysis: Uses parallel AI agents to comprehensively analyze README, documentation, and code structure
- Script Generation: Creates a 5-scene narrative script (6 seconds per scene)
- Visual Generation: Generates 5 video clips in parallel using Gemini VEO 3.1 Fast with scene extension
- Voiceover: Creates natural AI narration using ElevenLabs
- Composition: Combines video, voiceover, and music using ffmpeg
Usage
/repo-explainer <path-or-url>
Examples
# Local repository
/repo-explainer /Users/you/projects/my-app
# Remote GitHub repository
/repo-explainer https://github.com/username/repo
# With custom output path
/repo-explainer https://github.com/vercel/next.js --output ./nextjs-explainer.mp4
Requirements
Environment Variables
Required API keys (set in your .env or environment):
# Required
GEMINI_API_KEY=your_gemini_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
# Optional
OUTPUT_DIR=./videos # Default: current directory
VIDEO_QUALITY=1080p # Options: 720p, 1080p (default)
VEO_MODEL=fast # Options: fast (default), standard
System Dependencies
- Python 3.9+
- ffmpeg (for video composition)
Python Dependencies
See requirements.txt:
- google-genai
- elevenlabs
- gitpython
- moviepy
- asyncio
Output
Creates an MP4 file with:
- Resolution: 1080p (default) or 720p
- Duration: ~30 seconds
- Audio: Voiceover + background music
- Format: H.264 video, AAC audio
Scene Structure
The generated video follows this 5-scene structure (6 seconds each):
- Hook (0-6s): Eye-catching intro with the tool's name and tagline
- Problem (6-12s): What problem does this tool solve?
- Solution (12-18s): How does it work? Architecture overview
- Key Features (18-24s): Highlight 2-3 standout features
- Get Started (24-30s): Quick start guide and call-to-action
Architecture
- Ultra-parallel processing: Repository analysis, video generation, and voiceover creation all run in parallel
- Scene extension: VEO clips seamlessly connect using the final frame of the previous clip
- Cost-optimized: Uses VEO 3.1 Fast ($0.15/sec = ~$4.50 per video) for fast, affordable generation
- Quality-first: ElevenLabs voiceover for natural, engaging narration
Prompting Strategy
The skill uses Gemini 2.5 Flash to enrich prompts with:
- Cinematic camera movements
- Specific visual styles (modern tech + infographic aesthetics)
- Detailed scene descriptions
- Synchronized audio cues
Cost Estimate
Per 30-second video:
- VEO 3.1 Fast: 30 seconds @ $0.15/sec = $4.50
- Gemini 2.5 Flash analysis: ~$0.05
- ElevenLabs voiceover: ~$0.01 (with free tier)
- Total: ~$4.50-5.00 per video
Notes
- First run may take 3-5 minutes as clips are generated
- Supports both public and private repositories (if you have access)
- Automatically clones remote repos to temp directory
- Generates intermediate files in
.repo-explainer-cache/(can be deleted after)
Credits
Built with:
- Gemini VEO 3.1 - Video generation
- ElevenLabs - AI voiceover
- Claude Code - Skill framework
README
Repo Explainer
Automatically generate 30-second explainer videos from any git repository using AI.
This tool analyzes your codebase, writes a script, generates cinematic video clips with Gemini VEO 3.1, adds AI voiceover, and produces a polished HD video ready to share.
Quick Install
curl -sL https://raw.githubusercontent.com/johnpsasser/repo-explainer/main/install.sh | bash
Then set up your API keys:
- Get a Gemini API key (paid, ~$5/video)
- Get an ElevenLabs API key (free tier available)
- Add to your shell config:
export GEMINI_API_KEY="your-gemini-key" export ELEVENLABS_API_KEY="your-elevenlabs-key" - Install ffmpeg:
brew install ffmpeg(macOS) orsudo apt install ffmpeg(Linux) - Restart Claude Code
Usage
Generate a video from any repository:
/repo-explainer https://github.com/username/repo
Or use a local path:
/repo-explainer ~/dev/my-project
Preview the script without generating video (free):
/repo-explainer https://github.com/username/repo --preview
Specify output location:
/repo-explainer https://github.com/username/repo --output ~/Videos/demo.mp4
What It Does
The tool follows a five-step process:
- Analyzes the repository by reading the README, documentation, package files, and sampling code
- Generates a script with five 6-second scenes covering introduction, problem, solution, features, and getting started
- Creates video clips using Gemini VEO 3.1, applying scene extension for smooth transitions
- Generates voiceover narration using ElevenLabs
- Composes the final video by stitching clips, layering audio, and adding background music
The result is a 30-second, 1080p MP4 file.
Cost
Per video using VEO Fast (recommended):
- VEO 3.1 Fast: $4.50 (30 seconds at $0.15/sec)
- Gemini 2.0 Flash: ~$0.05 (analysis and script)
- ElevenLabs: $0 (free tier covers most use)
Total: About $5 per video
Preview mode is free. It generates the full script so you can review before paying for video generation.
How the Videos Look
The generated videos combine modern tech aesthetics with dynamic infographics. Each scene includes:
- Detailed visual descriptions for VEO (camera movements, lighting, composition)
- Natural voiceover narration explaining the project
- Ambient audio and sound effects
- Smooth transitions between scenes
The five-scene structure:
- Hook (0-6s): Eye-catching intro with project name
- Problem (6-12s): What problem does it solve?
- Solution (12-18s): How it works, architecture
- Features (18-24s): Key capabilities
- Get Started (24-30s): Quick start and call to action
Background Music
The tool creates a silent placeholder at .repo-explainer-cache/background_music.mp3. Replace this with your own 30-second track.
Free music sources:
- YouTube Audio Library
- Incompetech (free with attribution)
- Chosic
Configuration
Optional environment variables:
VIDEO_QUALITY=1080p # or 720p
VEO_MODEL=fast # or standard (slower, $12/video)
OUTPUT_DIR=./videos
Manual Installation
If you prefer not to run the install script:
-
Create the skill directory:
mkdir -p ~/.claude/skills/repo-explainer -
Download the files:
cd ~/.claude/skills/repo-explainer curl -sL https://raw.githubusercontent.com/johnpsasser/repo-explainer/main/SKILL.md -o SKILL.md curl -sL https://raw.githubusercontent.com/johnpsasser/repo-explainer/main/generate.py -o generate.py curl -sL https://raw.githubusercontent.com/johnpsasser/repo-explainer/main/requirements.txt -o requirements.txt chmod +x generate.py -
Install dependencies:
pip install -r requirements.txt brew install ffmpeg # or apt install ffmpeg -
Set your API keys and restart Claude Code
Customization
Change the voiceover voice: Edit generate.py around line 548. Replace voice="Adam" with another ElevenLabs voice like Rachel, Bella, Antoni, or Thomas.
Adjust video quality: Set VIDEO_QUALITY=720p in your environment for faster generation at lower resolution.
Use higher quality VEO: Set VEO_MODEL=standard for better results. This costs $0.40/sec instead of $0.15/sec ($12 vs $5 per video).
Troubleshooting
"GEMINI_API_KEY not set"
Make sure the key is exported in your shell. Check with echo $GEMINI_API_KEY. Add it to .zshrc or .bashrc and restart your terminal.
"Module not found" errors
Install dependencies manually: pip install -r requirements.txt
If you have multiple Python versions, make sure you're using Python 3.9+.
"ffmpeg not found"
Install ffmpeg using your package manager: brew install ffmpeg (macOS) or sudo apt install ffmpeg (Linux).
Generation is slow
This is normal. VEO takes 1-3 minutes per 6-second clip, so total generation time is 5-15 minutes for a complete video.
No sound in video
Make sure you have voiceover generated. Check the console output for ElevenLabs errors. Free tier has monthly limits.
Best Practices
Pick good repositories: Projects with clear README files, distinct features, and well-documented architecture produce the best videos. Very old or poorly documented repos may generate generic content.
Use preview mode first: Test the script generation before spending money on video. Preview mode is free and shows you exactly what the video will say.
Start with small repos: Simpler projects are easier to explain in 30 seconds. Complex enterprise codebases may not fit well in this format.
Add custom music: The default background track is silent. Adding lo-fi or trip hop music makes the video much more engaging.
How It Works Internally
Repository analysis: The tool reads README.md, package files (package.json, pyproject.toml, etc.), documentation in /docs, and samples up to 10 code files. It sends this to Gemini 2.0 Flash for analysis.
Script generation: Gemini creates a structured JSON script with five scenes. Each scene includes a detailed visual prompt (camera movements, lighting, colors), voiceover text, and audio cues.
Video generation: The tool calls VEO 3.1 sequentially for each scene, using scene extension so each clip continues from the last frame of the previous clip. This creates smooth transitions.
Audio composition: ElevenLabs generates the voiceover. MoviePy mixes it with background music (voiceover at 100%, music at 30%) and combines with the video.
Output: The final video is rendered with ffmpeg (H.264 video, AAC audio, 24fps) and saved as an MP4.
Examples
Generate for a popular framework:
/repo-explainer https://github.com/vercel/next.js
Local project with custom output:
/repo-explainer ~/projects/my-app --output ~/Desktop/demo.mp4
Preview a repo before generating:
/repo-explainer https://github.com/django/django --preview
Links
License
MIT