cut
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCut
剪切
Paths: means the folder containing this SKILL.md, and the plugin folder two levels above it.
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}Read first: the rules every video in this plugin follows.
${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.mdEvery question goes in the question box: the AskUserQuestion tool (2-4 options, recommended first). Only in an agent without it, ask numbered questions in text.
edits/<name>/ transcript.txt (read this, never words.raw.json), spans.json (what to remove, quoted),
candidates.md (what code flagged), paper-edit.md (the cut as text), cut-check.html (the
transcript), review.json (notes), cut.mp4 + words.json (the render and its words).<name>IMG_1234.MOVimg-1234PY="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/run.py"python3 "$PY"pypython3setupS="${CLAUDE_SKILL_DIR}/scripts"路径: 表示包含此 SKILL.md 的文件夹, 表示其上两级的插件文件夹。
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}先阅读 :这是插件中每个视频都必须遵循的规则。
${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.md每个问题都应通过问题框提出:使用 AskUserQuestion 工具(2–4 个选项,推荐项放在首位)。只有在没有该工具的 Agent 中,才用文本提出编号问题。
edits/<name>/ transcript.txt (read this, never words.raw.json), spans.json (what to remove, quoted),
candidates.md (what code flagged), paper-edit.md (the cut as text), cut-check.html (the
transcript), review.json (notes), cut.mp4 + words.json (the render and its words).<name>IMG_1234.MOVimg-1234PY="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/run.py"python3 "$PY"python3pysetupS="${CLAUDE_SKILL_DIR}/scripts"No video yet?
还没有视频?
Ask for their take's path. Several files: . None: offer the sample take (raw,
vertical, retakes, false starts and pauses kept) and download it to their folder:
references/takes.mdbash
curl -L -o sample-take.mp4 https://github.com/nextwork-projects/ai-video-editor-cooked/releases/download/sample-video/sample-take.mp4询问用户其拍摄素材的路径。存在多个文件时:参见 。没有文件时:提供示例素材(包含原始画面、竖屏、重拍、说错后重来和停顿),并将其下载到用户的文件夹:
references/takes.mdbash
curl -L -o sample-take.mp4 https://github.com/nextwork-projects/ai-video-editor-cooked/releases/download/sample-video/sample-take.mp40. Ask: the cut first, or everything at once
0. 询问:仅先剪切,还是一次完成全部
Before anything else, ask one question in the question box (start decides this for a whole edit):
Do you want just the cut first, or the cut and the styled edit in one go?
- Just the cut first (Recommended). You approve the cut before I add captions, zooms or visuals, so a changed cut never rebuilds the visuals (fewer tokens).
- Everything at once. I cut, then style without waiting. You still see the cut page and the stills sheet before anything renders.
Skip it only when the user already answered ("just cut it", "cut and style it in one go") or start or
clips called this skill. Just the cut first: steps 1-6, then stop until the user approves the cut
and asks for the style. Everything at once: steps 1-5, open the cut page, go straight on to
style-edit; a later cut change re-runs style-edit from its plan step.
开始任何操作前,先在问题框中提出以下问题(完整编辑由 start 决定):
你想先只完成剪切,还是一次完成剪切和风格化编辑?
- 仅先剪切(推荐)。 你先确认剪切,我再添加字幕、缩放或视觉效果,这样剪切发生变化时无需重新构建视觉效果(可节省 token)。
- 一次完成全部。 我先剪切,然后不等待确认就继续进行风格化。你仍会在任何内容渲染前看到剪切页面和静帧表。
仅当用户已经回答("just cut it"、"cut and style it in one go"),或 start、clips 调用了本 skill 时跳过此步骤。仅先剪切:执行第 1–6 步,然后停止,直到用户批准剪切并且要求进行风格化处理。**一次完成全部:**执行第 1–5 步,打开剪切页面,然后直接进入 style-edit;之后若剪切发生变化,则从 style-edit 的计划步骤重新运行。
0b. Read the user's taste
0b. 读取用户偏好
bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py" show --edit edits/<name>Follow every rule in it. Save a reaction to a result ("too slow") with the taste skill before redoing.
bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py" show --edit edits/<name>遵守其中每条规则。重做前,使用 taste skill 保存对结果的反应("too slow")。
1. Transcribe
1. 转录
bash
python3 "$PY" "$S/transcribe.py" <source> edits/<name>/words.raw.json [--script <their script>]A script (or , repeatable) gets names and jargon right (+20% on Scribe).
--keyterm NameSay the time first: Whisper 1-4 min for a 3-min take, CrisperWhisper about the take's length. It picks
Scribe when a key is saved, else CrisperWhisper if installed, else the free local Whisper ( overrides), which drops
some ums and false starts. With neither, say once that
setup can add one (CrisperWhisper's weights are non-commercial only). Never download a model mid-edit: a
re-check needing one not installed (exit 4) is skipped and said in the round's note.
--engine whisper|crisper|scribeNever read : step 2 writes , 1/12 the size.
words.raw.jsontranscript.txtbash
python3 "$PY" "$S/transcribe.py" <source> edits/<name>/words.raw.json [--script <their script>]提供脚本(或可重复使用的 )有助于正确识别人名和术语(在 Scribe 上提升约 20%)。
--keyterm Name开头先说明预计耗时:Whisper 处理 3 分钟的素材需要 1–4 分钟;CrisperWhisper 的耗时大致等于素材长度。已保存 key 时会选用 Scribe;否则,如果已安装 CrisperWhisper,则使用它;再否则使用免费的本地 Whisper( 可覆盖此选择),它会去掉部分含糊语气词和说错后重来的内容。如果两者都不可用,只说明一次可以通过 setup 添加一个(CrisperWhisper 的权重仅限非商业用途)。编辑过程中绝不要下载模型:如果复查时发现所需模型未安装(退出码 4),则跳过该复查,并在本轮备注中说明。
--engine whisper|crisper|scribe绝不读取 :第 2 步会写入 ,大小仅为前者的 1/12。
words.raw.jsontranscript.txt2. Decide what to cut
2. 确定剪切内容
bash
python3 "$S/retakes.py" propose edits/<name>Code finds every possible cut (a repeated line, an unfinished sentence, "wait, sorry", fillers)
into . Each is a place to look, not a decision. Read and
, follow , and write
().
candidates.mdtranscript.txtcandidates.mdreferences/retake-detection.mdspans.jsonreferences/shapes.mdWith a : , read ().
script.mdpython3 "$S/script_match.py" edits/<name>script-match.mdreferences/script.mdLast take wins, except alternate hooks. Never type a timestamp or span a
pause.
Only if the user wants it shorter (or their taste says to run the editorial pass), also read and add
cuts (content calls).
references/editorial-rules.mdredundantA misheard name is one command, never a JSON rewrite: (whole words, kept in for the captions).
python3 "$S/retakes.py" fix edits/<name> cloud=Claude jiv=Jevfixes.jsonbash
python3 "$S/retakes.py" propose edits/<name>程序会把所有潜在剪切点(重复台词、未说完的句子、"wait, sorry"、语气词)汇总到 。每个候选都只是需要查看的位置,而不是最终决定。阅读 和 ,遵循 ,并编写 ()。
candidates.mdtranscript.txtcandidates.mdreferences/retake-detection.mdspans.jsonreferences/shapes.md存在 时:,然后读取 ()。
script.mdpython3 "$S/script_match.py" edits/<name>script-match.mdreferences/script.md通常采用最后一次拍摄,但备选开场钩子除外。不要手动输入时间戳,也不要将停顿作为剪切区间。
仅当用户希望素材更短(或其 taste 偏好要求执行编辑处理)时,才另外阅读 ,并添加标记为 的剪切(内容重复)。
references/editorial-rules.mdredundant识别错的人名只需执行一条命令,绝不要直接改写 JSON:(使用完整单词,并保存在 中,供字幕使用)。
python3 "$S/retakes.py" fix edits/<name> cloud=Claude jiv=Jevfixes.json3. Build
3. 构建
bash
python3 "$S/build_timeline.py" <source> edits/<name> && python3 "$PY" "$S/mirror.py" <source> edits/<name>Every pause (breaths too) over (0.15 s) becomes 0.10 s; under music only word gaps
are trimmed. A build writes nothing: fix that span and run it again.
--max-pauseERRORmirror.pymirrored--flipIn one message, start the spans encoding in the background () and the paper
checks; step 4 then encodes only what changed:
run_in_backgroundbash
python3 "$S/render.py" <source> edits/<name> --segments-onlyThe agent grades (a flub left in, a bad join, a good line lost) and
fixes . Readers for takes over 5 min
go first, the judge after: . Never read yourself.
cut-judgepaper-edit.mdspans.jsonreferences/judge.mdpaper-edit.md- in
CLIPPED: a pause cut ate a word. Raisepaper-edit.md. Still there: a label is off.--pad - Joins inside speech move to a quiet frame. Any : listen in step 5.
still in speech
bash
python3 "$S/build_timeline.py" <source> edits/<name> && python3 "$PY" "$S/mirror.py" <source> edits/<name>所有超过 (0.15 秒)的停顿(包括呼吸停顿)都会缩短至 0.10 秒;在音乐铺底的情况下,只修剪词语之间的空隙。构建时出现 不会写入任何内容:修正该区间后重新运行。
--max-pauseERROR当书、衣服或标牌上的文字显示为反向时, 会输出 (使用前置摄像头拍摄):询问一次,保持原样(推荐)(大多数创作者都会这样发布)/ 翻转,让文字正向显示;选择翻转时,在下面的每个 命令中添加 。
mirror.pymirroredrender.py--flip在同一条消息中,后台启动区间编码()并运行纸面剪辑检查;第 4 步随后只编码发生变化的部分:
run_in_backgroundbash
python3 "$S/render.py" <source> edits/<name> --segments-onlycut-judgepaper-edit.mdspans.jsonreadersjudgereferences/judge.mdpaper-edit.md- 中出现
paper-edit.md:剪切停顿时误删了一个词。提高CLIPPED;如果问题仍存在,说明标签有误。--pad - 语音内部的拼接点会移到安静的帧。若仍有拼接点位于语音中:在第 5 步中进行听音检查。
4-5. Render and verify
4–5. 渲染并验证
Foreground (render.py waits for the background encode):
bash
R="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/review.py"
python3 "$S/build_timeline.py" <source> edits/<name> && \
python3 "$S/render.py" <source> edits/<name> && \
python3 "$PY" "$S/verify_cut.py" edits/<name> --engine <same engine as step 1> && \
python3 "$S/preview_cut.py" edits/<name> --no-open && \
python3 "$R" edits/<name> start --video edits/<name>/cut.mp4 --stage cut --transcript edits/<name>/words.jsonVerify clean: the cut page is ready. Verify diffs the cut's transcript with the kept words (exit 1 stops the chain):
- MISSING: a kept word is not in the render. Raise (or narrow the span), rebuild, re-render.
--pad - SURVIVED: a span to add for a real repeat or stumble, never one that cuts a kept line.
- HEARD DIFFERENTLY ("jev -> jeff") and filler notes are transcriber variance: no rebuild.
- DOUBLED: words said twice in a row. Natural ("very, very"): keep. A stumble: add its span.
- N join(s) in speech: listen. Clipped: , re-render.
splice_check.py edits/<name> --fix
One fix cycle (the same chain), then show the user what is left.
在前台执行( 会等待后台编码完成):
render.pybash
R="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/review.py"
python3 "$S/build_timeline.py" <source> edits/<name> && \
python3 "$S/render.py" <source> edits/<name> && \
python3 "$PY" "$S/verify_cut.py" edits/<name> --engine <same engine as step 1> && \
python3 "$S/preview_cut.py" edits/<name> --no-open && \
python3 "$R" edits/<name> start --video edits/<name>/cut.mp4 --stage cut --transcript edits/<name>/words.jsonverifyverify- MISSING:某个保留词未出现在渲染结果中。提高 (或缩小剪切区间),然后重新构建并渲染。
--pad - SURVIVED:为真实的重复或口误添加剪切区间,但绝不能添加会剪掉保留台词的区间。
- HEARD DIFFERENTLY("jev -> jeff")和语气词备注属于转录器差异:无需重新构建。
- DOUBLED:词语连续说了两遍。自然重复("very, very")应保留;若为口误,则添加剪切区间。
- :进行听音检查。若词被截断:运行
N join(s) in speech,然后重新渲染。splice_check.py edits/<name> --fix
执行一轮修复(使用同一条命令链),然后向用户展示仍然保留的内容。
6. The user approves
6. 用户批准
The chain opened the review page (). and in the
background. Say the seconds cut. Notes: "keep <line>": narrow or delete that span; "cut <line>": add one; pauses
off: . Then steps 4-5, each note (: what changed), last
(never a second ), then ask any learn question.
../style-edit/references/review.mdservewait--max-pauseresolve--replyround --video edits/<name>/cut.mp4startAfter approval, one Bash call: (: trend), the hook check. Then hook variants if exists (); called by start, ask that in the same question box as style-edit's stills approval, not before it.
python3 "$S/trend.py" log edits/<name>tallyhooks.jsonreferences/retake-detection.mdOnly approval finishes the cut; , go to style-edit. On "just the
cut first", say they can ask for the style. Never start style-edit on your own. Called by start: as
the page opens, start in the background; its : a background
each at once; say a once.
cut.mp4words.jsonvisual-prepmotion_briefsclip-buildermotion_note上述命令链已打开审阅页面()。让 和 在后台运行。告知总共剪掉了多少秒。处理备注:"keep <line>" 表示缩小或删除该区间;"cut <line>" 表示添加一个区间;暂停剪切不合适时使用 。然后执行第 4–5 步,用 处理每条备注(:说明改动内容),最后执行 (绝不能第二次执行 ),再询问是否有 learn 问题。
../style-edit/references/review.mdservewait--max-pauseresolve--replyround --video edits/<name>/cut.mp4start批准后,执行一次 Bash 调用:(:趋势分析),并完成 hook 检查。若存在 ,则处理 hook 变体();当 start 调用本 skill 时,在与 style-edit 静帧审批相同的问题框中询问,不要提前询问。
python3 "$S/trend.py" log edits/<name>tallyhooks.jsonreferences/retake-detection.md只有获得批准才视为剪切完成; 和 将移交给 style-edit。对于 "just the cut first",告知用户之后可以要求风格化处理。绝不自行启动 style-edit。被 start 调用时,在页面打开后于后台启动 ;针对其 ,每个都在后台同时启动一个 ;只说明一次 。
cut.mp4words.jsonvisual-prepmotion_briefsclip-buildermotion_noteIf a script stops
如果脚本停止
| message | do |
|---|---|
| ask for the right path; never copy or convert the source |
| run with |
| drop |
build | fix that span's quote or add |
| speech and background are under 10 dB apart: |
render | say it; re-run render once |
| 消息 | 处理方式 |
|---|---|
| 询问正确的路径;绝不复制或转换源文件 |
| 使用 |
| 移除 |
构建时在引文处出现 | 修正该区间的引文或添加 |
| 语音和背景音之间的电平差不足 10 dB:运行 |
渲染时出现 | 报告该错误;重新运行 render 一次 |
Rules
规则
- Every cut quotes the transcript. No quote, no cut.
- A script breaks ties between takes and keeps every take of a line it says twice. Nothing is cut for being off-script.
- Never stream-copy () across cuts: it lands up to 2 s off.
-c copy - Never hand over a render that has not been verified and approved.
- 每次剪切都必须引用转录文本。没有引文,就不能剪切。
- 脚本会在不同拍摄版本之间打破平局,并保留一句被说了两次的每个拍摄版本。不得仅因内容偏离脚本而将其剪切。
- 跨剪切点时绝不能使用流复制(),否则最多会产生 2 秒的偏移。
-c copy - 不得交付未经验证和用户批准的渲染结果。
Self-check
自检
test_build_timeline.pytest_retakes.pytest_media.pydemotranscribe.pytrend.pysplice_check.pyscript_match.pymirror.pytest_build_timeline.pytest_retakes.pytest_media.pytranscribe.pytrend.pysplice_check.pyscript_match.pymirror.pydemo