verify-bookends
Last-line defense before a short is committed to fit-vertical. Checks
three things in one Claude call:
- Cleanliness — partial words, breath cutoffs, co-speaker
interjections, off-shot frames at either end.
- Opening-hook strength (VVSA gate) — the first ~3s is where a
scrolling stranger swipes away. If the opening is pure setup /
throat-clearing and a stronger hook line exists within the first 3s,
snap t0 inward to that line. Hook-weakness alone is never a drop —
only an inward-trim suggestion.
- Payoff landing — if the tail contains a clear payoff word
followed by trailing filler ("yeah", "so anyway") or silence, snap
t1 to ~80ms past the payoff word rather than the sentence boundary.
Dead air after the payoff costs retention.
Output remains a single keep/trim/drop decision — same I/O
contract, same caller logic in shorts.sh.
Invoke
.claude/skills/verify-bookends/verify-bookends.sh <input_clip> <input_trimmed_transcript> <out_decision_json> [VERIFY_BOOKENDS=0 to skip]
input_clip — post tighten-pace clip
input_trimmed_transcript — post tighten-pace re-timed transcript
out_decision_json — written JSON: {"action":"keep"}, {"action":"trim","t0":<sec>,"t1":<sec>,"reason":...}, or {"action":"drop","reason":...}
Env: VERIFY_BOOKENDS=0 makes the skill emit {"action":"keep","reason":"disabled"} without calling Claude.
How
- ffprobe the clip duration.
- Slice the trimmed transcript text into a head window (first 1.5s) and a tail window (last 1.5s).
- ffmpeg out a 3-frame strip from each end (start / mid / end of the 1.5s window).
- Send both strips + both transcript snippets to
claude -p (vision-enabled) with explicit inward-only rules.
- Validate the reply: enforce
0 <= t0, t1 <= dur, t0 >= 0, t1 > t0. If the proposed trim would remove more than 2.0s of clip duration, downgrade to {"action":"drop"}. If the proposed trim would shrink the short below 15s, downgrade to {"action":"keep","reason":"would shrink below 15s"}.
Caller contract
shorts.sh reads the JSON. If action=trim, it issues a second cut-clip + rebase against the trimmed transcript, then continues to fit-vertical. If action=drop, it continues the per-span loop and increments the skipped counter. If action=keep, no-op.
Idempotency
Keyed off (clip mtime, trimmed-transcript mtime). Cached decision written next to <out>.vbmeta.
1---2name: verify-bookends3description: Post-edit verification of a short's opening and closing 1.5s. Claude sees a 3-frame strip from each end plus the trimmed transcript text around each end and returns {action:keep}, {action:trim,t0,t1} (inward-only), or {action:drop,reason}. Checks three things — (1) cleanliness (partial words, breath cutoffs, off-shot frames); (2) opening-hook strength (snap t0 inward to a stronger hook line if the first 3s is pure setup); (3) payoff landing (snap t1 to ~80ms past the payoff word when the tail trails into filler). Runs after tighten-pace, before fit-vertical. Inward-only — bookend-trim's outward pass already had its chance. Drops the span only on cleanliness failures requiring >2s of trim — never on hook-weakness alone.4---56# verify-bookends78Last-line defense before a short is committed to fit-vertical. Checks9three things in one Claude call:10111. **Cleanliness** — partial words, breath cutoffs, co-speaker12 interjections, off-shot frames at either end.132. **Opening-hook strength (VVSA gate)** — the first ~3s is where a14 scrolling stranger swipes away. If the opening is pure setup /15 throat-clearing and a stronger hook line exists within the first 3s,16 snap t0 inward to that line. Hook-weakness alone is never a drop —17 only an inward-trim suggestion.183. **Payoff landing** — if the tail contains a clear payoff word19 followed by trailing filler ("yeah", "so anyway") or silence, snap20 t1 to ~80ms past the payoff word rather than the sentence boundary.21 Dead air after the payoff costs retention.2223Output remains a single `keep`/`trim`/`drop` decision — same I/O24contract, same caller logic in `shorts.sh`.2526## Invoke2728```29.claude/skills/verify-bookends/verify-bookends.sh <input_clip> <input_trimmed_transcript> <out_decision_json> [VERIFY_BOOKENDS=0 to skip]30```3132- `input_clip` — post tighten-pace clip33- `input_trimmed_transcript` — post tighten-pace re-timed transcript34- `out_decision_json` — written JSON: `{"action":"keep"}`, `{"action":"trim","t0":<sec>,"t1":<sec>,"reason":...}`, or `{"action":"drop","reason":...}`3536Env: `VERIFY_BOOKENDS=0` makes the skill emit `{"action":"keep","reason":"disabled"}` without calling Claude.3738## How39401. ffprobe the clip duration.412. Slice the trimmed transcript text into a head window (first 1.5s) and a tail window (last 1.5s).423. ffmpeg out a 3-frame strip from each end (start / mid / end of the 1.5s window).434. Send both strips + both transcript snippets to `claude -p` (vision-enabled) with explicit inward-only rules.445. Validate the reply: enforce `0 <= t0`, `t1 <= dur`, `t0 >= 0`, `t1 > t0`. If the proposed trim would remove more than 2.0s of clip duration, downgrade to `{"action":"drop"}`. If the proposed trim would shrink the short below 15s, downgrade to `{"action":"keep","reason":"would shrink below 15s"}`.4546## Caller contract4748`shorts.sh` reads the JSON. If `action=trim`, it issues a second `cut-clip` + `rebase` against the trimmed transcript, then continues to `fit-vertical`. If `action=drop`, it `continue`s the per-span loop and increments the skipped counter. If `action=keep`, no-op.4950## Idempotency5152Keyed off `(clip mtime, trimmed-transcript mtime)`. Cached decision written next to `<out>.vbmeta`.