---
name: edit
description: Use when you say edit my video, cut the pauses or add captions in my style; it sets up an AI editing folder and renders the MP4 after you approve a storyboard.
---
# edit: Claude edits your video (one folder, free tools)
Promise to keep: every tool is free, everything happens in one folder, the user sees a storyboard before anything
renders, and nothing needs an editor or After Effects. `<skill>` below = this skill's folder.
What this does: cut the pauses (dead air), write captions in the learned style, render a 9:16 (or the footage's own
shape) MP4. What it does not do on its own: b-roll, music or graphics. Offer those as an extra pass with the HyperFrames
skills (`npx skills add heygen-com/hyperframes`) once the base edit is approved, and never claim them otherwise.
## 1. Setup (once): the folder and the tools
Ask where the editor folder should live (default `~/video-editor`), then:
```
mkdir -p ~/video-editor/{footage,references,exports,work}
bash <skill>/scripts/doctor.sh # checks FFmpeg, yt-dlp, Node 22+, HyperFrames (Whisper comes with it)
bash <skill>/scripts/doctor.sh --install # only after the user says OK: installs what's missing (Homebrew/apt)
```
- `footage/` raw clips the user drops in. `references/` 2-5 reels they love. `exports/` finished videos.
`work/` is yours (cuts, transcripts, storyboards, the HyperFrames project); never edit the footage itself.
- Whisper runs locally through `npx hyperframes transcribe --engine whisper` (whisper.cpp; it downloads the model
on first use). No API keys, no accounts, nothing paid.
- Tell the user the folder is ready and what goes where.
## 2. Learn the style (once, or when they add references)
References can be files in `references/` or links. Download links with yt-dlp, for the user's own study only:
```
yt-dlp -o "references/%(uploader)s-%(id)s.%(ext)s" "<url>" # add --cookies-from-browser chrome if Instagram asks for login
python3 -I <skill>/scripts/measure_ref.py references/<file> --out work/refs/<name>
```
For each reference: read `ref.json` (pace: words per second, longest pause, shot length, cuts per 10 s, loudness) and
LOOK at `sheet.png` / `frames/` (caption font, size, case, colours, position, words per caption, zooms, b-roll).
Then write `style.md` and `style.json` in the editor folder from `references/style-sheet.md`. Every line comes from
something measured or seen; where references disagree, say so and ask which one to follow. Show the user `style.md` in
a few lines ("your style: ...") and save their corrections into it. Rules they give later ("never outlined captions")
go into its Never list and are followed every time.
No references yet? Use the defaults in `style-sheet.md` and say so.
## 3. "edit my video"
Pick the newest file in `footage/` (or the one they name). `<name>` = its file name without extension.
```
python3 -I <skill>/scripts/cut_pauses.py footage/<file> --out work/<name> --style style.json
npx -y hyperframes transcribe work/<name>/cut.mp4 --engine whisper --model small.en -d work/<name>/tx
mv work/<name>/tx/transcript.json work/<name>/transcript.json
python3 -I <skill>/scripts/storyboard.py work/<name> --style style.json --title "<name>"
```
- `cut_pauses.py` removes every pause longer than the style's `max_pause` (silence found by FFmpeg, speech padded so
no word is clipped) and renders `cut.mp4`. Noisy room and nothing gets cut? rerun with `--noise -30`.
- The transcript is made from `cut.mp4`, so caption times match the cut exactly. Non-English: drop `.en` from the model
and add `--language <code>`.
- Read the transcript once against the audio's meaning: fix obvious Whisper misspellings of names/brands in
`transcript.json` (text only, keep the times) before the storyboard.
## 4. Storyboard first (STOP here)
Show the storyboard and wait. Do not render until the user approves.
- Give them the path to `work/<name>/storyboard.html` (open it with `open` on macOS) and paste `storyboard.md`'s
summary: seconds of footage -> seconds after cutting, pauses cut, number of caption cards, filler words found.
- Look at `storyboard.png` yourself (raw frames per card: framing, nothing odd at the cuts) and check the caption
cards in `storyboard.md`: wording right, nothing cut mid-word. The captions are drawn over the frames in `storyboard.html`.
- Ask: "Anything to fix? (a caption, a cut, the style) Or say 'render it'."
Fixes, then a fresh storyboard:
- Caption text (a misheard name, "Comment EDIT" casing): fix the word's `text` in `work/<name>/transcript.json`
(keep its times), then rerun `storyboard.py`, which rebuilds `captions.json` from the transcript. Don't hand-edit
`captions.json`: the next storyboard run overwrites it.
- Cut filler words ("um" listed in the storyboard) or a fluffed line: rerun the cutter on the cut with drops,
`cut_pauses.py work/<name>/cut.mp4 --out work/<name>-v2 --max-pause 99 --drop 5.88-6.06`, then steps 3-4 on `work/<name>-v2`.
- Style (size, colour, position, words per card): edit `style.json`, rerun `storyboard.py`.
## 5. Render (after "render it" / an explicit OK)
```
python3 -I <skill>/scripts/build_comp.py work/<name> --style style.json
cd work/<name>/hf && npx -y hyperframes lint && npx -y hyperframes render -o ../../../exports/<name>.mp4
```
(`exports/` is relative to the editor folder; adjust the `../` if the work folder differs.) If `style.json` has
`audio.target_lufs`, match it (video untouched):
`ffmpeg -i exports/<name>.mp4 -c:v copy -af loudnorm=I=<target>:TP=-1.5:LRA=11 -ar 48000 -c:a aac -b:a 192k exports/<name>.loud.mp4`
then `mv exports/<name>.loud.mp4 exports/<name>.mp4`. Then check the result
before saying it's done: `ffprobe` duration matches the cut, there is an audio stream, loudness is near the target
(`ffmpeg -i exports/<name>.mp4 -af ebur128 -f null -`), and grab 3 frames
(`ffmpeg -ss <t> -i exports/<name>.mp4 -frames:v 1 work/<name>/check-<t>.png`) and look at them: captions present, in
the style, inside the frame. Report: the export path, length before -> after, and what was cut.
Extra pass, only if asked: b-roll, zooms, music, sound effects or graphics go into `work/<name>/hf/index.html` with the
HyperFrames skills; re-lint and re-render.
## Rules
- Never overwrite or delete footage. Never render before the storyboard is approved.
- Everything stays local and free. No paid APIs, no uploads.
- Reference reels are for learning the style; don't republish them or copy their content.
- Say what you could not do (e.g. Whisper misheard a word you couldn't verify, music not added) instead of hiding it.