AI Hookbot
by @jean-maradiaga
Scrape viral hooks from YouTube Shorts creators and stitch them with a CTA video to produce ready-to-post TikTok/Reels/Shorts content. Use when asked to make...
clawhub install ai-hookbotπ About This Skill
name: ai-hookbot description: Scrape viral hooks from YouTube Shorts creators and stitch them with a CTA video to produce ready-to-post TikTok/Reels/Shorts content. Use when asked to make hooks, scrape Shorts, create content from a creator, or run the Hookbot pipeline. Triggers on phrases like "make me hooks from @X", "scrape hooks", "run hookbot", "create content from [creator]", "stitch my CTA".
AI Hookbot
Runs the Hookbot pipeline: scrapes YouTube Shorts hooks from a creator's channel, trims them, and stitches each with your CTA video to produce ready-to-post vertical content.
Setup
1. Install dependencies
pip install yt-dlp
brew install ffmpeg # macOS; or apt install ffmpeg on Linux
2. Clone the pipeline scripts
git clone https://github.com/YOUR_REPO/hookbot-scripts ~/hookbot
> Or place pipeline.py and related scripts in any directory β just set HOOKBOT_SCRIPTS_DIR below.
3. Configure environment variables
Copy config.example.env, fill in your paths, and either source it or add it to your shell profile:
cp config.example.env ~/.hookbot.env
edit ~/.hookbot.env
source ~/.hookbot.env
| Variable | Description | Default |
|---|---|---|
| HOOKBOT_SCRIPTS_DIR | Directory containing pipeline.py | ~/hookbot |
| HOOKBOT_CTA_DIR | Default folder to look for CTA videos | ~/hookbot/cta |
| HOOKBOT_YTDLP_PATH | Path to yt-dlp binary | yt-dlp (assumes in PATH) |
| HOOKBOT_FFMPEG_PATH | Path to ffmpeg binary | ffmpeg (assumes in PATH) |
| YOUTUBE_API_KEY | YouTube Data API v3 key (only needed for --viral) | _(optional)_ |
Workflow
1. Parse the user's request to extract:
- creator_url β YouTube Shorts URL (e.g. https://www.youtube.com/@ZackD/shorts). If only a handle/name is given, construct the URL.
- cta_video β Path to CTA video. If only a filename is given, resolve against $HOOKBOT_CTA_DIR. If not specified, prompt the user.
- count β Number of hooks (default: 10)
- hook_duration β Seconds to grab from each hook (default: 3.0)
- output_dir β Where to save final videos (default: ./output relative to $HOOKBOT_SCRIPTS_DIR)
2. Resolve paths from environment variables (fall back to defaults if unset):
SCRIPTS_DIR="${HOOKBOT_SCRIPTS_DIR:-~/hookbot}"
CTA_DIR="${HOOKBOT_CTA_DIR:-~/hookbot/cta}"
YTDLP="${HOOKBOT_YTDLP_PATH:-yt-dlp}"
FFMPEG="${HOOKBOT_FFMPEG_PATH:-ffmpeg}"
3. Run the pipeline via exec, passing only the required env vars explicitly (do NOT source ~/.zshrc or any shell RC file):
cd "$SCRIPTS_DIR" && \
YTDLP_PATH="$YTDLP" \
FFMPEG_PATH="$FFMPEG" \
YOUTUBE_API_KEY="${YOUTUBE_API_KEY:-}" \
python3 pipeline.py "" "" \
--count \
--hook-duration \
--output \
[--viral]
Add --viral when the user wants hooks sorted by view count (requires YOUTUBE_API_KEY). Default pulls most recent Shorts.
4. Report back a summary: - How many hooks were scraped - How many final videos were created - Output directory path - Any failures (sanitize error output before relaying β strip file paths and env var values)
Prompting for Missing Info
.mp4 files in $HOOKBOT_CTA_DIR.HOOKBOT_SCRIPTS_DIR not set / pipeline.py not found: Tell the user to set the env var and point it to the scripts directory.Example Invocations
Notes
manifest.json is saved in the output directory with metadata.--viral flag requires a YouTube Data API v3 key set as YOUTUBE_API_KEY. Get one at console.cloud.google.com.βοΈ Configuration
1. Install dependencies
pip install yt-dlp
brew install ffmpeg # macOS; or apt install ffmpeg on Linux
2. Clone the pipeline scripts
git clone https://github.com/YOUR_REPO/hookbot-scripts ~/hookbot
> Or place pipeline.py and related scripts in any directory β just set HOOKBOT_SCRIPTS_DIR below.
3. Configure environment variables
Copy config.example.env, fill in your paths, and either source it or add it to your shell profile:
cp config.example.env ~/.hookbot.env
edit ~/.hookbot.env
source ~/.hookbot.env
| Variable | Description | Default |
|---|---|---|
| HOOKBOT_SCRIPTS_DIR | Directory containing pipeline.py | ~/hookbot |
| HOOKBOT_CTA_DIR | Default folder to look for CTA videos | ~/hookbot/cta |
| HOOKBOT_YTDLP_PATH | Path to yt-dlp binary | yt-dlp (assumes in PATH) |
| HOOKBOT_FFMPEG_PATH | Path to ffmpeg binary | ffmpeg (assumes in PATH) |
| YOUTUBE_API_KEY | YouTube Data API v3 key (only needed for --viral) | _(optional)_ |
π Tips & Best Practices
manifest.json is saved in the output directory with metadata.--viral flag requires a YouTube Data API v3 key set as YOUTUBE_API_KEY. Get one at console.cloud.google.com.