--- name: claude-design-hyperframes description: Use when running inside Claude Design specifically. Produces a valid, brand-accurate HyperFrames video draft using pre-valid skeletons. For Claude Code / Cursor / Codex, use the `hyperframes` skill instead. --- # Claude Design + HyperFrames (Template-First) Your medium is **HyperFrames compositions**: plain HTML + CSS + a paused GSAP timeline. The CLI (`npx hyperframes render index.html`) turns the HTML into an MP4. You author the HTML -- the user renders locally. **HyperFrames replaces your default video-artifact workflow.** Do NOT call `copy_starter_component`, do NOT invoke the built-in "Animated video" skill, do NOT use React/Babel. Plain HTML + GSAP only. --- ## Your role **You produce a valid first draft -- not a final render.** Your strengths are visual identity, layout, and brand-accurate content decisions. You are not a motion design tool -- you're a rapid prototyping tool that produces structurally valid HyperFrames projects. The user's workflow: 1. **Claude Design** (you) -- brand identity, scene content, layout, first-pass animations, shader choices 2. **Download ZIP** -- user gets a valid HyperFrames project 3. **Claude Code** (or any AI coding agent) -- animation polish, timing refinement, pacing, production QA with linting and live preview Your output must be a **valid starting point that Claude Code can open and immediately work with** -- no structural fixes needed, just creative refinement. ### What you optimize for (your strengths) - Correct brand identity from attachments (palette, typography, tone) - Strong visual layout per scene (hierarchy, spacing, readability) - Scene content that tells the story (headlines, stats, copy, imagery) - Structural validity (passes `npx hyperframes lint` with zero errors) - Appropriate shader transition choices for the mood - Reasonable scene count and durations for the video type ### What Claude Code polishes after you (refinement, not creation) You create ALL the animations, transitions, and mid-scene activity. Every scene ships with entrance tweens, breathing motion, and shader transitions. The video plays with full motion from your first draft. What Claude Code does is **watch the full playthrough with reliable preview tools and fine-tune**: - Ease curve tweaks (swapping `power3.out` for `expo.out` after seeing it play) - Stagger timing adjustments (0.12 → 0.08 feels tighter for this specific scene) - Scene duration micro-adjustments (scene 4 drags at 4.5s, trim to 3.8s) - Adding richer mid-scene activity where a scene feels too static after playback - Shader swaps (this `cinematic-zoom` should be `whip-pan` for the energy shift) - Production QA (snapshot verification, cross-browser testing) Think of it as: **you create the first cut of the film, Claude Code does the edit bay refinement.** --- ## How this works You get a **pre-valid skeleton** that already passes the HyperFrames linter. Your job: 1. Read the brief, pick a skeleton 2. Fill in the palette + typography (CSS custom properties) 3. Fill in scene content (text, layout inside `.scene-content`) 4. Fill in GSAP animations (timeline blocks marked per scene) 5. Verify the preview, deliver the ZIP The skeleton handles the structural rules -- data attributes, timeline registration, HyperShader wiring, initial visibility, `preview.html` token forwarding. You focus on the creative work. **What you can change:** CSS custom properties, scene content, animation tweens, scene count (add/remove scenes following the rules below), shader choices, durations. **What you must not touch:** The ` ``` ### README.md (universal -- swap ``) ````markdown # A HyperFrames video composition. Plain HTML + GSAP; rendered to MP4 by the `hyperframes` CLI. ## Requirements - **Node.js 22+** -- [nodejs.org](https://nodejs.org/) - **FFmpeg** -- `brew install ffmpeg` (macOS) or `sudo apt install ffmpeg` (Debian/Ubuntu) or [ffmpeg.org/download](https://ffmpeg.org/download.html) (Windows) Verify: `npx hyperframes doctor` ## Preview ```bash npx hyperframes preview ``` Opens the HyperFrames Studio at `http://localhost:3002` with frame-accurate scrubbing. ## Refine with Claude Code This project was drafted in Claude Design. To polish animations, timing, and pacing: ```bash npx skills add heygen-com/hyperframes # install HyperFrames skills (one-time) npx hyperframes lint # verify structure (should pass with zero errors) npx hyperframes preview # open the studio for live feedback ``` Then open in Claude Code and iterate: - "Make scene 3's entrance snappier" - "Add a counter animation to the stat in scene 5" - "Tighten the pacing -- scenes 4 and 6 feel too long" - "Change the shader on transition 3 to glitch" ## Render ```bash npx hyperframes render index.html -o output.mp4 ``` 1920x1080 / 30fps by default. Use `--fps 60` or `--resolution 3840x2160` to override. ```` ### Skeleton A -- Social Reel (1080x1920, 15s, 6 scenes) Transition plan: s1→s2 hard cut, s2→s3 hard cut, **s3→s4 SHADER** (hero reveal), s4→s5 hard cut, s5→s6 hard cut. One shader at the midpoint. ```html
``` ### Skeleton B -- Launch Teaser (1920x1080, 25s, 8 scenes) Transition plan: s1→s2 hard cut, s2→s3 hard cut, s3→s4 hard cut, **s4→s5 SHADER** (hero reveal), **s5→s7 SHADER** (energy shift, s6 plays as runtime-managed interstitial), **s7→s8 SHADER** (CTA landing). 3 shaders out of 7 cuts. ```html
``` ### Skeleton C -- Product Explainer (1920x1080, 45s, 12 scenes) Use the same structure as Skeleton B but with 12 scene divs (s1-s12), data-duration totaling 45s, and 11 transitions. Adjust scene durations: mix 3s, 3.5s, 4s, and 5s scenes based on content density. Include a scene rhythm like: `3-3-4-3.5-4-5-3.5-4-3.5-4-4-3.5`. ### Skeleton D -- Cinematic Title (1920x1080, 60s, 7 scenes) Use the same structure with 7 scene divs (s1-s7), longer durations (6-10s each), fewer transitions (6), and more restrained shaders (`cross-warp-morph`, `thermal-distortion`). Scene rhythm: `8-7-8-10-9-10-8`. --- ## Section 8: Common animation patterns Copy-paste these. They appear in every production composition. ### Counter animation ```js var counterObj = { v: 0 }; tl.to( counterObj, { v: 1900000000000, duration: 2.0, ease: "power2.out", onUpdate: function () { document.getElementById("s3-stat").textContent = "$" + (counterObj.v / 1e12).toFixed(1) + "T"; }, }, 10.5, ); ``` ### SVG stroke draw ```html ``` ```js tl.to("#s2-line", { strokeDashoffset: 0, duration: 1.0, ease: "power2.out" }, 3.5); ``` ### Character stagger ```html

NOR TH

``` ```js tl.from( ".char", { y: 60, autoAlpha: 0, duration: 0.5, ease: "power3.out", stagger: { each: 0.12, from: "start" }, }, 29.5, ); ``` ### Breathing float (mid-scene activity) ```js tl.to( "#s4-logo", { y: -5, duration: 1.5, ease: "sine.inOut", yoyo: true, repeat: 1, }, 15.0, ); ``` ### Bar chart fill ```js ["#bar1", "#bar2", "#bar3", "#bar4"].forEach(function (sel, i) { tl.from( sel, { scaleY: 0, transformOrigin: "bottom", duration: 0.6, ease: "expo.out", }, 11.0 + i * 0.15, ); }); ``` ### Orbit / rotation ```js tl.to( "#orbit-dot", { rotation: 360, duration: 3.0, ease: "none", transformOrigin: "50% 200px", }, 8.5, ); ``` ### Highlight sweep (background-size animation) ```css #s5-headline { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 85% / 0% 30%; } ``` ```js tl.to("#s5-headline", { backgroundSize: "100% 30%", duration: 0.6, ease: "power2.out" }, 22.0); ``` ### CSS radial-gradient grain (safe for Safari + Claude Design iframe) ```css .grain { position: absolute; inset: 0; pointer-events: none; z-index: 50; opacity: 0.18; background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.2px), radial-gradient(rgba(0, 0, 0, 0.18) 1px, transparent 1.2px); background-size: 3px 3px, 5px 5px; background-position: 0 0, 1px 2px; mix-blend-mode: overlay; } ``` **NEVER use SVG filter `data:image/svg+xml` grain** -- it taints html2canvas in Safari, breaking every shader transition in Claude Design's cross-origin iframe. --- ## References (fetch only when needed) Everything critical is inlined above. These are for edge cases: - Core composition contract (data attributes, sub-comp wiring): https://github.com/heygen-com/hyperframes/blob/main/skills/hyperframes/SKILL.md - Motion theory (easing as emotion, direction rules): https://github.com/heygen-com/hyperframes/blob/main/skills/hyperframes/references/motion-principles.md - Typography (full banned list, weight contrast, OpenType): https://github.com/heygen-com/hyperframes/blob/main/skills/hyperframes/references/typography.md - Transitions (shader catalog, CSS transition patterns): https://github.com/heygen-com/hyperframes/blob/main/skills/hyperframes/references/transitions.md - Captions synced to audio: https://github.com/heygen-com/hyperframes/blob/main/skills/hyperframes/references/captions.md - Full docs: https://hyperframes.heygen.com/