Automate YouTube Shorts with Claude Code Clipper

Claude Code builds a pipeline in 15-30 mins: analyzes transcripts for 5 high-tension clips per video, trims with FFmpeg, adds HeyGen avatar hooks from 1000+ viral templates + 'Watch this', overlays Remotion captions, stacks PiP video vertically into 9:16 MP4s.

Pipeline Identifies and Extracts High-Value Clips

Feed Claude Code a folder of 40+ YouTube exports (MP4 + transcript per video). It scans transcripts for highest tension moments—inspired by Alex Hormozi's advice—selecting 5 clips per video based on value and engagement potential. Use FFmpeg for fast, precise trimming without re-encoding. Output lands in a dedicated folder as vertical 9:16 MP4s ready for YouTube Shorts, TikTok, or Reels.

For hooks, Claude picks from a 1000+ viral templates (e.g., 'This represents your X before, during, and after X'), fills variables contextually, appends 'Watch this', and generates 5-10s HeyGen avatar intros. Hooks build intrigue; on-screen text variant in top third reinforces without spoiling spoken words.

Remotion burns TikTok-style animated captions: words appear one-by-one, centered vertically/horizontally on clips, low on intros. Handles picture-in-picture source videos by stacking screen recording (top half) over full-face cam (bottom half, scaled up).

Full run processes one video in minutes; scales to batch entire folders. Planning phase takes 5-6 mins; initial build 15 mins.

Setup Leverages Claude Code in Antigravity for Zero-Install Coding

Install via Antigravity (antigravity.google): download, Google login, terminal paste one command from Claude Code quickstart. Fire up with claude, enter /plan mode.

Prompt end-to-end architecture: describe inputs (video/transcript folders), outputs (clipped MP4s), tools (FFmpeg trim, Remotion captions, HeyGen hooks). Provide viral-hooks.md file directly. Claude outputs step-by-step plan: project structure, dependencies, API needs.

Add .env with keys: Anthropic (platform.anthropic.com), HeyGen API/Avatar ID/Voice ID. Install Remotion skill globally via terminal (npx remotion install or similar)—takes 2s.

Enable auto-accept edits; Claude scaffolds full Node.js pipeline. No prior Remotion/HeyGen experience needed—Claude handles installs, API calls, FFmpeg commands.

Iterative Fixes Turn Rough Output into Production-Ready Shorts

First pass impresses: trims clips, adds basic captions/hooks, but outputs to wrong folder (e.g., prior project). Feed notes back: fix paths, raise captions 100-150px, add top-third text hook, enable PiP stacking, punch-in 30% on 'Watch this', cut speech gaps, caption intros word-by-word.

Claude iterates instantly: updates Remotion for dynamic positioning (bottom on intro, center on clips), FFmpeg for concat/split-screen, HeyGen job polling. Troubleshoot HeyGen credits or blurriness via re-runs.

Result: Polished shorts like 'I think I just found the biggest travel planning cheat code. Watch this.' + clip demo. Mobile-optimized; minor tweaks (e.g., avatar polish) yield usable content fast. Skip advanced like Karpathy's auto-research for hook optimization—add later for data-driven iteration.

Summarized by x-ai/grok-4.1-fast via openrouter

7115 input / 1609 output tokens in 10286ms

© 2026 Edge