Communitygithub.com

HyperFrames Core — Composição de Projeto Next.js

O contrato de composição do HyperFrames — construa um projeto renderizável. Use para estrutura de composição, atributos `data-*` de temporização, `class="clip"`, faixas, sub-composições, variáveis, reprodução de mídia gerenciada pelo framework, regras de renderização determinística e validação. Leia antes de escrever HTML de composição.

O que é HyperFrames Core — Composição de Projeto Next.js?

HyperFrames Core define o contrato técnico para construir projetos de composição no ecossistema HyperFrames, renderizando vídeo a partir de HTML. A habilidade detalha como estruturar um arquivo de composição, utilizando atributos `data-*` para temporização, classes CSS como `clip`, faixas (tracks) e sub-composições. Inclui regras rigorosas de renderização determinística, como a proibição de clocks em tempo de execução, `Math.random` sem semente, ou `repeat: -1`, garantindo que a linha do tempo seja buscável. A habilidade também cobre a reprodução de mídia (vídeo/áudio) gerenciada pelo framework, validação via CLI e práticas para editar composições existentes. É suportada em plataformas como Claude Code, Cursor, Codex e GitHub Copilot, e integra-se com animações GSAP, Lottie e Three.js através de adaptadores.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/1345AbhishekKumar/starter-nextjs/tree/HEAD/.agents/skills/hyperframes-core

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

HyperFrames Core

O HyperFrames renderiza vídeo a partir de HTML. Uma composição é um arquivo HTML cujo DOM declara temporização com atributos data-*, cujo runtime de animação é buscável (seekable), e cuja reprodução de mídia é gerenciada pelo framework.

Esta habilidade é o contrato técnico — como construir um projeto HyperFrames. O corpo abaixo é o guia de construção; detalhes por tópico estão em references/ (índice a seguir), leia sob demanda. Outras preocupações ficam nas habilidades irmãs de domínio — hyperframes-animation, hyperframes-creative, hyperframes-media, hyperframes-cli, hyperframes-registry. O mapa de capacidades em /hyperframes informa o que cada uma cobre.

Referências

ArquivoLeia para…
references/minimal-composition.mdcomeçar do menor esqueleto de composição renderizável
references/composition-patterns.mdescolher monolítico vs modular; estruturar um index.html modular; escolher um arquétipo de sub-comp
references/data-attributes.mdconsultar qualquer data-* (raiz / clip / host de sub-comp / aliases legados); usar class="clip"
references/tracks-and-clips.mdescolher data-track-index, lidar com sobreposição/z-index na mesma faixa, temporizar um clip relativo a outro
references/sub-compositions.mdconectar uma sub-composição (atributos do host, <template>, variáveis por instância) e animar dentro dela
references/variables-and-media.mddeclarar variáveis; posicionar <video>/<audio>, definir volume, cortar (trim)
references/determinism-rules.mdconstruir uma linha do tempo buscável; proibições de determinismo; lista de propriedades animáveis; layout / ajuste de texto
references/full-screen-motion.mdcriar movimento de quadro completo com fundos compartilhados
references/storyboard-format.mdescrever um plano STORYBOARD.md (+ o manifesto analisado)
references/script-format.mdescrever a narração travada opcional SCRIPT.md
references/subagent-dispatch.mdmapear verbos de despacho de subagente (fan-out paralelo / background / espera) para seu harness
references/tailwind.mdtrabalhar em um projeto Tailwind v4 (init --tailwind; contrato de runtime difere do Studio v3)

Para especificidades do runtime de animação (API GSAP, Lottie, Three.js, etc.), vá para hyperframes-animation → adapters/<runtime>.md.

Construindo uma composição

Duas formas raiz (não intercambiáveis)

  • Autônoma (top-level index.html) — root <div data-composition-id="…"> fica diretamente no <body>, sem wrapper <template> (encapsular esconde todo o conteúdo e quebra a renderização).
  • Sub-composição (carregada via data-composition-src) — root deve estar encapsulada em <template>.

⚠ Regra de transporte: o runtime apenas clona o conteúdo de <template>; tudo fora (incluindo estilos/scripts de <head>) é descartado — coloque <style>/<script> dentro do template. ⚠ Regra de ID do host: o data-composition-id do slot host deve ser exatamente igual ao data-composition-id do template interno e à chave window.__timelines["<id>"] — sem sufixo -mount/-slot/-host.

Formato do arquivo, conexão do host e checklist pré-renderização → references/sub-compositions.md.

A raiz deve ter tamanho definido (bug silencioso de layout)

A raiz autônoma precisa de uma caixa dimensionada explicitamente (width/height em px), e cada ancestral até um elemento com height:100% deve ter altura resolvida — caso contrário, um filho flex/100% colapsa para ~0 e o conteúdo se empilha no canto superior esquerdo. lint/validate/inspect não capturam isso. Esqueleto → references/minimal-composition.md.

Uma linha do tempo pausada

Cada composição registra exatamente uma gsap.timeline({ paused: true }) em window.__timelines["<id>"] (chave = root data-composition-id), construída sincronamente ao carregar a página. Duração da renderização = root data-duration, não o comprimento da timeline. Não aninhe manualmente sub-timelines no host. Contrato completo (incluindo runtimes não-GSAP) → references/determinism-rules.md + hyperframes-animation/adapters/.

Regras inegociáveis (bugs silenciosos que lint/validate/inspect não capturam)

Expostas aqui; justificativa completa na referência vinculada. Não viole:

  • Sem clocks em tempo de renderização / Math.random sem semente / rede / estado de entrada; sem repeat: -1 (use uma contagem finita). → determinism-rules.md
  • Anime apenas a lista de propriedades visuais permitidas; nunca display/visibility; sem gsap.set em clips de cenas posteriores. → determinism-rules.md
  • Sem <br> no texto do corpo; elementos transformados devem ser de nível bloco + dimensionados; decorações absolutas pulsantes precisam de folga de pico. → determinism-rules.md
  • <video>/<audio> deve ser filho direto da raiz do host (nunca dentro de um <template>/wrapper de sub-comp); o framework é dono da reprodução. → variables-and-media.md
  • Cada id deve ser único em toda a página montada; dentro de uma sub-comp, prefixe ids com o id da composição (#<id>-hero). ids duplicados de <video>/<img> renderizam em branco — o produtor injeta quadros via getElementById, e duplicatas entre arquivos passam despercebidas pelo lint. → composition-patterns.md
  • Um preenchimento de cena em tela cheia vai em um filho de sangria total (position:absolute; inset:0), nunca na raiz da composição — a composição de quadros do produtor pode descartar o background do próprio elemento raiz (o quadro renderiza preto) mesmo que a prévia/snapshot mostre corretamente. → composition-patterns.md

Editando composições existentes

  • Leia os arquivos primeiro. Preserve temporização, faixas, IDs, variáveis, caminhos de mídia não relacionados.
  • Corresponda IDs de composição e chaves de timeline existentes.
  • Adicionando um clip: escolha um data-track-index não sobreposto ou ajuste a temporização circundante intencionalmente.
  • Adicionando uma sub-composição: verifique seu data-composition-id interno antes de conectar o host.

Validação

Use hyperframes-cli para detalhes de comandos

  • npx hyperframes lint passa (0 erros)
  • npx hyperframes validate passa (0 erros no console)
  • npx hyperframes inspect passa (0 erros)
  • Projetos com sub-composições: npx hyperframes snapshot --at <midpoints> e inspecione visualmente cada quadro
  • npx hyperframes preview para revisão (o usuário pode editar qualquer coisa na timeline do Studio)
  • npx hyperframes render apenas após aprovação do usuário

Individual skills in this repo

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

1345AbhishekKumar/starter-nextjs

Add captions to a talking-head video. ONE catalog (CATALOG.md) of 32 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.

1345AbhishekKumar/starter-nextjs

The fallback workflow for authoring custom HyperFrames video compositions at any length or format — longer or multi-scene pieces, brand / sizzle reels, montages, title cards, static loops, and freeform compositions. Input- and length-agnostic. If a specialized workflow clearly fits the input — a marketed product, a website, a topic explainer, a GitHub PR, existing footage, a short motion graphic, or a Remotion port — prefer it (see /hyperframes); use this only as the general fallback when none fit.

1345AbhishekKumar/starter-nextjs

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). HyperFrames-native: single paused timeline, seek-safe, deterministic.

1345AbhishekKumar/starter-nextjs

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

1345AbhishekKumar/starter-nextjs

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

1345AbhishekKumar/starter-nextjs

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

1345AbhishekKumar/starter-nextjs

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

1345AbhishekKumar/starter-nextjs

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

1345AbhishekKumar/starter-nextjs

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

1345AbhishekKumar/starter-nextjs

turn a product or marketing URL, pasted script, or brief into a product launch video, including SaaS promos, feature reveals, app launches, company promos, and product marketing videos. Use this skill when the user wants to market, launch, promote, or reveal a product. Do not use it for general non-launch website tours, non-product topic explainers, GitHub pull requests, captioning existing footage, or short unnarrated motion graphics. If the intent is unclear, route through /hyperframes first. This is the new shot-sequence architecture: every visual frame is authored as a time-coded shot sequence picked from a menu of golden blueprints, so frames develop over their full duration instead of freezing after entrance.

1345AbhishekKumar/starter-nextjs

turn a GitHub pull request (a PR URL like github.com/<owner>/<repo>/pull/<N>, an <owner>/<repo>#<N> ref, or 'this PR' in a checked-out repo) into a code-change explainer video, up to ~3 min (sweet spot 30-90s) — changelog, feature reveal, fix, or refactor walkthrough, rendered from the diff / commits / files. The input is a CODE CHANGE read via the gh CLI; there is no website capture. Use this skill for a GitHub PR. Do not use it for a product launch/promo (use /product-launch-video), a tour of a real website (use /website-to-video), a topic explainer with no PR (use /faceless-explainer), captions on existing footage (use /embedded-captions), or a short unnarrated motion graphic (use /motion-graphics). If the intent is unclear, route through /hyperframes first.

1345AbhishekKumar/starter-nextjs

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

1345AbhishekKumar/starter-nextjs

Capture a general website/URL and turn it into a HyperFrames video (site tour, showcase, or social clip from the site's own visuals). Uses headless Chrome screenshots + brand assets. Use when intent is general — portfolio/blog/landing-page showcase or social clip from the site. NOT for: product/SaaS launch or promo (→ /product-launch-video, even from a URL); topic explainer with no site (→ /faceless-explainer); GitHub PR (→ /pr-to-video); adding captions to existing video (→ /embedded-captions); short unnarrated page-highlight motion graphic (→ /motion-graphics). Unclear launch-vs-general-site? Ask one question or start at /hyperframes.

Habilidades Relacionadas