Turns a long video (podcast, interview, Twitch/Kick/YouTube stream VOD, or a local file) into finished, captioned 9:16 vertical clips for TikTok, Instagram Reels and YouTube Shorts, with the AI picking the best moments. Use when the user asks to clip a video, make shorts/reels/TikToks from a video or link, find viral moments, or cut a podcast or stream into clips. Examples: "clip this video", "make 5 shorts from this podcast", "cut this stream into TikToks", "find the best moments in this lin...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ai Clipping?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mocdew-ai-clipping)
---
name: ai-clipping
description: 'Turns a long video (podcast, interview, Twitch/Kick/YouTube stream VOD, or a local file) into finished, captioned 9:16 vertical clips for TikTok, Instagram Reels and YouTube Shorts, with the AI picking the best moments. Use when the user asks to clip a video, make shorts/reels/TikToks from a video or link, find viral moments, or cut a podcast or stream into clips. Examples: "clip this video", "make 5 shorts from this podcast", "cut this stream into TikToks", "find the best moments in this link", "make reels from this file".'
---
# AI Clipping workflow
You turn one long video into short, captioned vertical clips. A local Python tool
does the heavy lifting (download, transcription, rendering). **You** pick the moments
by reading the transcript: no API key is needed.
**Permission reminder (say this once, briefly, at the start):** only clip content the
user has permission to use, such as videos from a clipping campaign (Whop Content
Rewards, Vyro, an agency brief) or their own content.
**Never** upload or post anything, log into social accounts, or automate a browser.
Posting stays manual (or through a scheduler like Postiz/Buffer using `post_queue.csv`).
## The tool
```
CLI = python3 "${CLAUDE_PLUGIN_ROOT}/scripts/clipper_cli.py"
```
- **Plugin root.** In Claude Code, `${CLAUDE_PLUGIN_ROOT}` is set for you. In any other
agent (Antigravity CLI, Gemini CLI, ...) it isn't: the plugin root is the folder two
levels above this SKILL.md (`<plugin root>/skills/ai-clipping/SKILL.md`). Usual install
folders: `~/.gemini/config/plugins/ai-clipper` (Antigravity CLI) or
`~/.gemini/extensions/ai-clipper` (Gemini CLI); on Windows they're under
`%USERPROFILE%\.gemini\`. Use that absolute path everywhere this file or the files it
points to say `${CLAUDE_PLUGIN_ROOT}`.
- Tool names below are Claude Code's (Bash, Read, Write). Use your own shell, file-reading
and file-writing tools.
- On Windows use `python` instead of `python3` (or `py -3` if `python` isn't found).
- Always keep the quotes around the script path and around every folder/file path:
paths can contain spaces.
- Run every command from the user's current working directory. Outputs go to
`./clips-output/<video-title>/`. Never write anything inside `${CLAUDE_PLUGIN_ROOT}`.
## Inputs
From the user's request (or `$ARGUMENTS` when invoked as a command) work out:
| What | Default | Examples of how users say it |
|---|---|---|
| source (required) | - | a URL, a local file path, or a `.txt` with one link per line (batch) |
| number of clips | `clips_per_video` from config (5) | "8 clips", a bare number like `8` |
| time range | whole video | "only 1:00:00 to 2:30:00" -> `--start 1:00:00 --end 2:30:00` |
| reframe | config (`face`) | "gaming", "split screen", "facecam" -> `--reframe split`; "blur", "keep full frame" -> `--reframe blur`; "podcast", "follow the speaker" -> `--reframe face` |
| campaign | none | "campaign: acme" -> `--campaign acme` (file `./campaigns/acme.yaml`) |
| length | 20-60 s | "60 seconds max" -> `--max-seconds 60`; "at least 30s" -> `--min-seconds 30` |
| whisper model | `small` (`base` in lite mode) | "fast", "quick" -> `--model base`; "most accurate" -> `--model medium` |
| performance | `auto` (lite on weak computers) | "my PC is slow", "old laptop", "lite mode", "it froze last time" -> `--performance lite`; "full quality" -> `--performance normal` |
| facecam box | config | "facecam is top right" -> see Split mode below |
| aspect | `9:16` (1080x1920) | "for the Instagram feed", "4:5", "portrait post" -> `--aspect 4:5` (1080x1350); "square", "1:1", "LinkedIn" -> `--aspect 1:1` (1080x1080) |
| burned captions | on | "no captions on the video", "I'll add captions in TikTok", "clean video" -> `--no-burn` (the .srt is still written) |
If no source was given, ask for it. Otherwise don't ask questions: choose sensible
defaults and say what you chose.
## Step 0: check
Run `CLI check`. If it ends with `STATUS: READY`, continue. If not, run the
`/ai-clipper:setup` flow (read `${CLAUDE_PLUGIN_ROOT}/commands/setup.md` and follow it),
explaining each step in plain language, then come back here.
## Step 1: prepare (download, audio, transcript, loudness)
1. `CLI probe "<source>" [--start .. --end ..] [--model ..]` prints JSON with the title,
duration, output `folder` and a time `estimate`. Tell the user the estimate, and if it
says `Performance: LITE`, say in one line that lighter settings are on for this
computer (pass the same `--performance` flag to prepare and render). If the
video is over 1 hour and they didn't pick a model or range, suggest `--model base` or a
time range, then continue with what they asked for (don't wait unless they asked you to).
For a local file this is instant. For a `.txt` batch, probe prints one line per link.
2. Run prepare **in the background** (Bash tool with `run_in_background: true`; in other
agents, your shell tool's background option, or on Mac/Linux append
`> "<folder>/prepare.out" 2>&1 &`) so it can't hit the command timeout:
`CLI prepare "<source>" --out "<folder from probe>" [--start ..] [--end ..] [--model ..] [--campaign ..] [--performance ..]`
For a batch `.txt`, run `CLI prepare "links.txt"` without `--out`; it prints one
`OUTPUT_FOLDER:` line per video and `BATCH_READY: [...]` at the end.
3. While it runs, check progress with `CLI status "<folder>"` about once a minute and tell
the user the stage and percentage (download -> transcribe -> speakers -> signals -> done).
Don't spam.
4. It's finished when the output shows `READY: <folder>`. If it shows `ERROR:`, explain the
message in plain words and the fix it suggests (usually updating yt-dlp, installing deno
for YouTube, or a smaller model when out of memory).
Every stage is cached, so re-running prepare on the same source skips finished work.
Add `--force` only to redo everything.
## Step 2: you pick the moments
You pick in three phases: **A. judge candidates with a rubric, B. break close ties, C.
critique your picks.** For a short video this is still one pass: read, score, check, write.
1. **Read.** `CLI transcript "<folder>" --rules [--campaign ..]` prints a header (duration,
chunk count, clip length limits, campaign brief and banned words), the selection rules, and
chunk 1..N of `[mm:ss] text` lines. Marks: `🔊 LOUD` loudness peak, `😂 LAUGH` laughter,
`👏 APPLAUSE` applause or cheering, `⚡ FAST` unusually fast talking, `↑ PITCH` a raised
voice, `✂ CUT` a camera/scene cut, `⇄ BACK-AND-FORTH` rapid speaker changes. They are
clues, not verdicts: the words still decide. When the voices could be told apart, a line
starts with `S1:` / `S2:` whenever the speaker changes (labels come from the voice and can
be wrong now and then; S1 is whoever speaks first). Use them to keep a question and its
answer together, and to spot arguments and exchanges.
If the output is too long to read at once, print chunks one by one with `--chunk 1`,
`--chunk 2`, ... **Read every chunk before choosing.** Note candidates as you go
(about 2-3x N promising stretches, numbered).
**Videos over ~30 minutes:** don't read the whole transcript first. Run
`CLI candidates "<folder>" --rules [--k 30] [--campaign ..]` instead. It prints the ~30
strongest clip windows (`#id [start - end] duration score signals`), each as timed
sentences with `CONTEXT before:` / `CONTEXT after:` lines that are **not** part of the
clip, plus the rubric below, and saves them to `<folder>/candidates.json`. The score is
only a clue from loudness, signals and keywords. Read any stretch of the full transcript
you need for context (`CLI transcript "<folder>" --chunk N`).
2. **A. Judge** every candidate, 0-10 on each, one short reason each. Be harsh: most
candidates should score under 6. Judge only what is said; don't invent visuals.
- **hook:** the first 2 seconds stop a scrolling viewer (a claim, conflict, question, or
surprising line; not a greeting or setup).
- **standalone:** understandable with zero context; no unexplained "he"/"that" pointing
outside the clip.
- **payoff:** ends on a punchline, answer, reveal or strong statement, not a trailing thought.
- **emotion:** laughter, anger, surprise, vulnerability, excitement.
- **brief_fit:** matches the campaign brief and avoids banned words (10 if there's no brief).
- **total** = 0.35 hook + 0.2 standalone + 0.2 payoff + 0.15 emotion + 0.1 brief_fit.
Tighten each one: `suggested_start` on the hook line and `suggested_end` on the payoff,
anywhere inside the window or its context. Write `<folder>/judged.json`:
`[{"id": 3, "suggested_start": 754.2, "suggested_end": 801.0, "hook": 8, "standalone": 7,
"payoff": 8, "emotion": 6, "brief_fit": 10, "total": 7.75, "reason": "..."}]`.
**Look at the top ~2N.** `CLI frames "<folder>" --ids 3,7,12` (candidate ids) or
`--at 12:30-13:05,45:10` (time ranges, for candidates you found in the transcript) saves
one contact sheet per candidate, `<folder>/frames/cand_<id>.jpg` / `at_<start>-<end>.jpg`:
6 frames across the window in a 3x2 grid, each labelled with its time. Open each with the
Read tool. Lower the score for: a static or black screen, a slideshow, someone else's
watermark or logo, a face off-screen for most of the clip (podcasts), or gameplay with
nothing happening (streams). Say what you saw in `reason`.
3. **B. Break ties.** Rank by total. Among the top ~2N, when two totals are within 1 point,
ask: "Which would get more completed views from a cold audience?" Consider them in both
orders (A vs B, then B vs A); move the lower one up only if it wins both ways.
4. **C. Critique.** Take the top N that don't overlap and try to break each one:
(1) Does the first sentence need something said before the clip? (2) Is the first line a
hook, or is the hook later; if later, where? (3) Does it end on a payoff or trail off?
(4) Any banned words, sponsor read, or a claim that could be misleading out of context?
(5) If it joins segments: does every cut read naturally, with nothing missing in between?
(6) If it has a cold open: is that the strongest line, and does the clip still make sense
after the cut back?
Then **keep** it, **fix** it (move start/end, or change/drop the segments), or **replace**
it with the next-best candidate that doesn't overlap, and critique that one too (at most
2 rounds). Every pick must also follow the rules below.
If the transcript header has a `# THIS USER'S TASTE` block, it was learned from this user's
own approvals, rejections and trims in the review editor: weigh it when picking (it never
overrides the rules below or a campaign brief). Mention `CLI profile --show` / `--reset` only
if the user asks what Clipsmith learned about them.
### Selection rules
- **Strong hook in the first 2 seconds:** start AT the most interesting line or the
punchline, not the slow setup. The first sentence must make people stop scrolling.
- **Self-contained:** makes sense with zero context. Has a clear payoff or ending.
- **Length** within the min/max from the header (default 20-60 s).
- **Never start or end mid-sentence.** The renderer snaps to word boundaries (0.3 s padding
before, 0.5 s after) and nearby sentence boundaries, but aim for clean sentence edges.
- **Avoid** ad reads/sponsor segments, dead air, repeated content, and anything that contains
a banned word. Follow the campaign brief exactly (topics, tone, what to feature).
- **Score high:** loud peaks, laughter, applause, fast or raised-voice moments, strong opinions, surprising facts, conflict,
emotional moments, story moments ("so this one time...").
- **No overlapping clips. Spread picks across the whole video,** not all from one section.
- **Joining parts (use sparingly):** most clips are one continuous stretch. When the setup
and the payoff are far apart (a question at 12:40, the answer at 14:05), you may join up to
3 segments into one clip with `"segments"` (below). Only do it when the joined clip reads
naturally with no missing context, and say so in `reason`. The total length must still be
within min/max.
- **Cold open (only when the rules printed by `transcript --rules` mention it, i.e.
`cold_open: auto`):** if the best line is more than 5 s into the clip and the clip can't
simply start there (the setup is needed), add `"cold_open": [start, end]` (2-6 s around
that line, inside the clip). The clip opens with that line, hard-cuts back to the start
and plays in full, so the line is heard twice. Use it rarely, for a genuinely great line.
- **Loop ending (only when the rules mention it, i.e. `loop_endings: auto`):** if the last
sentence leads naturally back into the first line (a question that the opening answers,
"and he said..." before a quote), add `"loop": true`. The end moves (up to 3 s) to the best
sentence end followed by a pause, and the padding is trimmed so the replay is seamless.
- **Fillers and pauses are cut automatically** ("um", "uh", "you know" between pauses, and
pauses longer than ~0.45 s), so don't skip a great moment because the speaker hesitates.
- **Captions:** 3 distinct variants per clip, each with a different wording and angle
(e.g. curiosity hook / bold quote or claim / question to the viewer). Short, natural,
no clickbait lies. Don't add hashtags or @mentions: the campaign's required mentions and
hashtags are added automatically, rotated per platform.
5. Write `<folder>/moments.json` (Write tool), best first:
```json
[
{"start": 754.2, "end": 801.0, "title": "He got fired on day one",
"score": 9, "reason": "Loud reaction + clear story payoff, hook in first line",
"captions": ["He didn't last ONE day 😭", "\"I got fired before lunch\"", "Would you have quit too?"]}
]
```
A joined clip adds `segments`, in time order; `start`/`end` are then the first segment's
start and the last one's end:
```json
{"start": 754.2, "end": 861.0, "segments": [[754.2, 770.0], [842.5, 861.0]],
"title": "The answer came 90 seconds later", "score": 8,
"reason": "Joined: question at 12:34 + answer at 14:02; reads naturally without the tangent between",
"captions": ["...", "...", "..."]}
```
Optionally add `"headline"`: up to 6 words shown at the top of the clip for its first
3 seconds when headlines are on (`headline.enabled: true` in clipper.yaml, or
`--headline on`). Write a curiosity hook, not a spoiler, and no clickbait lies
("He quit on day one", not "He got fired and sued them"). Without it the title is used.
With a cold open and/or a loop ending (only when those settings are on):
```json
{"start": 1210.0, "end": 1248.5, "cold_open": [1231.2, 1235.0], "loop": true,
"title": "She quit on live TV", "score": 9,
"reason": "Best line is 21 s in but needs the setup: cold open on it; ending question loops into the opening",
"captions": ["...", "...", "..."]}
```
`start`/`end` are seconds in the video (convert `[1:02:03]` to 3723). `score` is the
rubric total (1-10); `reason` says what the critic step checked or fixed.
Titles are short (they become file names). Pick exactly N unless the video doesn't have N
good moments; then pick fewer and say why.
## Step 3: render
`CLI render "<folder>" --moments "<folder>/moments.json" [--reframe face|blur|split] [--aspect 9:16|4:5|1:1] [--no-burn] [--campaign ..] [--facecam-box l,t,w,h] [--performance ..]`
Rendering takes roughly 10-40 s per clip; for more than ~6 clips run it in the background
too. It prints `WARNING:` lines when it had to adjust a moment (too long, overlapping,
banned word). If a moment was dropped and the user wanted N clips, pick a replacement,
update moments.json and render again (finished clips are cached).
Add `--headline on` when the user asks for a headline / title on the video.
Zoom punch-ins on emphasised moments are on by default (`N punch-ins` in the log); add
`--zoom-punch off` if the user wants no zooms.
Use `--dry-run` to see the snapped start/end times (and joined segments) without rendering.
The summary shows how many seconds tightening cut from each clip (`tightened -3.1s`), and
`cold open +3.8s` / `loops` for clips with those. A `cold_open` or `loop` is dropped with a
`WARNING:` when its setting is off, or when it doesn't fit (a cold open outside the clip,
in its first 3 s, or not 2-6 s long; no sentence end followed by a pause near the end).
Every clip also gets `clips/<name>.srt` (same timing as the burned captions, cuts included)
for the platforms' own caption upload. Changing `--aspect` or `--no-burn` re-renders the
clips; the cache knows about both.
In face mode the log shows who was framed, e.g. `face tracked in 96% of frames, 2 faces framed,
3 speaker switches, two-shot 12s`: the camera follows whoever is talking and stacks both
faces during rapid back-and-forth (`face.two_speaker: off` turns that off). If the user
says the camera follows the wrong person, check `speakers:` (see docs/GUIDE.md) or suggest
`face: {detector: haar}` for the simple biggest-face framing.
### Step 3b: check the finished clips
Render ends with a **self-check** (`qa.json`; skipped with `--no-qa`): black or frozen
picture, long silence, loudness, sound/picture length, captions (first one late, more than
2 lines, out of sync, missing after a cold open), the face cut off by the crop, banned words
and the campaign's `required_terms`. Problems print under `Self-check (qa.json):` as
`Clip 3 (...): <problem>. Try: <fix>.` For each one: fix it (move the start/end in
moments.json, change `--reframe`) and render again, or tell the user why it's fine.
`CLI qa "<folder>"` re-checks without rendering.
Then look at the clips yourself: `CLI frames "<folder>" --clip clips/01_x.mp4` (repeat
`--clip` for each), open each `frames/clip_*.jpg` with the Read tool, and check the framing
(faces in frame, nothing important cropped), the captions (readable, not covering faces)
and the headline. Fix and re-render what looks wrong before reporting.
### Split mode (gaming / streams with a facecam)
The facecam and gameplay boxes are `[left, top, width, height]` as fractions of the frame.
If the user doesn't know them: run `CLI frame "<folder>" --at <time>`, then open the saved
`frame_grid.jpg` with the Read tool, look at where the facecam is, and read the fractions
off the grid (lines every 0.05). Pass `--facecam-box 0.72,0.03,0.26,0.28`. Suggest saving
it in `./clipper.yaml` under `split:` for next time.
## Step 4: report
Keep it short:
- clip count and the folder path (`clips-output/<name>/clips/`)
- one line per clip: `01. Title (0:45) - why it's good`
- any warnings that matter (fallbacks to blur, dropped clips, banned words) and any
self-check problems you left unfixed, with the reason
- if `--no-burn` was used: the captions are in the `.srt` next to each clip, to upload as
the platform's own captions
- "Open `review.html` (double-click it) to watch every clip and copy the captions before
posting. `post_queue.csv` has a suggested schedule for a scheduler like Postiz or Buffer."
- one line: post each clip manually, follow the campaign brief, and don't post the same file
to several accounts.
- one line: "To fix a clip yourself (move start/end, approve/reject, edit captions) and
re-render it, ask me to open the review editor."
### Review editor (when the user wants to tweak clips)
When the user asks to adjust, trim, approve/reject or re-caption clips themselves, start
`CLI review "<folder>"` **in the background** (it is a small server that keeps running), wait
for the `REVIEW_URL:` line in its output and give the user that link (it opens the browser by
itself; add `--no-open` if they only want the link). It only listens on 127.0.0.1. Their edits
land in `moments.json` (old version: `moments.prev.json`) and `edits.jsonl`, and the page's
*Re-render changed clips* button re-renders with the same settings as the last render. Stop
the background process when they say they're done. A moment with `"keep_times": true` (set by
the editor) is rendered with exactly the times written, without snapping; remove that key if
you change its times by hand and want them snapped again.
## Analytics (which clips performed)
Only when the user has exported analytics and asks what performed. They export the file
themselves; never log in, scrape, open the platforms, or drive a browser.
1. `CLI analytics import "<export file>" [--platform tiktok|youtube|instagram] [--root "<clips folder>"]`
(CSV, XLSX, YouTube's .zip, or TikTok's data-download JSON; default root `./clips-output`).
2. Unmatched rows are printed with an ID and "maybe" candidates. If one candidate clearly fits
(same caption, posted after the clip was made), confirm with the user, then
`CLI analytics link <row-id> "<folder>/clips/<file>.mp4"`.
3. `CLI analytics report`, then sum it up in a few lines: best and worst clips per platform and
the clearest correlations. If it says "not enough data", say so; don't draw conclusions.
If a column isn't recognised, the error lists the file's columns: suggest an
`analytics.columns` mapping in `./clipper.yaml` (see config.default.yaml).
## Campaigns
If the user wants to save a campaign brief (required mentions, hashtags, banned words),
read `${CLAUDE_PLUGIN_ROOT}/commands/campaign.md` and follow it.
## Standalone (no Claude)
Users can also run `CLI run "<source>" --clips 5 --ai heuristic` (or `--ai groq|gemini|openai`
with an API key in `GROQ_API_KEY` / `GEMINI_API_KEY` / `OPENAI_API_KEY`). The LLM modes
follow the same three phases as Step 2 (`--selection oneshot` for the older single request
per transcript part) and save every score and critic note in `judged.json`. Mention this only
if asked.
## Benchmark (developers only)
Only when the user is working in a Clipsmith checkout and asks to measure or compare moment
selection: `CLI bench --ai heuristic` (or `groq|gemini|openai`) scores selection against the
hand-picked moments in `bench/cases/`. To score your own picks: run `CLI bench --ai file
--moments-dir "<dir>"` once (it prepares each case into `bench/.work/<case>/` and says which
moment files are missing), read each case with `CLI transcript "bench/.work/<case>"`, pick
moments exactly as in Step 2, write them to `<dir>/<case>.json`, then run the same command
again. Add `--compare "<old results-*.json>"` to show changes against an earlier run. These are
the only commands that write inside the plugin folder (into its gitignored `bench/.work/`).