This Skill is a HyperFrames animation knowledge base. It directs an agent to select rules, blueprints, transitions, and runtime adapters; the default is to combine 2–4 rules on one paused GSAP timeline.
View source
78All motion knowledge in one skill: **rules** (atomic recipes), **blueprints** (multi-phase scene templates), **transitions** (scene-to-scene), **techniques** (broader motion-design patterns), and **adapters** (per-runtime APIs).9
1314Pick 2-4 rules from `rules-index.md`, glue them together with a single paused GSAP timeline, done. This is faster and produces less code than starting from a blueprint.15
The bundled animation-map tool packages the selected composition, starts a local file server and browser capture session, enumerates timeline animations, and writes the audit result to animation-map.json.
View source
5859// Raw modular hosts do not mount child compositions in the capture helper.60// Bundle first so duration/timeline discovery sees the same DOM as render/check.61const bundle = await bundleCompositionForCapture(packages["@hyperframes/core/compiler"], COMP_DIR);62let server;63let session;64try {65 server = await createFileServer({66 projectDir: COMP_DIR,67 compiledDir: bundle.compiledDir,68 port: 0,69 });70 // Canonical transient-init retry/cleanup (mirrors the render pipeline's
8687 const duration = await getCompositionDuration(session);88 const tweens = await enumerateTweens(session);89 const kept = tweens.filter((tw) => tw.end - tw.start >= MIN_DUR);90
154 report.deadZones = findDeadZones(report.density, duration);155 report.snapshots = await captureSnapshots(session, report.tweens, duration);156157 await writeFile(join(OUT_DIR, "animation-map.json"), JSON.stringify(report, null, 2));158
The generated map contains the composition’s absolute path plus positions, dimensions, and opacity for page elements carrying IDs. The shown code stores this in a local report, which can reveal project structure or interface layout to anyone later given that report.
View source
9091 const report = {92 composition: COMP_DIR,93 duration,94 totalTweens: tweens.length,95 mappedTweens: kept.length,96 skippedMicroTweens: tweens.length - kept.length,97 tweens: [],98 };99
575 await seekTo(session, t);576 const visible = await session.page.evaluate(() => {577 const out = [];578 const els = document.querySelectorAll("[id]");579 for (const el of els) {580 const cs = getComputedStyle(el);581 if (cs.display === "none") continue;582 const opacity = parseFloat(cs.opacity);583 if (opacity < 0.01) continue;584 const rect = el.getBoundingClientRect();585 if (rect.width < 1 || rect.height < 1) continue;586 out.push({587 id: el.id,588 x: Math.round(rect.x),589 y: Math.round(rect.y),590 w: Math.round(rect.width),591 h: Math.round(rect.height),592 opacity: +opacity.toFixed(2),593 });594 }
The rules require seekable, deterministic animation and prohibit unseeded randomness, wall-clock time, infinite repeats, and layout-property tweens. These constraints reduce rendering variance but do not govern dependency installation or remote script loading.
View source
89- runs on ONE **paused** GSAP timeline registered on `window.__timelines` (never autoplay, never a second timeline);10- is **seek-safe both directions**: `fromTo` with explicit from-states (t=0 correct under seek; `immediateRender: false` when re-owning a target), absolute values — never relative `+=` tweens; state readable as a pure function of timeline time, no mutable trackers;11- is **deterministic**: no `Math.random()`, no `Date.now()` — index-derived pseudo-random and baked schedules only; finite repeats, never `repeat: -1`;12- animates **transforms and paint-only properties** — `width`/`height`/`top`/`left` tweens are forbidden (use scale/translate proxies, masks, or `anchored-layout-expand`);13- caps group staggers so an arrival reads as one beat (`items × stagger ≤ ~0.5s`);14- puts **no CSS `transition`** on animated elements (they interpolate independently of seek and flicker) and hints compositors with `will-change: transform` where many tweens run at once;15- measures DOM (`offsetHeight`, `getBoundingClientRect`) at build time only in a **single-scene** composition — in a multi-scene montage, later clips may not be laid out yet: use authored CSS-matched constants;16- lives inside a standard scene clip per `hyperframes-core` (`class="clip"` + `data-*` timing) — rule snippets show mechanism DOM only, not the scene scaffold.
This Skill mainly provides HyperFrames animation rules, blueprints, transitions, and runtime adapters, and routes analysis of existing compositions to a script.
View source
78All motion knowledge in one skill: **rules** (atomic recipes), **blueprints** (multi-phase scene templates), **transitions** (scene-to-scene), **techniques** (broader motion-design patterns), and **adapters** (per-runtime APIs).910For the composition contract (data attributes, sub-compositions, determinism) see `hyperframes-core`.11
30| Read one blueprint's full recipe | `blueprints/<id>.md` |31| Author a scene transition (CSS-driven, between two clips) | `transitions/overview.md`, `transitions/catalog.md` |32| Look up a broader motion-design technique | `techniques.md` |33| Analyze an existing composition's animation map | `scripts/animation-map.mjs` |34| GSAP API — timeline / tweens / position parameters | `adapters/gsap.md` |35| GSAP — drop-in effect recipes | `rules/gsap-effects.md` |
When helper packages are missing, the loader displays the npm command and asks for terminal confirmation; non-interactive use requires an explicit confirmation variable. Installation disables lifecycle scripts, uses a newly created temporary directory, and removes that directory after the run.
View source
295296async function confirmBootstrap(packageSpecs) {297 if (process.env[BOOTSTRAP_CONFIRM_ENV] === "1") return;298299 const installLine = `npm install --ignore-scripts --no-save ${packageSpecs.map(shellQuote).join(" ")}`;300 if (!process.stdin.isTTY) {301 throw new Error(302 [303 "Required helper package(s) are missing.",304 "To allow a one-time temporary dependency bootstrap for this run, set:",305 ` ${BOOTSTRAP_CONFIRM_ENV}=1`,306 "The bootstrap command will be:",307 ` ${installLine}`,308 ].join("\n"),309 );310 }311312 const rl = createInterface({ input: process.stdin, output: process.stderr });313 try {314 const answer = await rl.question(315 [316 "HyperFrames helper package(s) are missing.",317 `Run a temporary install with lifecycle scripts disabled?`,318 ` ${installLine}`,319 "Proceed? [y/N] ",320 ].join("\n"),
341342function bootstrapWithNpmInstall(packageNames) {343 const installRoot = mkdtempSync(join(tmpdir(), "hyperframes-skill-deps-"));344 const installResult = spawnSync(345 process.platform === "win32" ? "npm.cmd" : "npm",346 [347 "install",348 "--silent",349 "--no-audit",350 "--no-fund",351 "--ignore-scripts",352 "--no-save",353 "--prefix",354 installRoot,355 ...packageNames,356 ],357 { stdio: "inherit" },358 );359360 if (installResult.error) throw installResult.error;361 if (installResult.status !== 0) {362 rmSync(installRoot, { recursive: true, force: true });363 process.exit(installResult.status ?? 1);364 }365366 const args = [...process.argv.slice(1)];367 const result = spawnSync(process.execPath, args, {368 stdio: "inherit",369 env: {370 ...process.env,371 [BOOTSTRAP_ENV]: "1",372 [NODE_MODULES_ENV]: join(installRoot, "node_modules"),373 },374 });375376 rmSync(installRoot, { recursive: true, force: true });377 if (result.error) throw result.error;
Some adapters and examples have generated HTML fetch and execute pinned Anime.js, Three.js, or GSAP code directly from jsDelivr in the browser.
View source
7576```html77<script type="module">78 import { animate } from "https://cdn.jsdelivr.net/npm/animejs@4.5.0/+esm";7980 const anim = animate(".chip", { x: "18rem", duration: 900, autoplay: false });81
128129**Load Three.js and post-processing via ESM (use a `type="module"` script):**130131```html132<script type="module">133 import * as THREE from "https://cdn.jsdelivr.net/npm/three@0.181.2/+esm";134 import { EffectComposer } from "https://cdn.jsdelivr.net/npm/three@0.181.2/examples/jsm/postprocessing/EffectComposer.js";135 import { RenderPass } from "https://cdn.jsdelivr.net/npm/three@0.181.2/examples/jsm/postprocessing/RenderPass.js";136 import { ShaderPass } from "https://cdn.jsdelivr.net/npm/three@0.181.2/examples/jsm/postprocessing/ShaderPass.js";137 import { UnrealBloomPass } from "https://cdn.jsdelivr.net/npm/three@0.181.2/examples/jsm/postprocessing/UnrealBloomPass.js";138 // ... rest of composition code using these imports139</script>
6162 <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>63
This Skill is an animation knowledge base for HyperFrames. It directs an agent to choose among rules, scene blueprints, transitions, and runtime adapters, with a default of composing 2–4 rules on one paused GSAP timeline.
View source
78All motion knowledge in one skill: **rules** (atomic recipes), **blueprints** (multi-phase scene templates), **transitions** (scene-to-scene), **techniques** (broader motion-design patterns), and **adapters** (per-runtime APIs).910For the composition contract (data attributes, sub-compositions, determinism) see `hyperframes-core`.1112## Default: compose atomic rules1314Pick 2-4 rules from `rules-index.md`, glue them together with a single paused GSAP timeline, done. This is faster and produces less code than starting from a blueprint.15
The supplied examples directly create DOM nodes, measure layout, and register a global timeline that HyperFrames can seek. These are runnable implementations rather than visual descriptions alone.
View source
243 ================================================================ */244 window.__timelines = window.__timelines || {};245 const tl = gsap.timeline({ paused: true });246 window.__timelines["main"] = tl;247248 {249 /* Measure the brand text width with a hidden DOM probe. */250 const probe = document.createElement("span");251 probe.className = "measure-probe";252 probe.style.font = `700 ${BRAND_FONT_SIZE}px "Google Sans", "Roboto", Inter, system-ui, sans-serif`;253 probe.style.whiteSpace = "pre";254 probe.style.lineHeight = "1";255 probe.textContent = "Hyperframes"; // MUST match the rendered .brand-text casing256 document.body.appendChild(probe);257 const brandTextWidth = probe.getBoundingClientRect().width;258 probe.remove();259
The Skill emphasizes deterministic rendering by prohibiting random values, autonomous requestAnimationFrame loops, and wall-clock timing, and by requiring GPU completion to be registered before event handling returns.
View source
176177## Deterministic Rendering178179- No `Math.random()` — use a seeded PRNG.180- Do not use an autonomous `requestAnimationFrame` simulation loop. Render in response to `hf-seek`; HyperFrames owns the paused-presentation heartbeat and may re-present the same time.181- No `performance.now()` for animation time — read `window.__hfTypegpuTime` or `e.detail.time`.182- Register GPU completion with `e.detail.waitUntil(device.queue.onSubmittedWorkDone())` before the event listener returns.183
In addition to authoring guidance, the Skill instructs users or agents to run two project commands to check Anime.js compositions.
View source
116117## Validation118119After editing a composition that uses Anime.js:120121```bash122npx hyperframes lint123npx hyperframes validate124```125
The Skill is presented as a HyperFrames motion-authoring reference and directs the agent to select 2–4 indexed rules and combine them into one paused GSAP timeline.
View source
1---2name: hyperframes-animation3description: "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). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic."4---
1112## Default: compose atomic rules1314Pick 2-4 rules from `rules-index.md`, glue them together with a single paused GSAP timeline, done. This is faster and produces less code than starting from a blueprint.15