← ClaudeAtlas

segment-script-45slisted

Split a full script into HeyGen-compatible 45–60 second segments at natural sentence boundaries. Use when preparing avatar A-roll rendering, since HeyGen has a hard per-segment ceiling.
huodebing-alt/Agentic-Headshot-Video-Studio · ★ 0 · AI & Automation · score 71
Install: claude install-skill huodebing-alt/Agentic-Headshot-Video-Studio
# Segment Script 45s / 切 45-60 秒段 ## When to use / 何时使用 Before A-roll rendering. HeyGen segments must stay within 45–60s; this skill enforces that constraint while keeping sentence integrity. A-roll 渲染前使用。HeyGen 每段限定 45-60 秒,本 skill 在保持句子完整的前提下完成切分。 ## Inputs / 输入 - `workspace/script/script.full.md` - `config/style.yaml` (`wpm_en`, `cpm_zh`). - Optional `--max-seconds` (default 58), `--min-seconds` (default 45). ## Output / 输出 - `workspace/script/segments/seg_001.md` … `seg_NNN.md` (one per segment). - `workspace/script/segments.index.json`: `[{id, text, est_seconds, broll_cues[]}]`. ## Steps / 步骤 1. Tokenize script into sentences (zh: 。!?;en: . ! ?). 2. Greedy-pack sentences until next sentence would exceed `--max-seconds`. 3. If a single sentence > max, split at comma/semicolon; never mid-clause. 4. Re-estimate duration per segment; warn if < min-seconds. 5. Write segment files and index JSON. ## Examples / 示例 ``` claude run segment-script-45s --max-seconds 55 ``` ## Failure recovery / 失败回退 - If any segment > 60s after splitting, abort and surface the offending sentence for manual edit. - If total segments > 40, suggest splitting the script into multiple videos.