Communitygithub.com

josueh04/product-video-skills

在 HyperFrames 中编排带旁白的产品演示:舞台(在真实视口重建、缩放到 1080p 的产品 UI)、摄像机、遮罩焦点、章节标题、光标和点击、打字、流式文本、弹出窗口、提示、滚动、结束画面和标志性结尾),以及将每个节拍锚定到旁白某个词的 build.py。当你编写或编辑视频的 video/build.py、src/template.tpl 或 src/app.css,将节拍放置在某个词上,添加章节、点击、弹出或推进,框定屏幕,构建结束画面或标志性结尾,快照设置节拍,或在此工作台中渲染产品视频的草稿或交付版 MP4 时使用它。当有人说“光标偏移”、“缩放太大”、“太快”、“感觉混乱”、“标题闪烁”、“将 UI 与语音同步”,或要求进行走动演示、演示或产品 UI 的宣传视频时也使用它。

product-video-skills 是什么?

该技能为 HyperFrames 中的产品演示视频提供了一个完整的编排工作流程。它将每个 UI 节拍(击键、点击、弹出窗口、过渡)锚定到旁白中的特定单词,确保定时与语音持续同步。该技能支持一个结构化模型,其中产品的 UI 在其真实视口重建并缩放到 1080p,允许使用精确的 CSS 值进行像素完美的定位。它在 Claude Code、Cursor 和 Codex 等 AI 代理工具中运行,提供构建脚本、参考文件和套件组件来自动化常见模式。工作流强制执行精确的定时,通过快照提供迭代预览,并包含一个签名门控以确保在构建之前对内容达成一致,从而减少重新渲染的次数。

兼容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/josueh04/product-video-skills/tree/HEAD/skills/ui-demo-composer

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

UI 演示编排器

此技能中的一个产品视频是一个 HyperFrames 合成,由每个视频编写的三个文件和一个所有视频共享的套件组成:

文件是什么谁编辑
video/build.py节拍表 T:每个时间点从词语时间推导你
video/src/template.tpl重建的 UI、屏幕层和 GSAP 时间线你
video/src/app.css产品 UI CSS,来自 specs/ 的字面值你
kit/stage.css,kit/titles.css,kit/stage.js舞台层和搜索安全助手此技能
products/<slug>/kit/tokens.css,fonts/,icons/,`ui/``产品的令牌、字体、图标和共享 UI 组件product-kit
video/index.html由 build.py 生成。永远不要手动编辑无人

scripts/buildlib.py 处理每个构建的通用部分(时间、签名门控、音频标签、内联、占位符、图标、摄像机限制),使 build.py 保持为简短的节拍列表。

舞台模型

#root > #stage > #camera > #blurWrap > #app      产品,按应用像素
               > #veil, .pvs-ttl, #endS, #lock, #fade      屏幕空间,1920x1080
  • UI 在其真实视口重建并缩放一次。 #app 使用 product.yaml app_canvas.logical CSS 像素(例如 1440x810),通过一次变换缩放到 1920x1080。生产 CSS 保持其字面像素,因此规范值无需更改即可粘贴,并且每个测量值都与代码进行 1:1 比较。选择一个高于应用断点、宽高比为 16:9 的桌面宽度;如果有屏幕录制,则使用其逻辑尺寸。非 16:9 的画布会加黑框(buildlib 会发出警告)。
  • 位置是测量的,而不是打字输入的。 S.box(sel) 在字体加载后汇总到 #app 的偏移量。如果 CSS 更改,光标仍然落在按钮上。
  • 光标和点击波纹是 #app 的最后子元素,因此它们会随产品缩放和模糊。弹出窗口 (.pvs-modal) 和提示 (.pvs-toast-slot) 也位于 #app 中。
  • 只有 #camera 移动,只有 #blurWrap 模糊。 永远不要动画 #app 或 #stage。

取景:默认为 1 倍全页

默认每个产品节拍为 1 倍、全页,弹出窗口保持自然大小并像应用一样居中。推入是温和的(最多 video.max_zoom,默认为 1.35),保持整个部分在画面内,并且永远不要让画面边缘穿过标签。每章一个取景:在章节标题后面、当产品失焦时进行移动,或者作为一次缓慢的标志性移动。

原因:在产生这些技能的制作中,一个设置视频因缩放被拒绝了两次。1.67 倍的推入将标签切成两半(“我无法分辨发生了什么”),后来每列大约 2 倍的取景即使没有裁剪任何内容也感觉拥挤。审阅者作为模型引用的视频全程以 1 倍运行。远距离画布(以 50% 显示)或狭窄的聊天栏目可以容忍更多:在该产品的 product.yaml 中提高 max_zoom,而不是在每个节拍中。b.cam() 和 S.cam() 会在超过 max_zoom 时进行限制并发出警告。详细信息和数字:references/framing-and-pacing.md。

节奏:章节是暂停

  • 以上下文开始,而不是在 UI 中间:在失焦的产品上显示徽标、产品名称和一行关于产品是什么的内容。
  • 每个章节以一个双色调标题开头,产品处于焦外(模糊加上遮罩),保持至少约 1.4 秒,并且在命名第一个动作的词之前焦点刚好恢复。屏幕变化发生在标题后面,因此没有硬切。
  • 一个章节一个想法,一次一个变化,间隔 0.6 到 1 秒,每个章节结束时保持约 0.8 秒。产品的实际等待时间压缩到 1 或 2 秒。
  • 结束画面显示广度(产品还能做什么,使用真实的 UI 组件),然后是标志性结尾。

原因:一个密集的一镜到底剪辑,每 0.5 秒一个微动作,在制作者看来是打磨,在审阅者看来是噪音(“太快、太多同时发生、令人不知所措”);在结果中放大和缩小使得它们无法跟上。冷静的章节版本被批准了。

每个节拍都锚定到一个词

b = buildlib.Build(__file__)
T, w, end = b.T, b.w, b.end
T["N2"] = T["ch1"] + 0.3                                  # 放置剪辑 ID 意味着放置该剪辑
T["rack1"] = T["N2"] + w("N2", "after") - 0.25            # 焦点在 "after" 之前刚好恢复
T["send1"] = max(T["type1"] + T["type1Dur"] + 0.4, end("N3") + 0.15)
  • w(clip, prefix, nth=1) 是该剪辑中第一个以 prefix 开头的词的开始时间。当词缺失时它会引发错误(没有静默回退:无声地将节拍放置到默认时间的回退会导致动作不知不觉地偏离语音)。
  • UI 事件领先于命名它的词 0.05 到 0.45 秒。max() 确保同时满足旁白顺序和“UI 已完成”;end(k) 是 T[k] 加上剪辑持续时间(或 b.dur(k, d))。
  • 打字速度是每秒字符数(约 17 到 21),或者固定以适应节拍。
  • 点击、打字和弹出效果的声音放在同一个 T 上(b.click(t)、b.typing(text, t, dur)、b.pop(t)),因此重新定时的节拍也会移动其声音。
  • 重新生成一行语音会重新定时整个视频。这就是关键所在。

原因:定时只有一个真相来源。当一行被重新生成时,所有锚定到它的内容一起移动;手动输入的秒数在第一次重新录制时就过时了。

工作流程

  1. 阅读 BRIEF.md(章节、取景)、COVERAGE.md(每个章节必须在屏幕上解释什么)、specs/*.md 和 TRUTH.md。不要发明 UI:没有在 SOURCES.md 或 specs/ 中来源的屏幕或行为保持排除。
  2. 根据规范,使用来自 product.yaml cast 的虚构数据在 src/template.tpl 和 src/app.css 中重建屏幕。使用 {{UI:name}} 从 kit/ui/ 中重复使用产品组件,而不是从另一个视频中复制(references/ui-component-library.md)。
  3. 在 build.py 中编写节拍,并使用套件助手在模板中编写时间线(API 参考 references/stage-kit.md,每个节拍参考 references/beat-recipes.md,结束画面和标志性结尾参考 references/end-screen-and-lockup.md)。对每个动画遵循搜索安全运动技能。
  4. 构建草稿并读取它打印的节拍表:
    PVS_HOME="$(cd "$(cd "${CLAUDE_SKILL_DIR}" && pwd -P)/../.." && pwd)"
    "$PVS_HOME/bin/pvs-py" <video_dir>/video/build.py --draft
    
    在任何语音存在之前,--draft --fake-timings 从 lines.tsv 虚构词语时间,以便你可以布置屏幕。
  5. 检查和校验,从 <video_dir>/video/ 运行:
    "$PVS_HOME/bin/pvs-py" "$PVS_HOME/skills/seek-safe-motion/scripts/lint_motion.py" .
    npx --yes [email protected] check
    
    期望 0 个错误和 0 个运行时警告。对于单一舞台,预期有一个 lint 警告:composition_file_too_large(套件已内联)。然后运行构建打印的第二个 check,check --at <setup beat times>:默认样本通常只落在失焦时刻,套件在此处隐藏产品文本以避免对比度检查(它是有意模糊的),因此那里的 contrast ... checked 0 没有审计到任何读者会阅读的内容。单独使用 check 是不够的:它在移动项目在其大部分路径中不可见的视频上通过了检查。查看帧图像。
  6. 快照每个设置节拍并亲自查看每张图像。在 build.py 中使用 b.snap(t, label) 标记它们;构建打印确切的命令:
    npx --yes [email protected] snapshot . --at 3.2,4.7,9.98 --no-end --describe false -o snapshots/setup
    
    --no-end 只捕获这些时间点;--describe false 阻止帧被发送到外部视觉 API。检查取景(没有边缘被裁剪),光标在目标上,弹出窗口以自然大小居中,标题完整。--zoom "#toast" --zoom-scale 2 裁剪一个元素。要测试可疑动画,--at <start>,<later> 必须匹配 --at <later>。
  7. 渲染。用于审查的草稿,然后在 BRIEF.md 签署后交付(build.py 会打印这行):
    npx --yes [email protected] render . -o renders/<video>-v<k>.mp4 --fps 30 --quality draft
    npx --yes [email protected] render . -o renders/<video>-v<k>.mp4 --fps 30 --quality delivery
    
    然后对 MP4 运行 render-qa。保留每个版本的 MP4。

签名门控

build.py 拒绝构建,直到 BRIEF.md 中设置了 coverage_signed_by 和 claims_signed_by(退出码 2)。--draft 无论如何都会构建,并将 <meta name="pvs-draft" content="1"> 标记到 index.html 中;QA 将其报告标记为草稿,交付版本拒绝它。不要代替审阅者签署,也不要删除该元标记:草稿仅用于查看,永远不用于发布。

原因:在产生这些技能的制作中,26 个版本中有 9 个是因为视频没有解释审阅者关心的某个功能,并且没有人预先写下这些功能。门控确保协议先行。

来自事件的规则

  • 修复生产缺陷,保持外观。 保持布局、令牌和行为 1:1,但修复实时应用的可见缺陷(缺少填充、溢出或截断的文本、灰色的原生控件、点击后留下的焦点环)。在 BRIEF.md 注释中列出每个修复。
  • 当产品可配置时展示可配置项: 买家可能询问的设置应该出现在屏幕上,而不仅仅是在旁白中。
  • 在打开覆盖菜单的模态框前一帧关闭菜单。 在一个新对话框下打开的折叠菜单在一个渲染中留下了幽灵文本。
  • 仅淡出进入标志性结尾的结束画面内容,保持其背景直到标志性结尾出现。同时淡出两者会在它们之间显示一帧锐利的 UI(S.lockup 会这样做)。
  • 点击前悬停(hov 类在点击前约 0.12 秒),光标在第一次失焦后进入,并在结束画面之前退出。
  • 在 UI、数据或旁白中没有供应商或禁止的名称(product.yaml banned_terms,names)。如果真实屏幕显示了一个,保持该组件不出现在画面中,并且永远不要让它明显为空。
  • 不要为了过早显示进度而渲染。 使用快照迭代;当设置节拍看起来正确时再进行渲染。

文件

路径何时阅读
references/stage-kit.md你需要助手的签名、占位符、CSS 变量或 buildlib API
references/beat-recipes.md你构建特定的节拍:开场、章节、点击、打字、流式文本、弹出窗口、下拉菜单、提示、滚动、推入
references/framing-and-pacing.md你选择取景或节奏,或者审阅者说“缩放”、“快”、“混乱”
references/end-screen-and-lockup.md你构建结尾
references/ui-component-library.md一个 UI 组件将出现在多个视频中,或者你即将从另一个视频复制标记
scripts/buildlib.py你需要 API 参考未涵盖的行为
kit/stage.js同上,用于时间线助手
PVS_HOME/_template/video/video/每个新视频开始的示例 build.py、template.tpl 和 app.css

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

josueh04/product-video-skills

Extract, once per product, everything every video of it reuses and write it to kit/ and product.yaml (design tokens, font subsets as woff2, icon subsets as SVG from the product's own icon packages, logos in light, dark and app-tile variants from the repo, a fictional cast proposed once for veto and then frozen, the canonical-names map, pronunciations, banned terms and the read-only tool list). Use it when a product is set up or its kit is missing or incomplete, when a video needs an icon, font or logo that is not in kit/ yet, when someone asks for demo names, fake customers, phone numbers or emails, when a brand word is mispronounced or an old product name shows up, and when checking that demo data is fictional.

josueh04/product-video-skills

Interview the user about a product, then create products/<slug>/ with its own git history, a filled product.yaml and linked skills, fetch its sources and build its kit. Run only when the user types /product-new.

josueh04/product-video-skills

Back every sentence of a video's narration (audio/lines.tsv) and every screen it shows with a citation into the pinned source code (role/path:line@sha) or a docs URL, mark what is visible in the UI versus backend-only, flag restricted or unreleased features, and cut or rewrite anything unbacked; writes the video's TRUTH.md and checks it with truth_check.py. Use it whenever a script or narration is drafted or edited, before voice is generated, before a build, when someone asks "can we say this?", "is this true?", "does the product really do X?", when a reviewer asks for a feature or a claim the product may not support, and when a source document (pitch deck, PRD, marketing page) makes claims the video wants to repeat.

josueh04/product-video-skills

Check a rendered product video before anyone else sees it: worker-pattern flicker, black frames, loudness and true peak, clipping, clicks at clip edges, overlapping narration, speech to text against the script, banned terms and legacy names, camera zoom, contact sheets, frame strips at transitions and parity against the approved version; then write qa/REPORT.json, the only thing deliver.py accepts. Use it after every HyperFrames render, whenever someone asks "is the render clean", "QA this", "check the video", "check the audio", "why does it flicker", "there is a click", "compare v3 with v2", "did the approved part change", or before showing, sending, uploading or delivering any MP4, even when the request does not say QA. Also use it to triage a defect a reviewer reported in a render.

josueh04/product-video-skills

Write a product video's narration and turn it into voice clips with word timings, pronunciation fixes, sound effects and even loudness. The script becomes a table of moments and then audio/lines.tsv (one clip per sentence, with role and speed columns); tts.py voices it with ElevenLabs or the free macOS say voice, maps brand respellings back to the on-screen spelling, normalizes every clip and writes audio/timings.json for the composer; make_sfx.py builds typing tracks from real keystrokes and places recorded click and pop sounds. Use it whenever a video needs a script, narration, voice-over, lines.tsv, timings.json, TTS, a new take, a voice or casting choice, a pronunciation fix ("it says the name wrong"), a changed sentence, a tone note ("too hype", "sounds cut off"), audio levels, a click at the end of a clip, typing or click sounds, or when the build stage asks for the voice. Also use it for silent loops, which still need a moment table and SFX.

josueh04/product-video-skills

The animation rules that keep HyperFrames' parallel render workers from dropping, flashing or flickering elements, plus a static lint (lint_motion.py) that finds the violations in a video's template before it costs a render. Use it whenever you write or edit GSAP tweens, timelines, cursors, camera moves, typing, scrolls or pop-ups in a HyperFrames composition or a video's src/template.tpl, whenever a render shows flicker, stutter, an element that vanishes on some frames, a title that flashes, or a "WORKER PATTERN" line from scan_render.py or qa.py, and whenever the preview looks right but the MP4 does not. Also use it to review someone else's timeline code before rendering.

josueh04/product-video-skills

Pin a product's source code (read-only exports in sources/ plus sources.lock), confirm that the pinned commit is what runs in production, and map every screen of a video brief to its route, components, i18n strings and state, written to the video's SOURCES.md. Use it whenever a video needs to know where a screen lives in the code, when sources/ is missing or stale, before ui-spec-from-code or product-truth start on a video, after the product's frontend changed ("what changed", "which videos are affected", "refresh the sources", "is this checkout current", "which commit is in prod"), and when there is no code and you need an inventory of the no-code references (recordings, recovered captures, docs) a screen can be rebuilt from.

josueh04/product-video-skills

Gather pixel references for UI that the code cannot show, or to check a rebuild against the real thing, using frames and timed OCR text from screen recordings, captures recovered from past Claude Code session transcripts, a local instance of the app built like production, and web research for third-party apps, plus side-by-side parity images and contact sheets. Use it whenever someone hands over a screen recording (.mov or .mp4) of the product, when a screen has no usable source code (a stale checkout, another company's UI such as a sign-in page, calendar or CRM, runtime output from a backend not in the repos), when asked "what does it really look like", "match the recording", "how long does that animation take in the app", "compare our render to the real app", or when screenshots from an earlier session might already exist. Never uses the reviewer's personal browser.

josueh04/product-video-skills

Turn a product's real frontend code into 1:1 rebuild specs for a video, one read-only subagent per screen, each returning static HTML, CSS with every variable resolved to its literal value and cited (role/path:line@sha), every state, transitions with exact durations and easings, icons from the code's own icon sets, and the exact i18n strings; plus resolve_tokens.py to write the product's design tokens to kit/tokens.css. Use it whenever a screen of the product has to appear in a video, when writing or fixing video/src/app.css or the template markup, when someone asks for exact sizes, colors, fonts, paddings, animations or icons of a screen, when a rebuilt screen "looks off" next to the real app, and when the design tokens or theme of a product need extracting. Framework adapters cover Angular with PrimeNG (proven), React, Vue, Tailwind and plain HTML (unproven).

josueh04/product-video-skills

Say where this session stands in the Product Video Skills workbench (setup state, which product and video the current folder belongs to, the stage of every video) and the exact next command to type. Also answers "how do I..." questions about the workbench from its docs.

josueh04/product-video-skills

Coordinate the build of one or more signed videos of the current product with subagents (source recon, product truth, UI specs, voice, one builder per video), re-run QA itself, then deliver. A light coordinator that never builds itself. Run only when the user types /video-build.

josueh04/product-video-skills

Start a new video of the current product - create videos/<video>/, write BRIEF.md, the feature coverage matrix (COVERAGE.md) and the claims sheet (CLAIMS.md), propose chapters, then stop for the reviewer's sign-off. Never builds. Run only when the user types /video-new.

josueh04/product-video-skills

Turn a batch of reviewer feedback on the product's videos into one table per video, fix every video that got notes in parallel (one subagent each) while keeping approved parts, re-run QA and parity, bump versions and deliver. Run only when the user types /video-review.

josueh04/product-video-skills

Check this machine and install the pinned video toolchain of the Product Video Skills workbench (HyperFrames CLI, its rendering Chrome and its agent skills from the same release, the Python environment, the speech model for QA), then run the self-check. Safe to run again. `/video-setup check` only reports.

相关技能