[ skills ]
hyperframes-shorts
Plan, interview, script, build, and visually verify code-driven short-form videos (TikTok, Instagram Reels, YouTube Shorts, X) using HyperFrames (HTML, CSS, Canvas, GSAP). Use whenever the user asks to create a vertical or short-form video in HyperFrames, replicate an animated coding/dev video without a traditional video editor, build a HyperFrames video with an AI coding agent, set up TikTok/Reels safe zones and word-synced captions, or wants a guided workflow that asks clarifying questions before writing video code.
npx skills add OmarAlex24/skills --skill hyperframes-shorts agents: claude-code · codex · cursor · opencode · antigravity
HyperFrames Shorts
Build code-driven short-form videos (TikTok, Reels, Shorts, X) with HyperFrames that look intentional, respect mobile safe zones, sync tightly to voiceover, and pass visual verification before you render the final MP4.
Most agent-generated videos fail for the same three reasons: the agent starts coding before clarifying what the user actually wants, guesses layout without platform safe zones, and renders blind without looking at a single frame. This skill fixes all three.
Language rule (mandatory): Always match the language the user is speaking in (for example, reply, interview, draft scripts, and write on-screen copy in Spanish if the user writes in Spanish — unless the user explicitly asks for another language for the video itself). Keep CLI commands and technical identifiers as-is, and never default to English just because this
SKILL.mdis written in English.
Companion to the official HyperFrames skills. Install or refresh the official contract first (
npx hyperframes skills update) so/hyperframesis loaded for framework-level rules (window.__timelines,data-start, deterministic rendering). Never install skills silently — tell the user if/hyperframesis missing.
Step 1: Interview the user first (mandatory)
Do not write index.html, generate voiceover, or scaffold animations until you clear up the unknowns.
Ask the user one compact, easy-to-answer set of questions (use your native question/choice tool if available, or a short numbered list in chat). Keep it brief — 5 to 6 focused questions max:
- One core idea & goal: What is the single thing a viewer should remember after 30–50 seconds? (Tool demo, launch/comparison, engineering story, or quick how-to?)
- Platform & format: Vertical 9:16 (
1080×1920for TikTok / Reels / Shorts — default) or horizontal 16:9 (1920×1080for X / YouTube)? - Visual direction & brand:
- Minimal dark editorial with 1 accent color,
- Dynamic 2.5D/3D perspective panels & procedural Canvas motion, or
- Your own brand colors/fonts?
- What
@handle(if any) should appear on screen?
- Voice, language & audio: Human voice recording, TTS (ElevenLabs / Vercel AI Gateway / other), or no voice (text + music/SFX)? What language and target pace? Want subtle procedural micro-SFX under the voice?
- Real captures vs pure code: Do you have real screen recordings, screenshots, or terminal sessions to show, or should every visual be coded in HTML/CSS/Canvas/GSAP?
- Verified facts & CTA: Are there benchmarks, prices, dates, or CLI commands that must be cited from official sources (zero invented numbers)? What should the ending point to (save, link/repo, next video)?
Smart defaults (when the user says “decide tú” / “use defaults”)
| Decision | Default |
|---|---|
| Format | Vertical 9:16 (1080×1920, 30 fps) |
| Duration | 35–48 s (~115–155 words at ~200 wpm) |
| Visual palette | High-contrast dark background (#111311), off-white text (#ECEDE7), 1 accent color |
| Typography | Clean geometric sans for UI/titles + monospace strictly for real code/terminal |
| Subtitles | Max 2 lines, word-synced active highlight, dedicated bottom band |
| Audio | Voiceover normalized to -16 LUFS + optional deterministic micro-SFX at -35 LUFS |
Step 2: Pre-flight check
Before scaffolding, verify the local toolchain (tell the user only what is missing):
node -v(Node 22+)ffmpeg -versionandffprobe -version- HyperFrames CLI (
npx hyperframes --version) - Chrome headless (
npx hyperframes browser ensure) - Official
/hyperframesskill available (npx hyperframes skills update)
Step 3: Lock the hook, script, and sources before coding
Present 2–3 hook options and a scene-by-scene table (Voice vs On-Screen Visual) and wait for the user’s approval before spending TTS credits or writing animation code.
Script rules that hold retention
- One idea per video. Anything that doesn’t serve that idea goes to a future video.
- Hook under 3 seconds:
<= 9–10 wordsat ~200 wpm. Visible on frame0(becomes the cover/thumbnail). No greetings (“Hey guys”, “Hola amigos”), no full-screen intro logos, no AI clichés (“Did you know…?”, “In the world of…”). - Voice tells a story; the screen shows the technicals. Keep CLI commands, flags, file paths, JSON snippets, and URLs written cleanly on screen — never make the narrator read
npx ... --flagaloud. - Honest sources: Every benchmark, price, version, or capability shown must come from an official page, repo, or user-provided measurement. Keep a short
fuentes.mdmapping claims to sources when citing external numbers or third-party benchmarks.
Word budget reference (~200 wpm)
| Target length | Words (without long pauses) |
|---|---|
| ~30 s | 95–105 |
| ~40–45 s | 130–155 |
| ~60 s | 190–205 |
Step 4: Audio-first timing (measure before animating)
If the video has voiceover, produce or ingest the final audio first and extract word-level timestamps (e.g., local Parakeet via npx hyperframes models install parakeet, or Whisper) before writing timeline cues.
- Normalize voiceover to
-16 LUFS(stereo WAV,48 kHz). - Anchor every scene transition, highlight, terminal reveal, and micro-SFX directly to the real word timestamps — never guess seconds by eye.
- If adding procedural micro-SFX (clicks, whooshes, pops, thumps), synthesize them deterministically (seeded PRNG, no
Math.random()) pre-attenuated around-35 LUFS(peaks<= -18 dBFS) so they never fight the voice.
Step 5: Layout, safe zones, and HyperFrames contract
Vertical 9:16 (1080×1920) safe zones
TikTok, Reels, and Shorts cover the top bar, bottom caption area, and the right-hand action column. Enforce these hard bounds:
- Top safe margin: nothing important above
y = 220. - Bottom safe margin: nothing important below
y = 1420. - Right action column: below
y = 840, keep all important text and UI atx <= 900. - Dedicated subtitle band:
x = 180..900,y = 1232..1390, max 2 lines, never overlapping terminal/code windows or device frames. Keep all focal panels/devices abovey = 1210.
Calm, readable mobile craft
- One focal visual at a time. Never stack a terminal behind a phone or throw three windows on screen at once. Transition cleanly between beats.
- Visible change every ~2 s, never static > 3 s (outside subtitles) — let real motion inside the visual (typing, chart interpolation, 2.5D camera drift, highlight sweeps) carry the movement instead of frantic cuts.
- Phone-readable sizing: at
1080pxcanvas width, keep body labels>= 26–28 pxand code lines>= 26–32 px. If you cannot read it at 30% zoom, make it bigger or show fewer lines.
HyperFrames deterministic rules
- Register one paused root GSAP timeline on
window.__timelines["<composition-id>"]. Child timelines added to it must not be paused. - Every timed scene uses
class="clip"withdata-startanddata-duration. Never animatevisibilityorautoAlphaon.clipelements directly (animate inner containers instead). - 100% deterministic & offline-safe: bundle fonts (
.ttf/.woff2), GSAP, SVGs, and audio locally insideassets/— zero remote CDNs, zeroMath.random(), zeroDate.now(). - Keep visual assets honest: use official brand SVGs unmodified when referencing a tool/lab, and never fabricate terminal output or fake benchmark charts.
Step 6: Self-verify visually (never render blind)
Run this exact loop before presenting a video to the user:
# 1. Automated contract check (lint, runtime, layout, motion, contrast)
npx hyperframes check
# 2. Render key PNG frames across every scene and transition
npx hyperframes snapshot --at 0,2.5,6,12,18,24,30,38,44
- Fix every error reported by
hyperframes check(aim for0errors in Lint, Runtime, Layout, Motion, and Contrast). - Open and visually inspect every snapshot PNG. Check for:
- Text clipped, wrapped awkwardly, or colliding with subtitles.
- Anything leaking outside safe zones (
y < 220,y > 1420, orx > 900belowy = 840). - Low-contrast code or unreadable small labels at mobile scale.
- Blank frames between scene crossfades.
- Iterate until clean, then render a fast draft for the user to review:
npx hyperframes render --output salida/borrador.mp4 --video-frame-format png --quality draft - Once the user approves the draft, render the final master:
npx hyperframes render --output salida/final.mp4 --video-frame-format png --quality high
Checklist before finishing
- User questions answered (or defaults confirmed) before writing code.
- Hook is visible on frame 0 and finishes speaking before
3.0 s. - Zero CLI commands or URLs read aloud awkwardly in voiceover (all written on screen).
- All claims, metrics, and prices verified against sources.
-
npx hyperframes checkpasses with0errors. - Key
snapshotPNGs visually inspected at mobile readability. - Draft MP4 reviewed before
--quality highfinal render.