Video Highlights Clipper
Take a video file, transcribe it (if not already transcribed), score and rank segments to identify the most compelling highlights, and export them as individual clip files using ffmpeg.
PREREQUISITES
This skill requires:
- ffmpeg — for audio extraction and video clipping (
brew install ffmpeg on macOS, sudo apt install ffmpeg on Linux)
- Python 3 + openai-whisper — for transcription (
pip install openai-whisper)
WORKFLOW
Step 1: Locate the Video and Transcript
- Confirm the video file path from the user's argument or conversation.
- Check if a transcript already exists alongside the video (e.g.,
Name_transcript.txt or Name_transcript.json in the same directory).
- If no transcript exists, generate one:
- Extract audio:
ffmpeg -i <video> -ar 16000 -ac 1 -vn <audio.wav>
- Transcribe using Whisper:
import whisper, json
model = whisper.load_model("base")
result = model.transcribe("<audio.wav>", word_timestamps=True, language="en")
- Save both
.txt (with timestamps) and .json (with segment data) transcripts in the same directory as the video.
Step 2: Read and Analyze the Full Transcript
Read the entire transcript — if it's large, read in chunks but track candidates across the full duration. Do NOT bias toward the beginning or end.
For each potential highlight segment, group consecutive transcript lines into coherent "moments" — a moment is a self-contained thought, story, or argument (typically 3-20 consecutive transcript lines).
Step 3: Score Each Candidate Moment
Rate every candidate moment on these 6 dimensions (each 1-5):
| Dimension |
1 (Low) |
5 (High) |
| Quotability |
Generic statement |
Punchy, memorable one-liner that stands alone |
| Insight Density |
Common knowledge, filler |
Novel framework, mental model, or unique perspective |
| Emotional Intensity |
Flat, neutral delivery |
Passion, humor, vulnerability, or strong conviction |
| Story Arc |
No narrative structure |
Complete anecdote with setup, tension, and payoff |
| Actionability |
Abstract theory |
Specific tactic the audience can use immediately |
| Hook Strength |
Needs context to understand |
Grabs attention in the first 3 seconds, works out of context |
Composite Score = sum of all 6 dimensions (max 30).
Scoring rules:
- A moment does NOT need to score high on every dimension. A 5 in Quotability + 1s elsewhere (total 10) can still be a great clip if it's a killer one-liner.
- Weight Hook Strength and Quotability slightly higher for short-form platforms (Reels, TikTok, Shorts).
- Weight Insight Density and Story Arc higher for long-form platforms (YouTube, LinkedIn).
- Moments that score 3+ on at least 3 dimensions AND have a composite score >= 15 are strong candidates.
Step 4: Rank and Select Top Highlights
- Rank all candidates by composite score (descending).
- Select the top 5-10 (or as many as the user requests).
- Apply diversity filter: avoid selecting multiple clips from the same 2-minute window. Spread selections across the full video timeline.
- Apply clip length targets:
- Default: 15-90 seconds per clip
- Reels / TikTok / Shorts: 15-60 seconds
- LinkedIn: 30-90 seconds
- YouTube: 1-5 minutes
- Determine precise start and end timestamps — begin at the start of the first sentence of the moment, end at the natural conclusion. Add 2-3 seconds of padding on each side.
Step 5: Present Highlights to User for Approval
For each selected clip, present:
## Clip N: "<Title>" (Score: XX/30)
- Timestamps: [HH:MM:SS -> HH:MM:SS] (~XXs)
- Scores: Q:X | I:X | E:X | S:X | A:X | H:X
- Why: <1-line reason this is a highlight>
- Transcript:
> "<exact transcript text>"
Also present:
- Timeline distribution — a simple visual showing where clips fall across the video duration, to confirm good spread
- Honorable mentions — 2-3 moments that scored well but didn't make the cut, in case the user wants to swap
Wait for user confirmation before cutting. The user may:
- Approve all
- Remove specific clips
- Add honorable mentions
- Adjust timestamps
- Request different clip lengths
Step 6: Cut the Clips
Once confirmed, use ffmpeg to cut each clip:
ffmpeg -i <video> -ss <start_time> -to <end_time> -c:v libx264 -c:a aac -avoid_negative_ts make_zero -y <output_clip>
Output structure: Save clips in a clips/ subfolder next to the video:
<video_directory>/clips/<VideoName>_clip01_<title_slug>.mp4
<video_directory>/clips/<VideoName>_clip02_<title_slug>.mp4
- Use re-encoding (
-c:v libx264 -c:a aac) for precise, frame-accurate cuts.
- Sanitize title slugs: lowercase, underscores, no special characters, max 40 chars.
Step 7: Generate Clips Manifest
After cutting, create a clips_manifest.md file in the clips/ folder:
# Video Highlights — <VideoName>
Source: <original video path>
Date: <today's date>
Total clips: N
| # | File | Title | Time | Duration | Score | Best Dimension |
|---|------|-------|------|----------|-------|----------------|
| 1 | clip01_xxx.mp4 | "Title" | 02:03-02:14 | 11s | 24/30 | Quotability |
| ... |
Step 8: Report Results
Report to the user:
- Total clips created with file paths
- Duration of each clip
- Combined highlight reel duration
- Any issues encountered (e.g., audio sync, encoding warnings)
RULES
- Never invent or fabricate transcript content. Only use what is actually in the transcript.
- If the video is very long (60+ min), read the transcript in chunks but track all candidates — do not discard earlier candidates when reading later chunks.
- If the user asks for a specific number of clips or total duration, adjust the selection threshold accordingly.
- Always confirm clip selections with the user before cutting — never auto-cut without approval.
- If a highlight moment crosses a natural pause or topic change, prefer trimming to the tighter version rather than including filler.
- Prefer clips that start strong — the first 3 seconds of each clip should be immediately engaging (no "um", "so", throat-clearing).
- If two adjacent highlights are within 10 seconds of each other, consider merging them into one longer clip rather than creating two clips with overlapping padding.
1---2name: video-highlights3description: Analyze a video file, identify the best highlight moments from its transcript, score them on multiple dimensions, and clip them into separate video files using ffmpeg. Use when the user shares a video and wants highlights, clips, best moments, key quotes, or short-form cuts extracted.4---56# Video Highlights Clipper78Take a video file, transcribe it (if not already transcribed), score and rank segments to identify the most compelling highlights, and export them as individual clip files using ffmpeg.910## PREREQUISITES1112This skill requires:13- **ffmpeg** — for audio extraction and video clipping (`brew install ffmpeg` on macOS, `sudo apt install ffmpeg` on Linux)14- **Python 3 + openai-whisper** — for transcription (`pip install openai-whisper`)1516## WORKFLOW1718### Step 1: Locate the Video and Transcript19201. Confirm the video file path from the user's argument or conversation.212. Check if a transcript already exists alongside the video (e.g., `Name_transcript.txt` or `Name_transcript.json` in the same directory).223. If **no transcript exists**, generate one:23 - Extract audio: `ffmpeg -i <video> -ar 16000 -ac 1 -vn <audio.wav>`24 - Transcribe using Whisper:25 ```python26 import whisper, json27 model = whisper.load_model("base")28 result = model.transcribe("<audio.wav>", word_timestamps=True, language="en")29 ```30 - Save both `.txt` (with timestamps) and `.json` (with segment data) transcripts in the same directory as the video.3132### Step 2: Read and Analyze the Full Transcript3334Read the **entire** transcript — if it's large, read in chunks but track candidates across the full duration. Do NOT bias toward the beginning or end.3536For each potential highlight segment, group consecutive transcript lines into coherent "moments" — a moment is a self-contained thought, story, or argument (typically 3-20 consecutive transcript lines).3738### Step 3: Score Each Candidate Moment3940Rate every candidate moment on these **6 dimensions** (each 1-5):4142| Dimension | 1 (Low) | 5 (High) |43|-----------|---------|----------|44| **Quotability** | Generic statement | Punchy, memorable one-liner that stands alone |45| **Insight Density** | Common knowledge, filler | Novel framework, mental model, or unique perspective |46| **Emotional Intensity** | Flat, neutral delivery | Passion, humor, vulnerability, or strong conviction |47| **Story Arc** | No narrative structure | Complete anecdote with setup, tension, and payoff |48| **Actionability** | Abstract theory | Specific tactic the audience can use immediately |49| **Hook Strength** | Needs context to understand | Grabs attention in the first 3 seconds, works out of context |5051**Composite Score** = sum of all 6 dimensions (max 30).5253**Scoring rules:**54- A moment does NOT need to score high on every dimension. A 5 in Quotability + 1s elsewhere (total 10) can still be a great clip if it's a killer one-liner.55- Weight **Hook Strength** and **Quotability** slightly higher for short-form platforms (Reels, TikTok, Shorts).56- Weight **Insight Density** and **Story Arc** higher for long-form platforms (YouTube, LinkedIn).57- Moments that score 3+ on at least 3 dimensions AND have a composite score >= 15 are strong candidates.5859### Step 4: Rank and Select Top Highlights60611. Rank all candidates by composite score (descending).622. Select the **top 5-10** (or as many as the user requests).633. Apply **diversity filter**: avoid selecting multiple clips from the same 2-minute window. Spread selections across the full video timeline.644. Apply **clip length targets**:65 - Default: 15-90 seconds per clip66 - **Reels / TikTok / Shorts**: 15-60 seconds67 - **LinkedIn**: 30-90 seconds68 - **YouTube**: 1-5 minutes695. Determine precise **start and end timestamps** — begin at the start of the first sentence of the moment, end at the natural conclusion. Add **2-3 seconds of padding** on each side.7071### Step 5: Present Highlights to User for Approval7273For each selected clip, present:7475```76## Clip N: "<Title>" (Score: XX/30)77- Timestamps: [HH:MM:SS -> HH:MM:SS] (~XXs)78- Scores: Q:X | I:X | E:X | S:X | A:X | H:X79- Why: <1-line reason this is a highlight>80- Transcript:81 > "<exact transcript text>"82```8384Also present:85- **Timeline distribution** — a simple visual showing where clips fall across the video duration, to confirm good spread86- **Honorable mentions** — 2-3 moments that scored well but didn't make the cut, in case the user wants to swap8788**Wait for user confirmation** before cutting. The user may:89- Approve all90- Remove specific clips91- Add honorable mentions92- Adjust timestamps93- Request different clip lengths9495### Step 6: Cut the Clips9697Once confirmed, use ffmpeg to cut each clip:9899```bash100ffmpeg -i <video> -ss <start_time> -to <end_time> -c:v libx264 -c:a aac -avoid_negative_ts make_zero -y <output_clip>101```102103**Output structure**: Save clips in a `clips/` subfolder next to the video:104```105<video_directory>/clips/<VideoName>_clip01_<title_slug>.mp4106<video_directory>/clips/<VideoName>_clip02_<title_slug>.mp4107```108109- Use re-encoding (`-c:v libx264 -c:a aac`) for precise, frame-accurate cuts.110- Sanitize title slugs: lowercase, underscores, no special characters, max 40 chars.111112### Step 7: Generate Clips Manifest113114After cutting, create a `clips_manifest.md` file in the `clips/` folder:115116```markdown117# Video Highlights — <VideoName>118Source: <original video path>119Date: <today's date>120Total clips: N121122| # | File | Title | Time | Duration | Score | Best Dimension |123|---|------|-------|------|----------|-------|----------------|124| 1 | clip01_xxx.mp4 | "Title" | 02:03-02:14 | 11s | 24/30 | Quotability |125| ... |126```127128### Step 8: Report Results129130Report to the user:131- Total clips created with file paths132- Duration of each clip133- Combined highlight reel duration134- Any issues encountered (e.g., audio sync, encoding warnings)135136## RULES137138- **Never invent or fabricate transcript content.** Only use what is actually in the transcript.139- If the video is very long (60+ min), read the transcript in chunks but **track all candidates** — do not discard earlier candidates when reading later chunks.140- If the user asks for a specific number of clips or total duration, adjust the selection threshold accordingly.141- Always confirm clip selections with the user before cutting — never auto-cut without approval.142- If a highlight moment crosses a natural pause or topic change, prefer trimming to the tighter version rather than including filler.143- Prefer clips that **start strong** — the first 3 seconds of each clip should be immediately engaging (no "um", "so", throat-clearing).144- If two adjacent highlights are within 10 seconds of each other, consider merging them into one longer clip rather than creating two clips with overlapping padding.