Gemini Viral Shorts Post Generator
Uses Google Gemini API to analyze YouTube videos and generate viral Twitter/LinkedIn posts with a professional content marketing copywriter persona.
What It Does
- Takes a YouTube URL as input
- Sends the video (or transcript) to Gemini with a copywriter persona prompt
- Generates a viral post with: Hook (shocking headline + stat) → Body (value proposition) → Steps (how-to) → CTA (comment keyword)
- Outputs formatted text ready for posting
How to Run
# Generate viral post from YouTube video
python3 skills/gemini-viral-shorts/scripts/gemini_viral_shorts_post.py "YOUR_YOUTUBE_URL"
Configuration
Environment Variables
GEMINI_API_KEY=xxx
Dependencies
pip install google-generativeai yt-dlp python-dotenv
Post Structure
- Hook: Shocking headline + believable stat
- Body: How it works, why it's powerful, business impact
- Steps: Step-by-step breakdown
- CTA: Comment keyword + "Like this post"
Difference from youtube-to-viral-posts
This is a lighter-weight version focused purely on post generation:
- No database storage
- No custom CTA keyword flag
- Uses
gemini-1.5-proorgemini-1.5-flash(vs 2.0-flash in the other skill) - Simpler single-purpose script
Use youtube-to-viral-posts for the full pipeline with database tracking. Use this for quick one-off post generation.
Important Notes
- Ensure
GEMINI_API_KEYis set in.env - Gemini can analyze YouTube URLs directly without downloading
- Output is clean text — no markdown formatting
- For higher quality posts, use
gemini-1.5-pro; for speed, usegemini-1.5-flash
Scripts
| File | Purpose |
|---|---|
gemini_viral_shorts_post.py |
Main Gemini post generator |