Communitygithub.com

josueh04/product-video-skills

Reglas de animación que evitan que los workers de renderizado paralelo de HyperFrames pierdan, parpadeen o destellen elementos, más un lint estático (lint_motion.py) que encuentra las violaciones en la plantilla de un vídeo antes de que cueste un render. Úsalo siempre que escribas o edites tweens de GSAP, líneas de tiempo, cursores, movimientos de cámara, escritura, desplazamientos o ventanas emergentes en una composición de HyperFrames o en src/template.tpl, siempre que un render muestre parpadeo, tartamudeo, un elemento que desaparece en algunos fotogramas, un título que destella, o una línea "WORKER PATTERN" de scan_render.py o qa.py, y siempre que la vista previa se vea bien pero el MP4 no. También úsalo para revisar el código de la línea de tiempo de otra persona antes de renderizar.

¿Qué es product-video-skills?

Este conjunto de habilidades está diseñado para desarrolladores que usan HyperFrames, un sistema de renderizado de vídeo basado en navegador que utiliza workers paralelos para generar fotogramas. El problema central que aborda es que los tweens de GSAP (una biblioteca de animación JavaScript) pueden comportarse de manera impredecible cuando se buscan (seek) en lugar de reproducirse en orden, lo que provoca que elementos desaparezcan o parpadeen en fotogramas específicos. La herramienta principal es un linter estático (`lint_motion.py`) que analiza el código de la plantilla del vídeo para detectar violaciones de 12 reglas específicas, como asegurar que todas las claves en `fromTo` también estén en `toVars`, evitar animaciones de `display` o `visibility`, y no usar reloj, azar o temporizadores. También proporciona comandos para reproducir errores sospechosos y enlaces a documentación de referencia. La habilidad es compatible con el agente Claude Code y se activa automáticamente cuando se detectan patrones de animación o errores de renderizado en proyectos de HyperFrames.

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

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Movimiento seguro para búsqueda (seek-safe motion)

HyperFrames no reproduce la línea de tiempo. La busca (seek): para cada fotograma, el renderizador establece la línea de tiempo en el tiempo de ese fotograma y captura la página. Con HyperFrames 0.8.x, esto se hace con tres workers en paralelo, cada uno tomando cada tercer fotograma, y cada paso de búsqueda retrocede 1 ms y luego avanza para estabilizarse. Por lo tanto, cada fotograma debe ser una función pura de su tiempo. Cualquier cosa que dependa de lo que se representó antes, del reloj o del azar, se renderiza de manera diferente en cada worker, y el resultado es un elemento que falta en cada tercer fotograma.

Ese error es invisible en la vista previa del Studio (que reproduce en orden) y en instantáneas individuales. En la producción de la que provienen estas habilidades, fue el único defecto que llegó al revisor: el título de apertura "tartamudeaba y destellaba" durante sus primeros siete segundos.

Lint primero

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

Lee index.html, src/*.tpl y los *.js junto a ellos (solo scripts en línea), imprime archivo:línea: severidad REGLA: por qué más la corrección, y sale con 1 en caso de error (--strict hace que las advertencias también fallen, --json para herramientas). Ejecútalo después de cada edición en la línea de tiempo y antes de cada render. Es estático: no puede ver variables calculadas en tiempo de ejecución (las cuenta como "no comprobables") ni dos tweens que se superponen en el tiempo. Esos quedan bajo tu responsabilidad, con la reproducción a continuación. qa.py (render-qa) también lo ejecuta y falla el informe si hay un error.

Las reglas y por qué existe cada una

  1. Cada clave en fromVars de un fromTo también aparece en sus toVars (SS001, error). Cuando el fotograma de un worker cae exactamente en el inicio de un tween, el retroceso de 1 ms revierte el tween a antes de que comenzara, y una clave que solo existe en fromVars nunca se vuelve a escribir. El tween del título era fromTo(sel, {yPercent: 110, opacity: 1}, {yPercent: 0}): opacity: 1 vivía solo en fromVars, por lo que un worker mantuvo el título con opacidad 0 durante el resto del tween. Escribe {yPercent: 110, opacity: 1} a {yPercent: 0, opacity: 1}, o un tl.set() seguido de un tl.to(). Lo mismo aplica para startAt dentro de un to() (SS002).
  2. immediateRender: false en cada fromTo después del tiempo 0 (SS003, advertencia). De lo contrario, el tween escribe sus valores iniciales cuando se construye la línea de tiempo, sobrescribiendo lo que establecieron tweens anteriores, y una búsqueda en medio de la línea de tiempo comienza desde el estado incorrecto.
  3. Prefiere fromTo a from (SS004, advertencia). Un from() termina en el estado en que estaba el elemento en el momento de la construcción; una vez que tweens anteriores tocan el elemento, los workers no se ponen de acuerdo sobre eso.
  4. Nunca animar display o visibility (SS005, error). No se pueden interpolar; cambian en un punto arbitrario del tween. Cámbialos con un tl.set() de duración cero en un tiempo explícito y desvanece con opacity o autoAlpha.
  5. Sin reloj, sin azar, sin temporizadores (SS006, error): nada de Date, performance.now(), Math.random(), setTimeout, setInterval o requestAnimationFrame para nada visible. Un jitter de escritura o una forma de onda usa un generador con semilla; un temporizador de llamada mostrado en pantalla se calcula desde tl.time() dentro del onUpdate de la línea de tiempo.
  6. Una línea de tiempo en pausa, registrada, nunca reproducida (SS007, SS011, SS012). Créala con gsap.timeline({ paused: true }), constrúyela completamente (dentro de document.fonts.ready cuando las posiciones dependan de las métricas de texto), y solo entonces asigna window.__timelines["<id de composición>"] = tl. Registrar una línea de tiempo vacía antes de que termine la construcción renderiza un vídeo en blanco; tl.play() lucha contra las búsquedas del renderizador.
  7. Los desplazamientos son fromTo con inicio y fin explícitos para que cada worker calcule el mismo desplazamiento, limitado al contenido real para que ninguna línea o icono se detenga en un borde.
  8. Nunca dos tweens en la misma propiedad del mismo elemento a la vez. Un restablecimiento del cursor que cayó dentro del siguiente movimiento dejó el puntero en el lugar equivocado después de una búsqueda. No se verifica con lint: verifica la tabla de tiempos de la compilación.
  9. Animaciones de transformación, no de diseño (SS009, advertencia): x, y, scale, clip-path en lugar de left, top, width, margin. Los tweens de diseño refluyen cada fotograma y hyperframes check los marca como gsap_non_transform_motion. Un cambio breve de ancho en un control de producto real (una barra lateral que se expande) puede aceptarse cuando reproduce el producto.
  10. Nunca animar un elemento .clip (SS010, error). HyperFrames controla la visibilidad de un clip a través de data-start y data-duration; anima un contenedor dentro de él.
  11. Repeticiones finitas (SS008, advertencia). repeat: -1 solo se permite bajo un data-duration raíz finito; calcula un recuento con Math.max(0, Math.floor(span / period) - 1).
  12. Establece cada estado inicial explícitamente en el tiempo 0. Un helper que hace gsap.set(sel, vars) también debería hacer tl.set(sel, vars, 0), para que buscar de vuelta a 0 restaure el primer fotograma en lugar de mantener el último estado que renderizó un worker.

Reproducir un error sospechoso antes de renderizar

El lint encuentra patrones; una instantánea demuestra píxeles. Para un tween sospechoso que comienza en t0:

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

El fotograma en t0 + 0.3 debe ser idéntico en a y b. Si difiere, buscar a través del inicio del tween cambió el estado. Para reproducir exactamente un worker, toma instantáneas de los fotogramas 0, 3, 6, ... en ese orden hasta justo después del tween. Bisecciona dividiendo el rango de tiempo a la mitad hasta que quede un solo tween. Después del renderizado, scan_render.py (render-qa) informa el mismo error como una ejecución de WORKER PATTERN: fotogramas atípicos que todos comparten un índice de fotograma módulo 3.

Referencias

  • references/patterns.md: código antes y después para cada regla, los helpers que mantienen segura una plantilla (lineIn, init, escritura, desplazamientos, clics del cursor) y lo que el lint puede y no puede ver. Léelo al escribir un nuevo helper o corregir un hallazgo del 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 relacionados