Communitygithub.com

long-form-clip-finder

Find the best 30 to 90 second moments in one finished long-form video (solo talking head, strategy session or two-person conversation), rank them with exact timestamps, then render them as finished 9:16 trial reels with the 16:9 picture in a band on black, a two-line hook above it, word captions and a comment CTA. Runs on ffmpeg, whisper-cli and Pillow with no paid service. Trigger on "find the clips", "best clips from this video", "which moments should we clip", "timestamps for shorts", "cut this into trial reels", or /long-form-clip-finder. Also when the owner gives rough or remembered timestamps that need matching to the real file. Not for full-frame podcast clips with speaker switching and not for scripting.

What is long-form-clip-finder?

long-form-clip-finder is a Claude Code agent skill that find the best 30 to 90 second moments in one finished long-form video (solo talking head, strategy session or two-person conversation), rank them with exact timestamps, then render them as finished 9:16 trial reels with the 16:9 picture in a band on black, a two-line hook above it, word captions and a comment CTA. Runs on ffmpeg, whisper-cli and Pillow with no paid service. Trigger on "find the clips", "best clips from this video", "which moments should we clip", "timestamps for shorts", "cut this into trial reels", or /long-form-clip-finder. Also when the owner gives rough or remembered timestamps that need matching to the real file. Not for full-frame podcast clips with speaker switching and not for scripting.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/orgrowth/long-form-clip-finder/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Long-form clip finder

Purpose

Picks 5 to 10 clips from ONE long-form video, ranked, each with exact source timestamps, the first and last words spoken, an on-screen hook written to the audience and any flags, then renders them as finished trial reels. A clip here is a complete argument with a payoff, not a highlight.

Inputs

  • The final export of the video as a local file. Never raw footage, an older version, or a subtitle file made for another cut; versions drift by minutes.
  • Who the clips are for: the audience and what they struggle with, in one or two lines from the owner. This is the filter every pick is ranked against.
  • The numbers the owner is happy to cite (results, follower counts, revenue), from the owner. Any other spoken number is flagged, never sold on.
  • Optional notes in the workspace: if a brand/ or 00-brand/ folder exists with audience, offer, proof or voice notes, read them and use them instead of asking. Otherwise ask the questions above one at a time before choosing.
  • How many clips (default 5, 10 when asked for the best 10).
  • reference: one or more reels, or clip references: a folder of the owner's best clips (lines in the prompt). Optional. Download a link, read a contact sheet of it, and hold the text hooks and pacing to that standard.
  • Any remembered moments, as the owner's own words. These always make the list.
  • The comment keyword for the CTA and what it sends ("comment CLIPS for the skill"), from the owner. Never invented.

Preflight

  1. The audience line and the comment keyword are known (from the prompt, the notes above, or a question). Never guess either.
  2. ffmpeg, ffprobe, whisper-cli and python3 are on PATH, and Pillow imports (python3 -c "import PIL", otherwise pip3 install pillow).
  3. A whisper model is reachable: WHISPER_MODEL in .env, or ~/.cache/whisper-cpp/ggml-small.en.bin. If neither exists, give the owner the one-time download: mkdir -p ~/.cache/whisper-cpp && curl -L -o ~/.cache/whisper-cpp/ggml-small.en.bin https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.en.bin.
  4. Pick the folder clips/YYYY-MM-DD-<slug>/ and confirm it is empty or may be added to. Work files go in clips/YYYY-MM-DD-<slug>/build-kit/.

Steps

1. Transcribe the exact file being clipped

ffmpeg -i <video> -vn -ac 1 -ar 16000 build-kit/audio.wav
whisper-cli -m <model> -t 8 -f build-kit/audio.wav -osrt -ojf -of build-kit/transcript
python3 ~/.claude/skills/long-form-clip-finder/scripts/words.py build-kit/transcript.json > build-kit/words.tsv

Read the WHOLE transcript before choosing. Skimming finds stat lines and misses argument blocks.

Remembered timestamps are approximate and remembered quotes are paraphrased, often by minutes. Locate every hint with python3 ~/.claude/skills/long-form-clip-finder/scripts/find.py words.tsv "<their words>", never by seeking to the time. Use python3 ~/.claude/skills/long-form-clip-finder/scripts/window.py words.tsv MM:SS MM:SS to read a stretch with its pause marks before setting cut points.

2. Load the filter

Hold the audience line and the citable numbers from Inputs. A clip may not be ranked on a number the owner has not cleared: trim around it or carry it as a flag. Flag profanity too (captions censor it).

3. What a clip is

A complete argument that needs zero prior context, from its own opening line to its payoff. Sweep the transcript for every "the problem with", "the solution is", "the rule", every first-person failure, every spoken number and every named person before ranking.

ShapeOpens onCloses on
Problem to solution"The problem with how most owners..."the principle, BEFORE the tool list or how-to
Aphorism to proofa quotable rulethe proof number or the "this is not luck" line
Rule to receipt"the rule going forward is..."the result number
Failure story to lessonfirst person ("I gave up on...")the lesson plus proof it worked
Big number, question, bigger numberthe stat that stops the scrollthe answer that tops it
Contrast receiptthe small numberthe big one from the same thing, and the lesson
Name dropa known person in the niche engaging with the workwhat they said, and the respect or agreement line
Mechanism explainerthe term ("what's an end card?")how it works, ending on the thesis line
Thesis linethe sentence that states the video's core ideaits proof or its why

Moments that only make sense while pointing at the screen ("this one here", "if I scroll down") are weak in 9:16 unless the line itself carries the number.

Solo versus conversation. A solo teaching video gives problem to solution blocks. A conversation or strategy session gives receipts (contrast numbers, big numbers, named people) and mechanism explainers over the diagnosis talk; four clips that all make the same point are one clip.

Coverage. Clips trailer the long form: every clip is a door back into it. Map the video's beats first (result, data, method, social proof, mechanism, thesis), then pick at most two clips per beat, spread across the whole runtime. Two beats get missed and belong in every set: the name drop, and the thesis line that names the video's title concept, even a short one.

4. Boundaries

  • IN on a line that stands alone: not "So", "And", "This is why", and no back-pointing pronoun unless the hook supplies who.
  • OUT on the payoff's last word, before the next signpost: a section label, "Here's the part...", a host's new question, or a mid-roll CTA. Mid-roll and end CTAs are never inside a clip.
  • Length 30 to 90 seconds. Solo picks run 39 to 66 (median 56); conversation clips earn 60 to 90. Never pad; never ship a fragment whose arc needs more.
  • Write picks as phrases, not times: picks.json with ranges: [["first words", "last words"], ...], then python3 ~/.claude/skills/long-form-clip-finder/scripts/plan.py picks.json words.tsv > clip-plan.json. It sets IN just before the first word and OUT 0.25s after the last, never past the next word's start.
  • No cuts inside a range. python3 ~/.claude/skills/long-form-clip-finder/scripts/tighten.py clip-plan.json audio.wav > clip-plan.tight.json only snaps each range's head and tail to real speech edges; the range then plays straight through. Chopping pauses gives 8 to 14 jump cuts a clip and any music under the cut lurches at each one. Trim by choosing a tighter range. --compress exists for a dry source when the owner asks for pauses cut.
  • Whisper word times drift 0.1 to 0.5s. QC the tight plan: copy segments into ranges in a scratch plan, run python3 ~/.claude/skills/long-form-clip-finder/scripts/qc_audio.py qc-plan.json audio.wav qc, and read every head and tail. A stray "yeah", the next line's first word or a half word means move the cut: python3 ~/.claude/skills/long-form-clip-finder/scripts/env.py audio.wav <time> prints the loudness in 20ms steps; put the cut in the trough and record it in overrides.json ({"7": {"tail": 609.26}}). Trust the energy over the transcript.

5. Gluing

Default is one continuous range per clip. If the source has music under the voice, never glue: the music jumps at the join, so choose a single range that starts after the line you would have cut. Glue only on a dry source when the best version of a moment has fluff in the middle: ranges in source order, within about 2 minutes of each other, on one thread, both sides of every join on sentence boundaries. Write it out as Range A, CUT, Range B.

6. Hooks (on-screen text, first 3 seconds)

Written to the audience's pain, second person, under about 10 words, sentence case with a full stop, set as two balanced lines above the band. Patterns:

  • "Stop ."
  • "Why your ."
  • "How to get from every ."
  • "If you aren't doing this, ."
  • "? ."
  • "Your should ."
  • "Your isn't . It's ."
  • "Steal this for every ." when the clip hands over a script or a question set.

The hook says what the clip pays off in the viewer's words, never the speaker's catchphrase. Never a topic label, never a bare stat dump.

7. Rank

Score 1 to 5 on audience pain fit, standalone clarity, payoff strength (a concrete number or a named person beats an opinion), hook-ability and 9:16 fit (face-carried, not screen-carried). Sum; ties go to audience fit. Apply the coverage cap, then cut to the final list. The owner's remembered moments are always in the set.

8. Present the list, then save

Per clip, in this order: rank and title; on-screen hook; Range A (and B, CUT) as MM:SS.s to MM:SS.s; first words; last words; duration; the audience pain it hits; flags. Show this in chat for approval before rendering anything, then save clip-picks.md and clip-plan.json in build-kit/.

One number per clip, everywhere. The rank in the list is the clip's number in clip-plan.json and in every rendered file name.

9. Render

  1. Look at the source first. ffmpeg -skip_frame nokey -i SRC -vf "fps=1/30,scale=384:-1,tile=6x4" -frames:v 1 build-kit/sheet.png, then read the sheet. If the cut burns in its own captions or text cards at the bottom of the frame, render with --caps below (captions at y 1318 under the band, CTA at y 1418). Only a clean source gets --caps band (y 1190 and 1322). Captions on top of burned captions is the first thing a viewer sees.
  2. The CTA keyword comes from the record. No keyword: render with no --cta and ask.
  3. For each rank: python3 ~/.claude/skills/long-form-clip-finder/scripts/render.py build-kit/clip-plan.tight.json N --src "<exact file>" --out clips/YYYY-MM-DD-<slug> --cta "comment “KEYWORD” for <the payoff>" --caps below --fixes build-kit/fixes.json. It cuts segments with one seek, joins ranges with 30ms audio fades, re-transcribes the cut audio for caption timing, fixes names and numbers (per-video spellings in fixes.json, a list of ["regex", "replacement"]), drops whisper's invented head and tail conjunctions, and masters to -12 LUFS. About 25 seconds per clip off a 4K source.

Output

  • clips/YYYY-MM-DD-<slug>/NN-<clip-slug>.mp4: the file name STARTS with the two-digit rank and stays short, so the number stays visible in a narrow folder column.
  • clips/YYYY-MM-DD-<slug>/build-kit/: audio.wav, words.tsv, picks.json, clip-plan*.json, overrides.json, clip-picks.md, one work folder per clip.
  • clips/YYYY-MM-DD-<slug>/archived/: never delete or overwrite an old render. render.py moves the previous NN-<slug>.mp4 to archived/NN-<slug>-vK.mp4 once the new one succeeds; do the same by hand for a dropped pick or a renumber. Tell the owner which files moved.
  • A rendered clip that is not in the current list gets extra-a-<slug>.mp4, never a number the list already uses.
  • End with a message for a human editor in one fenced code block, ready to paste: one line naming the exact source file, then one line per clip in rank order with a blank line between clips, timestamps and starting words only: 1. 5:22.6 to 5:51.1, then 7:02.6 to 7:47.3. Starts "Fast forward to July 28th".

QA checklist

  • A 4-frame contact sheet of every final: hook, band, caption and CTA all legible, no caption sitting on burned text.
  • Head and tail of every clip re-transcribed and read; none ends on a half word or a stray next word.
  • Every glued join listened to for a music jump.
  • ffprobe on every final: 1080x1920, audio stream present, duration matches the plan.
  • No clip ranked on a number the owner has not cleared; every other number flagged.
  • Rank in the file name, the list and the plan all match.

Troubleshooting

  • Captions name the wrong word: add it to fixes.json, then re-render with REUSE=1 to keep the cut.
  • A head starts with "So" or "And" that is not in the audio: whisper invents these on a hard cut. Check env.py; if there is no syllable, the head is clean and the renderer drops the word.
  • Fonts look different: every text element is SF Pro Display (Medium for the hook and CTA, Bold for captions), from an installed copy or the macOS system font, never a website font. Off a Mac it falls back to Helvetica Neue, Arial or DejaVu Sans; install SF Pro from Apple's fonts page (developer.apple.com/fonts) or set CLIP_FONT to a .ttf the owner names.
  • Clips feel choppy: a range was glued, or --compress was used. Pick a tighter single range.
  • Portrait or square source: the band expects 16:9. Reframe a source that is not widescreen to 16:9 first, or clip it with a full-frame tool instead.

Related Skills