Communitygithub.com

josueh04/product-video-skills

HyperFramesの並列レンダリングワーカーが要素をドロップ、フラッシュ、またはちらつかせないようにするアニメーションルールと、ビデオのテンプレートでレンダリング前に違反を見つける静的lint(lint_motion.py)です。GSAPのトゥイーン、タイムライン、カーソル、カメラ移動、タイピング、スクロール、ポップアップを記述または編集する際、レンダリングでちらつきや要素の消失が発生した場合、またはプレビューとMP4の表示が異なる場合に使用します。

product-video-skills とは?

このスキルは、HyperFrames環境での並列レンダリングにおけるフリッカーや要素の消失を防ぐためのアニメーションルールと静的解析ツールを提供します。HyperFramesはタイムラインを再生するのではなく、フレームごとにタイムラインをシークしてレンダリングするため、各フレームが純粋な時間の関数である必要があります。本スキルは、GSAPを使用したトゥイーンやタイムラインの記述におけるベストプラクティスを12のルールとしてまとめ、静的リンター(lint_motion.py)で自動チェックを行います。対応プラットフォームはHyperFrames(0.8.x以上)で、Claude CodeなどのAIエージェントで利用可能です。開発者はこのスキルを利用することで、レンダリング前にタイムラインコードの問題を発見し、修正することができます。

対応✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/josueh04/product-video-skills/tree/HEAD/skills/seek-safe-motion

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

シークセーフモーション

HyperFramesはタイムラインを再生しません。シークします。各フレームに対してレンダラーはタイムラインをそのフレームの時間に設定し、ページをキャプチャします。HyperFrames 0.8.xでは、これを3つのワーカーで並列に実行し、各ワーカーが3フレームごとに担当し、各シークは1ms戻ってから前に進むことで安定させます。そのため、すべてのフレームは時間の純粋関数でなければなりません。以前にレンダリングされたもの、クロック、または偶然に依存するものは、ワーカーごとに異なるレンダリング結果を生み、結果として3フレームごとに要素が欠落する現象が発生します。

このバグはStudioプレビュー(順次再生)や単一スナップショットでは見えません。このスキルが生まれたプロダクションでは、レビュアーに届く唯一の欠陥でした。オープニングタイトルが最初の7秒間「スタッタリングしてフラッシュ」するというものでした。

まずはLint

PVS_HOME="$(cd "$(cd "${CLAUDE_SKILL_DIR}" && pwd -P)/../.." && pwd)"
"$PVS_HOME/bin/pvs-py" "$PVS_HOME/skills/seek-safe-motion/scripts/lint_motion.py" <video_dir>/video

これはindex.html、src/*.tpl、およびそれらに隣接する*.js(インラインスクリプトのみ)を読み取り、file:line: severity RULE: whyに加えて修正内容を出力し、エラーがあれば終了コード1で終了します(--strictで警告も失敗扱い、--jsonでツール向け出力)。タイムラインを編集するたび、およびレンダリングの前に実行してください。これは静的解析であり、実行時に計算される変数(「チェック不可」としてカウント)や、時間的に重なる2つのトゥイーンを検出できません。それらは以下の再現方法に従って、あなたが確認する必要があります。qa.py(render-qa)もこれを実行し、エラーがあればレポートを失敗として報告します。

ルールとその存在理由

  1. すべてのfromToのfromVarsのキーはtoVarsにも存在すること(SS001、エラー)。ワーカーのフレームがトゥイーンの開始位置にちょうど当たった場合、1msのバックステップでトゥイーンは開始前に戻り、fromVarsにのみ存在するキーは二度と書き込まれません。タイトルトゥイーンはfromTo(sel, {yPercent: 110, opacity: 1}, {yPercent: 0})でした。opacity: 1はfromVarsにのみ存在したため、1つのワーカーがトゥイーンの残りの間、タイトルをopacity 0のままにしました。{yPercent: 110, opacity: 1}から{yPercent: 0, opacity: 1}と書くか、tl.set()の後にtl.to()を使用してください。to()内のstartAtについても同様です(SS002)。
  2. 時刻0以降のすべてのfromToにimmediateRender: false(SS003、警告)。そうしないと、トゥイーンはタイムラインが構築されたときに開始値を書き込み、以前のトゥイーンが設定したものを上書きし、タイムラインの途中にシークすると間違った状態から始まります。
  3. fromよりもfromToを優先(SS004、警告)。from()は、要素が構築時に持っていた値で終了します。以前のトゥイーンが要素に触れると、ワーカー間で合意が得られなくなります。
  4. displayやvisibilityをアニメーションさせない(SS005、エラー)。これらは補間できません。トゥイーンの任意の時点で切り替わります。明示的な時刻で持続時間ゼロのtl.set()を使って変更し、opacityまたはautoAlphaでフェードさせてください。
  5. クロック、偶然、タイマー禁止(SS006、エラー):表示されるものに対してDate、performance.now()、Math.random()、setTimeout、setInterval、requestAnimationFrameを使用しないでください。タイピングのジッターや波形はシード付きジェネレーターを使用します。画面に表示される通話タイマーは、タイムラインのonUpdate内でtl.time()から計算します。
  6. 一時停止したタイムラインを1つ登録し、決して再生しない(SS007、SS011、SS012)。gsap.timeline({ paused: true })で作成し、完全に構築(テキストメトリクスに依存する位置の場合はdocument.fonts.ready内で)してから、window.__timelines["<composition id>"] = tlを割り当てます。構築が完了する前に空のタイムラインを登録すると、空白のビデオがレンダリングされます。tl.play()はレンダラーのシークと競合します。
  7. スクロールは開始と終了を明示したfromToにする。すべてのワーカーが同じオフセットを計算し、実際のコンテンツにクランプされるため、ラインやアイコンの停止が端で途切れません。
  8. 同じ要素の同じプロパティに対して2つのトゥイーンを同時に持たせない。次の移動内に収まったカーソルリセットは、シーク後にポインターを間違った位置に残しました。lintはチェックしません。ビルドのタイミングテーブルを確認してください。
  9. レイアウトではなく変換をアニメーションさせる(SS009、警告):left、top、width、marginの代わりにx、y、scale、clip-pathを使用します。レイアウトトゥイーンはフレームごとにリフローし、hyperframes checkでgsap_non_transform_motionとしてフラグが付けられます。実際の製品コントロール(サイドバーの展開)での短い幅変更は、製品を再現する場合に受け入れられます。
  10. .clip要素をトゥイーンさせない(SS010、エラー)。HyperFramesはdata-startとdata-durationを通じてクリップの可視性を管理します。その内部のラッパーをアニメーションさせてください。
  11. 有限の繰り返し(SS008、警告)。repeat: -1は有限のルートdata-durationの下でのみ許可されます。Math.max(0, Math.floor(span / period) - 1)でカウントを計算してください。
  12. すべての初期状態を時刻0で明示的に設定する。gsap.set(sel, vars)を行うヘルパーは、tl.set(sel, vars, 0)も実行して、0にシークし直したときに、ワーカーがレンダリングした最後の状態を保持するのではなく、最初のフレームを復元するようにします。

レンダリング前に疑わしいバグを再現する

lintはパターンを見つけます。スナップショットはピクセルを証明します。t0で開始する疑わしいトゥイーンの場合:

npx --yes hyperframes@<pinned> snapshot . --at <t0 + 0.3> --no-end --describe false -o a
npx --yes hyperframes@<pinned> snapshot . --at <t0>,<t0 + 0.3> --no-end --describe false -o b

t0 + 0.3のフレームはaとbで同一でなければなりません。異なる場合、トゥイーンの開始をシークすることで状態が変化しています。1つのワーカーを正確に再現するには、フレーム0, 3, 6, ...をその順序で、トゥイーンを少し過ぎたところまでスナップショットしてください。時間範囲を半分にして、1つのトゥイーンが残るまで二分探索します。レンダリング後、scan_render.py(render-qa)は同じバグをWORKER PATTERN実行として報告します。つまり、すべてが1つのフレームインデックスmod 3を共有する外れフレームです。

リファレンス

  • references/patterns.md: 各ルールの修正前後のコード、テンプレートを安全に保つヘルパー(lineIn、init、タイピング、スクロール、カーソルクリック)、およびlintが検出できるものとできないもの。新しいヘルパーを作成するときやlintの指摘を修正するときに読んでください。

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

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

Compose a narrated product demo in HyperFrames: the stage (the product UI rebuilt at its real viewport and scaled to 1080p, camera, rack focus with veil, chapter titles, cursor and clicks, typing, streaming text, pop-ups, toasts, scrolls, end screen and lockup) and the build.py that anchors every beat to a word of the narration. Use it whenever you write or edit a video's video/build.py, src/template.tpl or src/app.css, place a beat on a word, add a chapter, a click, a pop-up or a push-in, frame a screen, build the end screen or lockup, snapshot setup beats, or render a draft or delivery MP4 of a product video in this workbench. Also use it when someone says "the cursor is off", "too zoomed in", "too fast", "it feels chaotic", "the title flashes", "sync the UI to the voice", or asks for a walkthrough, demo or pitch video of a UI.

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.

関連スキル