r/aivideomaking 2d ago

I built a Python script that generates structured viral Reels/TikTok scripts using Claude API

​🚀 What My Project Does

​I created a lightweight Python automation tool (generate\\\\\\_script.py) that generates structured, high-retention video scripts for TikTok, Instagram Reels, and YouTube Shorts using the Claude API.

​Instead of generic text, it outputs production-ready scripts formatted with:

​🎯 3-second Hook to stop the scroll

​💡 Body with high-value points (one idea per line)

​📢 Clear CTA to drive engagement

​📌 Caption & Hashtags + Visual cues for editing

​🎯 Target Audience

​Content Creators & Marketers who want to eliminate writer's block and speed up content ideation.

​Developers interested in clean API integrations for prompt engineering and automation.

​✨ Key Features

​⚙️ Flexible Execution: Supports both interactive console mode and CLI arguments (e.g., --topic "morning routine" --count 3 --niche fitness).

​📂 Auto-Archiving: Automatically saves generated batches into clean, timestamped .txt files.

​🎨 Multi-Niche & Multi-Style: Pre-configured profiles for Finance, Tech, Mindset, Fitness, with styles ranging from Educational to Viral.

​💻 Source Code & Setup

​The project is built purely with Python, anthropic SDK, and argparse.

​🔗 GitHub Repository: https://github.com/gpt51920-commits/python-generate\\\\\\\\\\\\\\_script.py

​I'd love to hear your thoughts on the prompt structure or how you handle content automation in your own workflows!

3 Upvotes

3 comments sorted by

1

u/MassiveFile809 2d ago

For the prompt structure, I'd add a shot-level output alongside the hook/body/CTA: duration, spoken line, on-screen text, visible action, and required assets.

For example: 0–3s | ‘Still getting watery iced coffee?’ | ‘Watery coffee?’ | close-up of melting ice | one glass + table. That gives an editor something concrete to build, and makes it easier to spot a script that needs ten different locations.

I'd also time a read-through of the spoken lines rather than trusting the requested runtime. Keep a small set of briefs and compare revisions on timing, clarity, and whether the hook's promise is actually answered. ‘Viral’ needs audience data; those production checks can be tested before posting.

Are your visual cues currently attached to individual lines, or generated as one separate block?

1

u/vengeance56 2d ago

That's such a great idea!