Communitygithub.com

josueh04/product-video-skills

Règles d'animation qui empêchent les workers de rendu parallèles d'HyperFrames de faire disparaître, clignoter ou scintiller des éléments, plus un lint statique (lint_motion.py) qui détecte les violations dans le template d'une vidéo avant qu'elle ne coûte un rendu.

Qu'est-ce que product-video-skills ?

Cette compétence, nommée `josueh04/product-video-skills`, est conçue pour les agents d'IA travaillant avec HyperFrames, un moteur de rendu vidéo multi-workers. Elle résout un bogue subtil mais critique : lorsque HyperFrames rend des vidéos en parallèle avec trois workers (chacun traitant une image sur trois), les animations qui dépendent de l'ordre de lecture, de l'horloge ou du hasard produisent des résultats incohérents. Cela se manifeste par des éléments qui disparaissent, clignotent ou scintillent sur certaines images, même si l'aperçu semble correct. La compétence fournit un linter statique (`lint_motion.py`) qui analyse les fichiers `index.html`, `src/*.tpl` et les scripts JavaScript inline pour détecter les violations de 12 règles d'animation. Ces règles couvrent les pièges courants : les propriétés manquantes dans les `fromTo`, l'utilisation de `immediateRender`, l'interdiction d'animer `display` ou `visibility`, l'absence de chronomètres ou de hasard, et la configuration correcte des timelines. Le linter est exécutable via la ligne de commande et intégré au pipeline de QA (`qa.py`), ce qui permet de détecter les problèmes avant le rendu, économisant ainsi du temps et des ressources de calcul. Les cas d'utilisation typiques incluent la correction de scintillement de titres, de disparitions d'éléments, de motifs « WORKER PATTERN » dans les rapports de rendu, ou lorsque l'aperçu diffère de la vidéo finale. La compétence guide également la reproduction des bogues suspects via des snapshots HyperFrames avant le rendu, ce qui permet de valider les corrections de manière fiable.

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

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Mouvement sûr pour le seek

HyperFrames ne joue pas la timeline. Il la seeke (recherche) : pour chaque image, le moteur de rendu positionne la timeline au temps de cette image et capture la page. Avec HyperFrames 0.8.x, cela se fait avec trois workers en parallèle, chacun prenant une image sur trois, et chaque pas de seek recule de 1 ms puis avance pour se stabiliser. Ainsi, chaque image doit être une fonction pure de son temps. Tout ce qui dépend de ce qui a été rendu avant, de l'horloge ou du hasard est rendu différemment dans chaque worker, et le résultat est un élément manquant sur une image sur trois.

Ce bogue est invisible dans l'aperçu Studio (qui joue dans l'ordre) et dans les captures uniques. Dans la production d'où proviennent ces compétences, c'était le seul défaut qui parvenait au relecteur : le titre d'ouverture « bégayant et clignotant » pendant ses sept premières secondes.

Linter d'abord

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

Il lit index.html, src/*.tpl et les *.js à côté (scripts inline uniquement), affiche fichier:ligne: sévérité RÈGLE: raison ainsi que la correction, et se termine avec le code 1 en cas d'erreur (--strict fait aussi échouer les avertissements, --json pour les outils). Exécutez-le après chaque modification de la timeline et avant chaque rendu. Il est statique : il ne peut pas voir les variables calculées à l'exécution (il les compte comme « non vérifiables ») ni deux tweens se chevauchant dans le temps. Ceux-ci restent à votre charge, avec la reproduction ci-dessous. qa.py (render-qa) l'exécute également et signale un échec dans le rapport en cas d'erreur.

Les règles, et pourquoi chacune existe

  1. Toute clé dans les fromVars d'un fromTo apparaît aussi dans ses toVars (SS001, erreur). Lorsque l'image d'un worker tombe exactement sur le début d'un tween, le pas de 1 ms en arrière ramène le tween à avant son début, et une clé qui n'existe que dans fromVars n'est jamais réécrite. Le tween du titre était fromTo(sel, {yPercent: 110, opacity: 1}, {yPercent: 0}) : opacity: 1 ne vivait que dans fromVars, donc un worker a gardé le titre à une opacité de 0 pour le reste du tween. Écrivez {yPercent: 110, opacity: 1} à {yPercent: 0, opacity: 1}, ou un tl.set() suivi d'un tl.to(). Il en va de même pour startAt dans un to() (SS002).
  2. immediateRender: false sur chaque fromTo après le temps 0 (SS003, avertissement). Sinon, le tween écrit ses valeurs de départ lors de la construction de la timeline, écrasant ce que les tweens précédents ont défini, et un seek au milieu de la timeline part d'un mauvais état.
  3. Préférer fromTo à from (SS004, avertissement). Un from() se termine sur ce qu'était l'élément au moment de la construction ; une fois que des tweens antérieurs touchent l'élément, les workers ne sont plus d'accord.
  4. Ne jamais animer display ou visibility (SS005, erreur). Ils ne peuvent pas être interpolés ; ils basculent à un point arbitraire du tween. Modifiez-les avec un tl.set() de durée nulle à un moment explicite, et fondez avec opacity ou autoAlpha.
  5. Pas d'horloge, pas de hasard, pas de minuteurs (SS006, erreur) : pas de Date, performance.now(), Math.random(), setTimeout, setInterval ou requestAnimationFrame pour quoi que ce soit de visible. Une gigue de dactylographie ou une forme d'onde utilise un générateur à graine ; un minuteur d'appel affiché à l'écran est calculé à partir de tl.time() dans le onUpdate de la timeline.
  6. Une seule timeline en pause, enregistrée, jamais jouée (SS007, SS011, SS012). Créez-la avec gsap.timeline({ paused: true }), construisez-la complètement (à l'intérieur de document.fonts.ready lorsque les positions dépendent des métriques de texte), et seulement ensuite assignez window.__timelines["<id de la composition>"] = tl. Enregistrer une timeline vide avant la fin de la construction rend une vidéo vierge ; tl.play() entre en conflit avec les seeks du moteur de rendu.
  7. Les défilements sont des fromTo avec un début et une fin explicites afin que chaque worker calcule le même décalage, limité au contenu réel pour qu'aucune ligne ou icône ne s'arrête net.
  8. Jamais deux tweens sur la même propriété du même élément en même temps. Une réinitialisation de curseur qui tombait à l'intérieur du déplacement suivant laissait le pointeur au mauvais endroit après un seek. Non linté : vérifiez le tableau de temporisation de la build.
  9. Animer les transformations, pas la mise en page (SS009, avertissement) : x, y, scale, clip-path au lieu de left, top, width, margin. Les tweens de mise en page refondent chaque image et hyperframes check les signale comme gsap_non_transform_motion. Un changement de largeur court sur un contrôle produit réel (un panneau latéral qui s'agrandit) peut être accepté lorsqu'il reproduit le produit.
  10. Ne jamais tween un élément .clip (SS010, erreur). HyperFrames contrôle la visibilité d'un clip via data-start et data-duration ; animez un wrapper à l'intérieur.
  11. Répétitions finies (SS008, avertissement). repeat: -1 n'est autorisé que sous une data-duration racine finie ; calculez un compte avec Math.max(0, Math.floor(span / period) - 1).
  12. Définir chaque état initial explicitement au temps 0. Un helper qui fait gsap.set(sel, vars) devrait aussi faire tl.set(sel, vars, 0), afin que le retour au temps 0 restaure la première image au lieu de conserver le dernier état rendu par un worker.

Reproduire un bogue suspect avant le rendu

Le lint détecte des motifs ; une capture prouve des pixels. Pour un tween suspect commençant à t0 :

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

L'image à t0 + 0.3 doit être identique dans a et b. Si elle diffère, le passage par le début du tween a changé l'état. Pour rejouer exactement un worker, faites des snapshots des images 0, 3, 6, ... dans cet ordre jusqu'à juste après le tween. Bissectez en réduisant de moitié la plage temporelle jusqu'à ce qu'il ne reste qu'un tween. Après le rendu, scan_render.py (render-qa) signale le même bogue comme une exécution WORKER PATTERN : des images aberrantes qui partagent toutes un même index d'image modulo 3.

Références

  • references/patterns.md : code avant et après pour chaque règle, les helpers qui maintiennent un template sûr (lineIn, init, dactylographie, défilements, clics curseur) et ce que le lint peut et ne peut pas voir. Lisez-le lors de l'écriture d'un nouveau helper ou de la correction d'une constatation du 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.

Skills associés