---
name: reel-autopilot
description: Runs the full reel pipeline from just a topic (script, HeyGen video, editing, Cloudinary link, caption and Buffer scheduling) by using the other .md skill files in this project in order. Use when the user gives only a video topic, or says "make a reel on…", "autopilot", or "run the full pipeline".
---

# Reel autopilot (master skill)

> Free skill from Clone Labs · clonelabs.in/guides/ai-video-autopilot/
> Upload this together with the other 6 skill files to the same Claude project.

## Job
The user gives **only a topic**. You run the whole pipeline yourself, step by step, using the other .md files in this project. Don't ask questions in between unless a step truly can't continue.

## Step 0 – Find the project files
Match each file to its job by its title and description:

| Step | Job | File (match by purpose if the name differs) |
|---|---|---|
| 1 | Write the script | `script-writing.md` |
| 2 | Make the HeyGen video | `heygen-video.md` |
| 3 | Edit the video | `video-editing.md` |
| 4 | Get a public link for the edited video | `cloudinary-public-link.md` |
| 5 | Write the caption | `caption-writing.md` |
| 6 | Schedule on Instagram | `buffer-instagram-schedule.md` |

If a file for a step is missing, tell the user which one and stop. Don't invent that step's rules.

**Each file's own rules always win** for its step. This file only decides the order and what is passed between steps.

## Read the user's message for options
- **Topic:** required. If it's missing, ask for it (the only question allowed at the start).
- **Avatar:** if named, pass it to step 2. Otherwise use the default in `heygen-video.md`.
- **Account:** if named, pass it to step 6. Otherwise use the default in `buffer-instagram-schedule.md`.
- **When to post:** "now", a date/time, or nothing (= Buffer queue).
- **"no edit":** skip steps 3 and 4 and schedule the HeyGen video as it is.
- **"auto-post":** skip the final approval in step 6.

## The pipeline

### 1. Script
Follow the script-writing file with the topic. Save the chosen script as `script-<topic-slug>.md`. Show the user the script in one short message, then **continue straight away** (don't wait).

### 2. HeyGen video
Follow `heygen-video.md` with `script-<topic-slug>.md`.
- Because the video will be edited next, **don't** call `show_video`. Instead, check `get_video` every 30 seconds until the status is `completed`.
- If it fails, show the error and stop.
- Save the video ID and video URL.

### 3. Edit
Download the HeyGen video from its video URL into the workspace (for example `curl -L -o heygen-<topic-slug>.mp4 "<video URL>"`), then follow the video-editing file with the script. Save the result as `final-<topic-slug>.mp4` and send it to the user with a one-line caption.
- If the download is blocked, tell the user to check that **Allow network egress** is on in Settings → Capabilities. If it still fails, give them the HeyGen video link so they can download it and upload it into the chat, and pause. When they do, carry on with the edit.

### 4. Public link (Cloudinary)
Follow `cloudinary-public-link.md` to upload `final-<topic-slug>.mp4`. Save its `secure_url`: that's the public .mp4 link Buffer needs.
- If the upload fails, stop and tell the user: "The edited video is ready. Upload `final-<topic-slug>.mp4` to Buffer yourself and paste in the caption." Include the caption.

### 5. Caption
Follow the caption-writing file, using the topic and the final script. Save it as `caption-<topic-slug>.md`.

### 6. Schedule
Use the Cloudinary link from step 4 as the video. If editing was skipped ("no edit"), use the HeyGen video ID directly.

Then follow `buffer-instagram-schedule.md`.
- **Approval:** send ONE message with the account, the caption's first line and the time, and wait for "yes", unless the user wrote "auto-post". Then schedule straight away (queue by default).

## Progress and final report
- Use a task list with the 6 steps so the user can see progress.
- Keep messages between steps to one line each.
- At the end, reply in 4 lines max:
  - Topic
  - Final video (file sent)
  - Account and scheduled time
  - Anything that needs the user (if any)

## Rules
- Never skip a step silently. If one fails, say which step and why, and stop there.
- Never retry a paid step (HeyGen generation) on your own. Ask first.
- One topic = one reel. If the user gives several topics, run the pipeline once per topic, one after another.
- If Buffer says the scheduling limit is reached, say so and stop at step 6.
