Hyperframes video composition

From calesthio/generative-media-skills · View interactive version

Hyperframes video composition is an AI agent skill from the GitHub repository calesthio/generative-media-skills. Provider-independent production workflow for AI agents assembling generated or source media into HyperFrames HTML/CSS/JS videos. Use for HyperFrames composition planning, scene architecture, media custody, animation/timing, captions/audio, deterministic preview/render QA, accessibility/flashing chec

How to use this skill

Skill file

HyperFrames video composition

Use this skill when the job is to assemble images, clips, narration, music, captions, UI captures, generated assets, or brand material into a finished HyperFrames video. Treat HyperFrames as a production composition runtime, not just a code target: the agent owns intake, the frame/design spec, media custody, timing, QA, provenance, and handoff.

This skill is provider-independent. It does not choose the image, video, TTS, or music model for you. It tells you how to turn approved assets and creative decisions into a deterministic HTML/CSS/JS/HyperFrames composition.

Source status

Documented facts below are grounded in these sources, verified 2026-07-11 unless noted:

Volatile facts: HyperFrames CLI commands, package names, Node/FFmpeg requirements, registry block names, cloud render support, browser capture behavior, platform delivery specs, and social platform safe areas can change. Re-check the installed package docs, npx hyperframes --help, npx hyperframes doctor, and target-platform delivery docs at production time.

Production stance

Separate three kinds of information in your own notes and client updates:

Escalate rather than guess when the issue is rights, licensing, privacy, likeness, client brand approval, platform policy, medical/legal/financial claims, political persuasion, regulated ads, or unverified provenance. Do not provide legal advice; identify the risk and ask for client, counsel, platform, or rights-holder approval.

1. Intake: lock the composition contract

Before authoring HTML, produce a short composition brief with these fields:

If the request is still ambiguous, ask only for choices that materially change the result: target duration, aspect ratio/platform, narration vs. text-led, brand/style references, and whether source assets are approved for use.

2. Design the frame before the timeline

HyperFrames compositions are browser frames captured into video. Design for a camera, not a scrolling page.

Create a frame/design spec before coding:

For platform deliverables, reserve safe areas for UI overlays and captions. Treat platform safe-area dimensions as volatile; re-check the target platform's current creator/ad specs before final crop and delivery.

3. Scene architecture

Plan the piece as timed scenes and layers. A useful scene plan includes:

Prefer a small number of strong scenes over many thin cuts. For social or launch work, build the first 1-2 seconds as a true hook; do not spend the opening on a logo unless the brief requires it.

4. HyperFrames authoring contract

Documented HyperFrames facts:

Authoring rules:

Example root shape:

<main id="stage" data-composition-id="launch-hero" data-start="0" data-width="1920" data-height="1080">
  <section class="scene scene-01 clip" data-start="0" data-duration="5" data-track-index="0">
    <video class="bg clip" data-start="0" data-duration="5" data-track-index="0" src="./assets/hero-loop.mp4" muted playsinline></video>
    <h1 id="headline" class="clip" data-start="0.4" data-duration="3.8" data-track-index="2">Ship the impossible demo</h1>
    <p id="subline" class="clip" data-start="1.2" data-duration="3" data-track-index="2">A launch reel assembled from approved product captures.</p>
  </section>

  <audio data-start="0" data-duration="5" data-track-index="10" data-volume="0.45" src="./assets/music-bed.wav"></audio>

  <script src="./vendor/gsap.min.js"></script>
  <script>
    const tl = gsap.timeline({ paused: true });
    tl.from("#headline", { opacity: 0, y: 48, duration: 0.55, ease: "power3.out" }, 0.4);
    tl.from("#subline", { opacity: 0, y: 24, duration: 0.45, ease: "power2.out" }, 1.2);
    window.__timelines = window.__timelines || {};
    window.__timelines["launch-hero"] = tl;
  </script>
</main>

Use this as an example of structure, not a mandatory template.

5. Media import and custody

Every asset that enters the composition needs an asset record before it is referenced by HTML.

Minimum asset manifest fields:

Empirical production checks:

6. Timeline, duration, aspect, and fps

Treat time as an audited contract:

Safe production heuristic: leave at least 5-10% of frame width/height as action-safe margin for important text and logos unless target-platform specs require a larger safe area. For vertical social, reserve extra space for captions and platform UI overlays after checking current platform specs.

7. Animation and transitions

HyperFrames rewards seekable, frame-deterministic animation.

Use animation to clarify hierarchy:

Good motion patterns:

Avoid:

For transitions, choose the semantic type:

8. Typography, layout, and captions

Text is often the main visual asset in HyperFrames.

Typography rules:

Accessibility and legibility facts from WCAG 2.2:

Caption production:

9. Audio, stems, and synchronization

Build audio as stems, not as one mystery file:

For each stem, record source, rights, duration, loudness/normalization if measured, sample rate, and scene links. If narration is generated, store script text, voice/provider/model/version/settings, and approval status.

Browser/media facts:

Production heuristics:

10. Deterministic preview, validation, and render

Run the HyperFrames loop as a gate sequence:

  1. Run the bundled static preflight when you need a dependency-free local check of explicit timing attributes before starting browser work: python scripts/audit_timeline.py index.html --duration 30 --fps 30.
  2. npx hyperframes doctor to verify environment when starting or when render behavior changes.
  3. npx hyperframes lint for HyperFrames-native static composition findings.
  4. npx hyperframes validate when available in the installed CLI or project workflow; do not rely on render alone for browser-state issues.
  5. npx hyperframes preview and scrub representative frames: first frame, scene boundaries, dense text, data/chart moment, caption-heavy moment, background-video scenes, CTA/disclaimer, and final frame.
  6. Render only after lint/validation and preview checks pass or documented exceptions are approved.
  7. Post-render probe: duration, resolution, fps, codec/container, audio streams, frame samples, black/frozen frames, clipped text, caption sync, and audible mix.

Bundled static timeline preflight

This package includes scripts/audit_timeline.py, a Python 3.11+ stdlib CLI for preflighting local HyperFrames composition HTML. It parses HTML with html.parser; it does not execute JavaScript, drive a browser, fetch remote assets, evaluate CSS layout, inspect animation timelines, decode media, or prove render correctness.

Use it before HyperFrames lint/validate/preview when you want a stable JSON inventory of elements with timing attributes and deterministic static findings for:

The command emits sorted JSON with status, summary, inventory, and findings. Findings use stable severity, code, element, location, and message fields. Exit codes are 0 for no errors, 2 for static findings at error severity or warnings promoted by --warnings-as-errors, and 3 for parse or operational failure such as a missing or unreadable input file. Treat warnings as production review items unless the project requires frame-perfect timing gates.

This preflight is an early guardrail only. It cannot replace npx hyperframes lint, npx hyperframes validate, browser preview/scrubbing, render, post-render media probe, or human QA. HyperFrames may also add runtime-specific rules that this static preflight intentionally does not know.

If the installed CLI differs from these command names, re-check npx hyperframes --help and use the equivalent commands. Record the exact command, package version, and environment in the render report.

For video-heavy compositions, reduce parallelism/workers if headless Chrome or media decode stalls. Treat this as an empirical fix: record what failed, what changed, and the before/after result.

11. Browser/render QA checklist

Before final delivery, review:

Classify findings:

Do not ship with critical findings. Ship with major findings only if the client explicitly accepts the tradeoff.

12. Provenance ledger and content credentials

C2PA defines Content Credentials/C2PA manifests as provenance data that can bind assertions, claims, signatures, and ingredients to an asset. Not every workflow or platform preserves embedded credentials, so maintain both:

Minimum ledger rows:

If a source asset claims provenance but validation fails, do not silently treat it as authenticated. Mark the validation failure and escalate if the claim affects trust, newsworthiness, compliance, or client approval.

13. Delivery handoff

Provide a delivery packet, not just an MP4:

For platform uploads, re-check current target specs just before export: aspect, max duration, file size, codec, audio requirements, caption sidecars, safe areas, disclosure labels, and ad policy. Treat these as volatile facts.

14. Example: narrated product launch reel

Example intent: create a 30-second 16:9 launch reel from approved product captures, generated abstract backgrounds, narration, music, and open captions.

Approach:

  1. Intake locks 1920x1080, 30 fps, 30 seconds, MP4, open captions, approved product screenshots, brand colors, no unapproved customer logos.
  2. Frame spec defines a product/device zone on the right, kinetic headline zone on the left, caption rail at the bottom, and a CTA safe from platform overlays.
  3. Scene plan:
  1. Asset manifest stores screenshots, generated background loops, narration stem, music stem, caption file, font files, checksums, and approvals.
  2. HTML uses timed sections, relative asset paths, bounded GSAP timelines, muted playsinline background video, and separate caption elements.
  3. QA gates run doctor/lint/validate/preview/render/probe and specifically check UI legibility, caption rail, no customer-logo leaks, and safe flashing.

Expected failure modes:

15. Example: music-led kinetic typography sting

Example intent: create an 8-second square or vertical social sting with no narration, synced to an approved music hit.

Approach:

  1. Analyze the music stem for beat accents or manually mark beat times.
  2. Build a sparse frame spec: large type, one accent color, strong negative space, and no small text.
  3. Use the timeline as the script: each text reveal lands on a beat; transitions are short and bounded.
  4. Use captions only if there are vocals or meaningful spoken words; otherwise include a short title/description sidecar for accessibility where required by the destination.
  5. Run a flashing check because beat-synced cuts can accidentally exceed safe flash thresholds.

Expected failure modes:

16. Example: generated-media explainer assembly

Example intent: assemble AI-generated stills/video clips, narration, captions, diagrams, and music into a 60-second explainer.

Approach:

  1. Treat generated assets as ingredients with full prompts, model/version/settings, seeds when available, and approvals.
  2. Build scenes around claims, not assets. Each scene needs a takeaway and one dominant visual idea.
  3. Use HyperFrames for the editorial layer: animated titles, diagram labels, callouts, captions, transitions, audio mix, and final QA.
  4. Keep a transcript and caption file even if captions are burned into the video.
  5. Flag factual claims, synthetic depictions of real people/events, medical/legal/financial claims, and copyrighted/reference-derived visuals for approval.

Expected failure modes:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.