youtube-clipper-skill
An AI-powered tool for Claude Code to clip YouTube videos, generate semantic chapters, translate bilingual subtitles, and burn them into video files.

Suggested prompts
Clip this YouTube video: https://youtube.com/watch?v=VIDEO_ID
Analyze this video and create short clips with bilingual subtitles: https://youtube.com/watch?v=VIDEO_ID
Segment this video into semantic chapters and generate social media summaries: https://youtube.com/watch?v=VIDEO_ID
About this skill
YouTube Clipper Skill
YouTube Clipper is an AI-powered YouTube video clipper for Claude Code. It downloads videos, generates semantic chapters, clips segments, translates subtitles to bilingual format, and burns subtitles into videos.
Use Cases
- Extract highlights from YouTube videos (e.g., tech interviews, courses, talks)
- Generate bilingual subtitles (Chinese/English) for multi-language distribution
- Create short clips ready for social media platforms (Xiaohongshu, Douyin, WeChat)
- Automatically segment long videos by semantic content for quick navigation
Core Capabilities
- AI Semantic Analysis — Generate fine-grained chapters (2–5 minutes each) by understanding video content, not just mechanical time splitting
- Precise Clipping — Use FFmpeg to extract video segments with frame-accurate timing
- Bilingual Subtitles — Batch translate subtitles to Chinese/English with 95% API call reduction and 10x faster translation
- Subtitle Burning — Hardcode bilingual subtitles into videos with customizable styling
- Content Summarization — Auto-generate social media content (Xiaohongshu, Douyin, WeChat)
How It Works
- Environment Check — Verifies yt-dlp, FFmpeg, and Python dependencies
- Video Download — Downloads video (up to 1080p) and English subtitles
- AI Chapter Analysis — Claude analyzes subtitles to generate semantic chapters (2–5 min each)
- User Selection — Choose which chapters to clip and processing options (translate subtitles, burn subtitles, generate summary)
- Processing — Clips video, translates subtitles, burns subtitles (if requested)
- Output — Organized files in
./youtube-clips/<timestamp>/
What You Need to Provide
- A YouTube video URL
- A command in Claude Code, e.g.:
Clip this YouTube video: https://youtube.com/watch?v=VIDEO_ID - Optionally, select which chapters to clip and whether to generate bilingual subtitles, burn subtitles, or create a summary
What You Will Get
For each clipped chapter, the output directory contains:
./youtube-clips/20260122_143022/
└── Chapter_Title/
├── Chapter_Title_clip.mp4 # Original clip (no subtitles)
├── Chapter_Title_with_subtitles.mp4 # With burned-in subtitles
├── Chapter_Title_bilingual.srt # Bilingual subtitle file
└── Chapter_Title_summary.md # Social media content
Configuration
Edit ~/.claude/skills/youtube-clipper/.env to customize:
# FFmpeg path (auto-detected if empty)
FFMPEG_PATH=
# Output directory (default: current working directory)
OUTPUT_DIR=./youtube-clips
# Video quality limit (720, 1080, 1440, 2160)
MAX_VIDEO_HEIGHT=1080
# Translation batch size (20-25 recommended)
TRANSLATION_BATCH_SIZE=20
# Target language for translation
TARGET_LANGUAGE=中文
# Target chapter duration in seconds (180-300 recommended)
TARGET_CHAPTER_DURATION=180
Selection Guide
Unlike mechanical time-based splitting, this skill uses AI semantic analysis to:
- Understand content semantics and identify natural topic transitions
- Generate meaningful chapter titles and summaries
- Ensure complete coverage with no gaps
Usage Examples
Example: Extract highlights from a tech interview
Input:
Clip this video: https://youtube.com/watch?v=Ckt1cj0xjRM
AI-generated chapters:
1. [00:00 - 03:15] AGI as an exponential curve, not a point in time
2. [03:15 - 06:30] China's gap in AI development
3. [06:30 - 09:45] The impact of chip bans
Select chapters → get clipped videos with bilingual subtitles and social media content.
Requirements & Notes
System Dependencies
| Dependency | Version | Purpose | Installation |
|---|---|---|---|
| Python | 3.8+ | Script execution | python.org |
| yt-dlp | Latest | YouTube download | brew install yt-dlp (macOS) / sudo apt install yt-dlp (Ubuntu) / pip install yt-dlp |
| FFmpeg with libass | Latest | Video processing & subtitle burning | brew install ffmpeg-full (macOS) / sudo apt install ffmpeg libass-dev (Ubuntu) |
FFmpeg libass Support
- macOS users: The standard
ffmpegpackage from Homebrew does NOT include libass support (required for subtitle burning). Installffmpeg-full:brew uninstall ffmpeg brew install ffmpeg-full - Verify libass support:
ffmpeg -filters 2>&1 | grep subtitles— should outputsubtitles V->V (...)
Troubleshooting
- Slow video download: Set a proxy in
.env:YT_DLP_PROXY=http://proxy-server:portorsocks5://proxy-server:port - Subtitle translation fails: The skill auto-retries up to 3 times. If persistent, check network connectivity, Claude API status, or reduce
TRANSLATION_BATCH_SIZE - Special characters in filenames: Automatically sanitized by removing
\ / : * ? " < > |, replacing spaces with underscores, and limiting length to 100 characters