overlays
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOverlays
叠加图层(Overlays)
Paths: means the folder containing this SKILL.md, and the plugin folder two levels above it.
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}Read first: real things carry each beat, no AI looks, smooth
before varied, every element lands on its spoken word, never cover the face, the safe zone.
${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.mdEvery question to the user goes in the question box: call the AskUserQuestion tool (2-4 options, the recommended one first). Only in an agent without that tool, ask numbered questions in text.
An edit folder that style-edit already rendered in. The same edit out, with only the named beats
changed: re-planned, checked, and re-rendered where they changed. Everything else stays exactly as
the user approved it. This skill writes no renderer code: it changes visuals.json and images.json,
and style-edit's scripts and Remotion templates do the rest. A new card for a moment uses what the user added
first (: an image from , or a link by its , the same way style-edit's
step 1 does), before searching for anything.
edits/<name>/assets.jsonassets/siteRun the scripts with on Mac and Linux, on Windows. Paths are relative to the library
(PRINCIPLES.md "Where"). ,
; is the venv Python.
python3pyS="${CLAUDE_PLUGIN_ROOT}/skills/style-edit/scripts"VPY="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/run.py"python3 "$VPY"edits/<name>/plan.json + render.mp4 (+ render.plan.json, the plan it was made from)
visuals.json / images.json -> plan.py -> stills-at/sheet.png -> edit.py patch -> check.py render -> review pagereferences/changes.md路径: 表示包含此 SKILL.md 的文件夹, 表示位于其上两级的 plugin 文件夹。
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}先阅读 :真实的元素承载每一个 beat,不要有 AI 感;先求流畅,再求变化;每个元素都要落在对应台词上;绝不遮挡人脸或越过 safe zone。
${CLAUDE_PLUGIN_ROOT}/PRINCIPLES.md所有向用户提出的问题都必须通过问题框提出:调用 AskUserQuestion 工具(2-4 个选项,推荐项排在第一位)。只有在不具备该工具的 Agent 中,才以文本形式提出编号问题。
输入是 style-edit 已经渲染过的剪辑文件夹。输出仍是同一个剪辑,但只有指定的 beat 被更改:这些 beat 会被重新规划、检查,并在有变化时重新渲染。其他所有内容都保持为用户已经批准的样子。此 skill 不编写 renderer 代码;它会修改 visuals.json 和 images.json,其余工作由 style-edit 的脚本和 Remotion 模板完成。某个时刻需要新 card 时,应先使用用户已经添加的素材(: 中的图片,或按 提供的链接,与 style-edit 的步骤 1 相同),然后再搜索其他素材。
edits/<name>/assets.jsonassets/site在 Mac 和 Linux 上使用 运行脚本,在 Windows 上使用 。路径相对于库中 的 部分所指定的目录。,; 使用的是 venv 的 Python。
python3pyPRINCIPLES.mdWhereS="${CLAUDE_PLUGIN_ROOT}/skills/style-edit/scripts"VPY="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/run.py"python3 "$VPY"edits/<name>/plan.json + render.mp4 (+ render.plan.json, the plan it was made from)
visuals.json / images.json -> plan.py -> stills-at/sheet.png -> edit.py patch -> check.py render -> review pagereferences/changes.md0. Read the taste and the edit
0. 阅读 taste 与剪辑
bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py" show --edit edits/<name>
python3 "$S/plan.py" cards edits/<name>cardscard:Ncard:N[card N ...]card:N-1- No render.mp4 or no plan.json? This is a first pass: use style-edit.
- The note is about the cut (a word cut off, a pause): the cut skill. About caption size, font or colour for every video: the taste skill, then style-edit.
- The note is a preference for every video ("logos always smaller", "no full-screen diagrams"): do the fix here, and save the rule with the taste skill too.
bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/taste/scripts/taste.py" show --edit edits/<name>
python3 "$S/plan.py" cards edits/<name>cardscard:Ncard:N[card N ...]card:N-1- 没有 render.mp4 或 plan.json? 这是首次处理:使用 style-edit。
- 备注涉及剪辑(某个词被切断、停顿):使用 cut skill。要求所有视频统一修改字幕大小、字体或颜色: 先使用 taste skill,再使用 style-edit。
- 备注是适用于所有视频的偏好(“logo 始终小一些”“不要使用全屏 diagram”):在这里完成修复,同时用 taste skill 保存规则。
1. Find the beat
1. 找到 beat
Match the user's words to cards: a time ("at 0:15"), a word ("the Duolingo one"), a review note
(). One clear match: go on. Two or more, or none: ask in the question box,
one option per candidate card (its time, kind and word), recommended the nearest one.
[card 1 logo 'Duolingo']Change only the beats the user named. Never re-pick, move or restyle another card on the way.
"Fewer cards" with no names: list the cards that carry the least (a logo in passing, the second
appearance of the same picture) and ask which go, the weakest one recommended.
将用户的话与 card 匹配:时间(“在 0:15”)、某个词(“the Duolingo one”)或 review note()。只有一个明确匹配项:继续。出现两个或更多匹配项,或者没有匹配项:通过问题框询问,每个候选 card 对应一个选项(列出其时间、kind 和对应台词),并推荐最接近的一项。
[card 1 logo 'Duolingo']只更改用户指定的 beat。过程中绝不重新选择、移动或重新设置其他 card 的样式。对于没有指明名称的“减少 card”:列出承载内容最弱的 card(顺带出现的 logo、同一图片的第二次出现),并询问要删除哪些,推荐最弱的一项。
2. Make the change
2. 做出更改
One command per beat. A beat is found by , a time (, , the card up then or
starting within 1.5 s) or a word (, for the second time it is said):
card:N0:1515.4sDuolingoDuolingo@2bash
python3 "$S/plan.py" beat edits/<name> card:1 'box=[40,17,20,11]' # move or resize (x, y, w, h in % of the frame)
python3 "$S/plan.py" beat edits/<name> 0:20 brand=Notion domain=notion.so # swap the logo
python3 "$S/plan.py" beat edits/<name> YouTube@1 --drop # fewer cards
python3 "$S/plan.py" beat edits/<name> --add edits/<name>/visuals.fill-1.json # new beats, in spoken orderValues are JSON (or plain text); sets inside a beat; removes a key. A
capture beat lives in both visuals.json and images.json: changes both. What each request
becomes (move, bigger, off the face, off the caption, real page, animate a screenshot, smoother,
lands late): "Requests".
props.label=xkey=nullbeatreferences/changes.mdNew visuals (an animation, a diagram, a real page): read style-edit's
(the default look and motion: built
animations over static captures, big in the band, one capture per page), then pick the format from what is
said, in style-edit's order (): the user's own
asset, the real thing captured, UI rebuilt from real parts, real logos. A diagram is a of the
real logos or captures the words name, lighting each part on its spoken word, as an overlay beside or
above the head: the speaker stays on screen ( "A diagram"). Never a text
panel, a type card, stock icons, or a full-frame scene the user did not ask for. With several new beats, fan out: one
agent per beat, all in ONE message, each given the edit folder, its sentence, its
pick, the word it lands on, the full path of style-edit's , and its own output
file . Then one with every file. One new beat:
write it yourself.
${CLAUDE_PLUGIN_ROOT}/skills/style-edit/references/motion-design.md${CLAUDE_PLUGIN_ROOT}/skills/style-edit/references/shapes.mdflowreferences/changes.mdtemplate-fillerreferences/shapes.mdedits/<name>/visuals.fill-<n>.jsonbeat --add每个 beat 使用一条命令。可以通过 、时间(、、当时出现的 card,或在 1.5 s 内开始出现的 card)或对应词句(,第二次出现时为 )找到 beat:
card:N0:1515.4sDuolingoDuolingo@2bash
python3 "$S/plan.py" beat edits/<name> card:1 'box=[40,17,20,11]' # move or resize (x, y, w, h in % of the frame)
python3 "$S/plan.py" beat edits/<name> 0:20 brand=Notion domain=notion.so # swap the logo
python3 "$S/plan.py" beat edits/<name> YouTube@1 --drop # fewer cards
python3 "$S/plan.py" beat edits/<name> --add edits/<name>/visuals.fill-1.json # new beats, in spoken order这些值采用 JSON 或纯文本格式; 会在 beat 内设置值; 会移除一个 key。capture beat 同时存在于 visuals.json 和 images.json 中,因此 会同时修改两者。移动、放大、避开人脸、避开字幕、显示真实页面、让 screenshot 产生动画、让动效更顺滑以及延后落点等请求如何转换为更改,请参阅 中的 。
props.label=xkey=nullbeatreferences/changes.mdRequests新视觉效果(动画、diagram、真实页面):先阅读 style-edit 的 ,了解默认外观和动效:基于静态 capture 构建动画、在 band 中保持醒目、每页只使用一个 capture。然后根据用户所说的内容,按照 style-edit 在 中的顺序选择格式:用户自己的素材、捕获的真实内容、使用真实部件重建的 UI、真实 logo。diagram 应由文字所点名的真实 logo 或 capture 组成一个 flow,在对应台词说到时逐一亮起各部分,并作为叠加图层放在头部旁边或上方;说话者必须留在画面中(参见 中的 )。绝不能使用文本面板、纯文字 type card、stock icon,或用户未要求的全屏场景。存在多个新 beat 时,将其并行分发:每个 beat 使用一个 Agent,全部放在同一条消息中,并为每个 Agent 提供剪辑文件夹、对应句子、格式选择、落点词句、style-edit 的 完整路径,以及各自的输出文件 。然后用一条 命令添加所有文件。只有一个新 beat 时,直接自行编写。
${CLAUDE_PLUGIN_ROOT}/skills/style-edit/references/motion-design.md${CLAUDE_PLUGIN_ROOT}/skills/style-edit/references/shapes.mdreferences/changes.mdA diagramtemplate-fillerreferences/shapes.mdedits/<name>/visuals.fill-<n>.jsonbeat --add3. Fetch, then plan again
3. 获取素材,然后重新规划
bash
node "$S/capture.mjs" edits/<name> # only when a beat needs a new capture, logo or post; keeps files already fetched
python3 "$S/plan.py" edits/<name>/style.json edits/<name>/captions.json [--aspect ...] [--layout ...]Plan with the same flags as the edit's last plan (the same for a second shape, then
on every later command). plan.py is deterministic: the beats you did not
touch come out the same. It keeps the rendered plan as before it overwrites
plan.json. Read every warning about your beat. With the profile's on and a behind card
moved or added, run (it cuts only new frames; say its
first when it is more than a few seconds of cards).
--out--plan plan-16x9.jsonrender.plan.jsonbehindpython3 "$VPY" "$S/matte.py" edits/<name>--estimatebash
python3 "$S/check.py" plan edits/<name>Fix every FAIL on your beats and plan again.
bash
node "$S/capture.mjs" edits/<name> # only when a beat needs a new capture, logo or post; keeps files already fetched
python3 "$S/plan.py" edits/<name>/style.json edits/<name>/captions.json [--aspect ...] [--layout ...]使用与该剪辑上次 plan 相同的 flags 进行规划。生成第二个 shape 时使用相同的 ,此后每条命令都使用 。plan.py 是确定性的:未触及的 beat 会保持不变。它会在覆盖 plan.json 之前,将已渲染的 plan 保留为 render.plan.json。阅读与当前 beat 有关的每条警告。如果 profile 启用了 ,且移动或添加了 behind card,则运行 ;它只处理新帧。如果涉及超过几秒的 card,应先使用其 。
--out--plan plan-16x9.jsonbehindpython3 "$VPY" "$S/matte.py" edits/<name>--estimatebash
python3 "$S/check.py" plan edits/<name>修复当前 beats 上的每个 FAIL,然后重新规划。
4. Stills of just those moments
4. 仅为这些时刻生成 stills
bash
python3 "$S/edit.py" stills edits/<name> --at 15.4 --at 12.9-15.3A time is one still; a range is five (entrance, landing, middle, late, exit), the frames a moving
card is judged on. Give each changed card its range (from ), and a moment just
before and after it. Writes and , each tile labelled with its time
and the card up. Review the sheet; hand it to the agent too and compare its blind
with what the beat should show. Fix before going on: a card on the face, under the
caption or the app's buttons, text too small for a phone, the wrong part of a page, an AI look,
the speaker gone from the frame (a full-frame scene nobody asked for).
plan.py cardsstills-at/stills-at/sheet.pngstills-criticreads_as- A fix (move, resize, swap, drop): go on to step 5.
- New visuals (an animation, a diagram, a new page): show the sheet and ask in the question box: Render it (Recommended) / Change something. Do not render before the answer.
bash
python3 "$S/edit.py" stills edits/<name> --at 15.4 --at 12.9-15.3一个时间对应一张 still;一个范围对应五张(进入、落点、中间、偏晚、退出),这些帧用于评判移动中的 card。为每个发生更改的 card 提供其范围(来自 ),并额外提供其前后紧邻的时刻。脚本会写入 和 ,每块图块都标注时间和当时出现的 card。检查该 sheet;也要将其交给 Agent,并将其盲审得到的 与该 beat 应展示的内容进行比较。继续之前先修复问题:card 遮挡人脸、位于字幕或 app 按钮下方、手机上文字过小、展示了页面中错误的部分、存在 AI 感、说话者离开画面(出现用户未要求的全屏场景)。
plan.py cardsstills-at/stills-at/sheet.pngstills-criticreads_as- 修复现有元素(移动、调整大小、交换、删除):继续执行步骤 5。
- 新视觉效果(动画、diagram、新页面):展示 sheet,并通过问题框询问:Render it(推荐) / Change something。收到回答前不要渲染。
5. Patch-render
5. Patch-render
bash
python3 "$S/edit.py" patch edits/<name>It compares plan.json with , re-renders only the spans that changed (each grown
0.5 s for exits and sound tails) on the laptop, and splices them into render.mp4, sound cut by the
sample. It prints the spans and the frame count. It renders in full instead when most of the video
changed, and stops when the change is not local (size, look, motion personality, caption style):
then ask where to render as style-edit step 6 does, and render as its step 7.
re-renders a span by hand (an older render with no ).
render.plan.json--range 13-15.5render.plan.jsonbash
python3 "$S/edit.py" patch edits/<name>它会比较 plan.json 与 render.plan.json,只在本地重新渲染发生变化的 span(每个 span 会额外扩展 0.5 s,以覆盖退出动画和声音尾音),然后将其拼接到 render.mp4 中,声音按采样精确切分。它会打印 span 和帧数。当视频的大部分都发生变化时,它会改为完整渲染;当更改不是局部更改时(尺寸、外观、motion personality、字幕样式),它会停止:此时按照 style-edit 步骤 6 的方式询问在哪里渲染,再按照其步骤 7 的方式渲染。 可手动重新渲染指定 span(适用于没有 render.plan.json 的旧 render)。
--range 13-15.56. Check the render
6. 检查渲染结果
bash
python3 "$VPY" "$S/check.py" render edits/<name>FAILs at your moments go back to step 2 or 3; at most two fix rounds, then hand over with what is
still listed. A FAIL far from your beats was there before: say so, do not chase it here. What each
FAIL means: style-edit "What the checks FAIL and WARN".
references/plan.mdbash
python3 "$VPY" "$S/check.py" render edits/<name>当前时刻出现 FAIL 时,返回步骤 2 或步骤 3;最多修复两轮,然后连同仍未解决的问题一并交付。远离当前 beats 的 FAIL 在此前就已存在:应明确说明,不要在这里追查。每个 FAIL 的含义请参阅 style-edit 的 中的 。
references/plan.mdWhat the checks FAIL and WARN7. Hand over on the review page
7. 在 review page 上交付
bash
R="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/review.py"
python3 "$R" edits/<name> resolve <note> fixed --reply "moved the Duolingo logo above the caption" --new-t 15.4
python3 "$R" edits/<name> round --stage edit --video edits/<name>/render.mp4 --plan edits/<name>/plan.jsonNo page yet: with the same flags. Then and in the background
(style-edit ). Tell the user in one line what changed and where. New notes
about cards come back here; notes about the cut go to the cut skill.
startservewaitreferences/review.mdbash
R="${CLAUDE_PLUGIN_ROOT}/lib/ai_editor/review.py"
python3 "$R" edits/<name> resolve <note> fixed --reply "moved the Duolingo logo above the caption" --new-t 15.4
python3 "$R" edits/<name> round --stage edit --video edits/<name>/render.mp4 --plan edits/<name>/plan.json如果尚不存在 review page,则使用相同的 flags 执行 。然后按照 style-edit 的 ,在后台执行 和 。用一行告诉用户改了什么以及改在哪里。有关 card 的新 note 会回到这里;有关 cut 的 note 则交给 cut skill。
startreferences/review.mdservewaitIf a script stops
如果脚本停止
| message | do |
|---|---|
| |
| |
| render in full: style-edit steps 6 and 7 |
| the cut or the shape changed: render in full |
| the beat's |
capture.mjs | another URL, or a logo instead |
| fix the FAIL on your beat, plan again |
| run matte.py, then stills or patch again |
| message | 处理方式 |
|---|---|
| 运行 |
| 在发生更改的 card 周围使用 |
| 完整渲染:执行 style-edit 步骤 6 和步骤 7 |
| cut 或 shape 发生变化:完整渲染 |
| beat 的 |
capture.mjs | 改用另一个 URL,或改用 logo |
| 修复该 beat 上的 FAIL,然后重新规划 |
| 运行 matte.py,然后再次生成 stills 或执行 patch |
Files
文件
- : each request as a beat change, the diagram recipe, failing checks.
references/changes.md - style-edit's :
scripts/(find and change one beat),plan.py cards|beat(stills of moments),edit.py stills --at(re-render what changed),edit.py patch,capture.mjs,matte.py.check.py - (haiku, one per new beat),
${CLAUDE_PLUGIN_ROOT}/agents/template-filler.md(sonnet),stills-critic.md(a full render that runs long).render-watcher.md
- :每种请求对应的 beat 更改、diagram 配方以及检查失败时的处理方式。
references/changes.md - style-edit 的 :
scripts/(查找并更改一个 beat)、plan.py cards|beat(生成特定时刻的 stills)、edit.py stills --at(重新渲染发生更改的部分)、edit.py patch、capture.mjs、matte.py。check.py - (haiku,每个新 beat 一个)、
${CLAUDE_PLUGIN_ROOT}/agents/template-filler.md(sonnet)、stills-critic.md(用于长时间运行的完整渲染)。render-watcher.md