--- name: ghost-editor description: AI video editor for talking-head reels. Turns a raw phone recording of someone talking to camera (retakes, pauses, false starts) into a finished vertical 1080x1920 reel for Instagram, TikTok or Shorts: best take of each sentence, pause trimming, word-timed captions that never cover the face and stay inside the platform safe area, motion scenes on the spoken word, sound effects and music mixed against the voice, in seven styles (clean, editorial, meme, cinematic, launch, kinetic, pop). It can also reverse-engineer a reference edit the user likes and apply that style to their recording. Use when the user hands over a talking-head video and says "edit this", "make a reel", "make it look like this video", "add captions/motion graphics/sound effects", "pick the best takes", "remove the pauses", or asks for a re-cut. Not for landscape screen recordings. --- # ghost-editor One recording in, one reel out. The creative work is choosing takes and planning beats. The scripts do everything else the same way every time: cut math, zoom tweens, captions, SFX levels, asset copying, QA. Nothing on screen says anything the speaker did not say. A meme is a reaction, so it lands ON or just AFTER the punchline, never before it. Skill dir: `~/.claude/skills/ghost-editor` (below: `$S`). A reel project is any directory (`$P`); `build.mjs` copies what it needs into `$P/assets` so the project renders on its own. ## Pipeline ``` prep.sh -> $P/assets/talk.mp4 1080x1920 30 fps, voice at -16 LUFS transcribe.py -> $P/build/words.whisper.json + take table (all takes) face_track.py -> $P/build/face.json (captions and cards never cover the face) choose takes -> $P/reel.json takes (references/take-selection.md) plan beats -> $P/reel.json beats/zoom (references/reel-json.md) build.mjs -> $P/index.html + SFX table + rule warnings lint + snapshot, look at the frames render -> $P/build/reel.mp4 qa.py -> levels, SFX-vs-voice on a stem, silences, contact sheet deliver -> ~/Desktop/-reel.mp4 ``` ### 0. Check the toolchain once per session `bash $S/scripts/doctor.sh`: tools, GEMINI_API_KEY and the media library, each with its fix. On a fresh machine run `python3 $S/scripts/library_restore.py` first (SFX, memes and music aren't in git). Say what is missing; don't improvise around it. ### 1. Prep and look ```bash bash $S/scripts/prep.sh $P ffmpeg -v error -i $P/assets/talk.mp4 -vf "fps=1/10,scale=216:384,tile=6x3" -frames:v 1 -update 1 $P/build/sheet.jpg ``` Look at the sheet. Check that it is the right person (show the frames and confirm with the user when there is any doubt). Note where the face sits (the zoom origin, default `50% 29%`), where the chin is (the card band starts at y 990), and how bright the wall is. ### 2. Transcribe everything ```bash python3 $S/scripts/transcribe.py $P/assets/talk.mp4 --out $P/build/words.whisper.json --lang en ``` The table is the take map in original seconds; `*` marks restart phrases ("okay, again"). Fix mangled names later in `captions.fixes`. ### 2b. Track the face ```bash python3 $S/scripts/face_track.py $P/assets/talk.mp4 --out $P/build/face.json ``` Always. The build places captions, cards and reactions around the face, inside the platform's safe area. ### 3. Choose takes (`references/take-selection.md`) Ask for the script if there is one. Pick the take of each sentence that is fluent and later, keep one-breath runs as one take, and cut on WORD times: `a` = first word - 0.10..0.15, `b` = last word + 0.20..0.30. When a meme will follow a line, end that take 0.6 to 1 s after the last word so the meme sound has air. Aim for 45 to 75 s. ### 3b. A single clean take? If the recording is already one good take, don't pick takes by hand: `python3 $S/scripts/autocut.py $P/assets/talk.mp4 --noise -30` prints `takes` with the pauses removed. ### 4. Pick a style, plan beats (`references/styles.md`, `references/reel-json.md`) Seven presets: `clean`, `editorial`, `meme`, `cinematic`, `launch`, `kinetic`, `pop`. Ask the user which one (show `examples/gallery/` or the showcase video) or pick by the speaker's energy. Start from `examples/gallery/