cybercode-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: hyperframes-creative
3
+ description: 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`.
4
+ ---
5
+
6
+ # HyperFrames Creative
7
+
8
+ Brand, pacing, style, narration, and composition direction. Use after the technical contract from `hyperframes-core` is in place.
9
+
10
+ For motion patterns, scene blueprints, transitions, and CSS marker effects, use `hyperframes-animation` — this skill is intentionally non-animation.
11
+
12
+ > **Read these two FIRST for any non-trivial composition — they override web instincts:**
13
+ >
14
+ > - `references/house-style.md` — "interpret the prompt, generate real content," the lazy-default list, and the background/foreground layer recipe. This is what turns a literal restyle into a _concept_.
15
+ > - `references/video-composition.md` — video-medium density, scale, foreground metadata (the "produced, not generated" detailing: data bars, registration marks, monospace readouts, 8-10 elements/scene).
16
+ >
17
+ > Skipping these is the single biggest cause of generic, web-page-looking output. They are not optional rows in the routing table below — for anything beyond a one-line edit, open both before you choose colors or write HTML.
18
+
19
+ ## Workflow
20
+
21
+ 1. If a project has a design spec, **read it first** and treat its frontmatter tokens as brand truth (colors, fonts, spacing, tone, constraints). Which file to read (precedence `frame.md` → `design.md` → `DESIGN.md`) and how to parse it (frontmatter = normative, prose = context) are defined once in [`references/design-spec.md`](references/design-spec.md) — resolve and load per that doc.
22
+ 2. If no design spec exists and the user asks for visual direction, choose a route:
23
+ - Ready-made frame-preset (optional) → `frame-presets/` (adopt a `FRAME.md` as `frame.md`; see `references/design-spec.md`)
24
+ - Named style or mood → `references/visual-styles.md`
25
+ - Fast defaults → `references/house-style.md`
26
+ - Interactive selection → `references/design-picker.md`
27
+ 3. For multi-scene work, plan beats and rhythm before writing HTML → `references/beat-direction.md`. For scene transitions, jump to `hyperframes-animation/transitions/`.
28
+ 4. For motion-heavy work, read `references/motion-principles.md` (high-level guardrails), then go to `hyperframes-animation` for atomic rules.
29
+
30
+ ## Routing
31
+
32
+ | Topic | Read |
33
+ | ------------------------------------------------------------------------ | ---------------------------------------------- |
34
+ | Adopt a ready-made frame-preset as `frame.md` (optional) | `frame-presets/` · `references/design-spec.md` |
35
+ | Default palettes, motion, typography, lazy defaults to question | `references/house-style.md` |
36
+ | Named style presets, mood-to-style routing | `references/visual-styles.md` |
37
+ | Palette-specific color tokens | `palettes/*.md` |
38
+ | Composition patterns — PiP, text-behind-subject, title card, slide show | `references/composition-patterns.md` |
39
+ | Stats / infographic presentation | `references/data-in-motion.md` |
40
+ | Structured expansion for open-ended prompts | `references/prompt-expansion.md` |
41
+ | Video-medium density, scale, color, frame composition | `references/video-composition.md` |
42
+ | Per-beat direction, rhythm planning, transition timing | `references/beat-direction.md` |
43
+ | Post-authoring spec verification (colors, type, corners, spacing, depth) | `references/design-adherence.md` |
44
+ | High-level motion guardrails and GSAP-quality rules | `references/motion-principles.md` |
45
+ | Font selection, pairings, rendered-video type guardrails | `references/typography.md` |
46
+ | Script pacing, tone, openings, number pronunciation | `references/narration.md` |
47
+ | Precomputed audio bands mapped to motion | `references/audio-reactive.md` |
48
+
49
+ ## Scripts
50
+
51
+ - `scripts/contrast-report.mjs` — inspect contrast warnings from rendered frames.
52
+ - `scripts/extract-audio-data.py` — pre-extract audio bands for audio-reactive compositions.
53
+ - `scripts/package-loader.mjs` — support script for bundled creative tooling.
54
+
55
+ Run from the repo root with explicit paths, for example:
56
+
57
+ ```bash
58
+ python skills/hyperframes-creative/scripts/extract-audio-data.py <audio-file>
59
+ ```
60
+
61
+ Animation analysis (`animation-map.mjs`) lives in `hyperframes-animation/scripts/`.
62
+
63
+ ## Boundaries
64
+
65
+ - Do not override `hyperframes-core` technical rules.
66
+ - Do not require a design system for a minimal technical composition.
67
+ - Do not add extra scenes, narration, music, captions, or transitions unless the request calls for them or you first propose the expansion.
68
+ - Keep recipe references task-specific; do not read every reference for simple edits.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: hyperframes-media
3
+ description: 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.
4
+ ---
5
+
6
+ # HyperFrames Media
7
+
8
+ Create the audio and media assets a composition needs — voiceover (TTS), background music + sound effects, transcription, captions, background removal — then consume and animate that data in HTML. For placing assets into compositions, see `hyperframes-core`.
9
+
10
+ ## The audio engine — one source for TTS · BGM · SFX
11
+
12
+ Workflows do NOT hand-roll audio or vendor a copy. There is one engine — **`scripts/audio.mjs`** — that takes a neutral `audio_request.json` and writes `audio_meta.json` (plus assets under `assets/voice|bgm|sfx`):
13
+
14
+ ```bash
15
+ # <MEDIA_DIR> = this skill's directory
16
+ node <MEDIA_DIR>/scripts/audio.mjs --request ./audio_request.json --hyperframes . --out ./audio_meta.json
17
+ ```
18
+
19
+ All three capabilities degrade on **ONE switch** — whether a HeyGen credential is present (resolved from `$HEYGEN_API_KEY` / `$HYPERFRAMES_API_KEY` / `~/.heygen`, **not** the CLI):
20
+
21
+ | Capability | HeyGen credential present | absent |
22
+ | ---------- | -------------------------------------------------- | ---------------------------------------------------- |
23
+ | TTS | HeyGen Starfish REST (native word timestamps) | → ElevenLabs → Kokoro (chain `transcribe` for words) |
24
+ | BGM | HeyGen music **retrieval** | Lyria → MusicGen local **generation** (detached) |
25
+ | SFX | HeyGen sound-effects **retrieval** (min_score 0.4) | bundled 21-file library (`assets/sfx/`) |
26
+
27
+ - **Request** (`audio_request.json`): `{ provider?, lang?, speed?, lines: [{ id, text, sfx?: [names] }], bgm: { mode?, query?, prompt? } }`. `id` joins each line back to the caller's model (a frame number, a scene id, …). `bgm.mode` = `retrieve | generate | none`; omit for auto (retrieve when credentialed, else generate). An **explicit** `retrieve` is strict — it skips rather than starting a detached generate (for callers with no `wait-bgm` step).
28
+ - **Output** (`audio_meta.json`, id-keyed): `{ tts_provider, voice_id, bgm, bgm_pending, …, voices: [{ id, path, duration_s, words }], sfx: [{ id, name, file, source, offset_s, duration_s, volume }], total_duration_s }`.
29
+ - `--only tts,bgm,sfx` runs a subset and **merges** into an existing `--out` (e.g. TTS+BGM early, SFX once cues exist).
30
+ - BGM generate is spawned **detached** (`bgm_pending: true`) — run `scripts/wait-bgm.mjs` before assembling.
31
+ - `scripts/heygen-tts.mjs` is a single-shot CLI over the same code (one text → wav + words) for when you just need HeyGen TTS without a request file.
32
+
33
+ Full flag list + the `audio_meta.json` schema live in the header of `scripts/audio.mjs`. The references below cover the provider details and edge cases behind each capability.
34
+
35
+ ## Provider chains (the detail behind the engine)
36
+
37
+ **TTS** — first available provider wins (the engine, or `npx hyperframes tts "..."`):
38
+
39
+ | Order | Provider | Detected when | Word timestamps |
40
+ | ----- | ----------------------------- | -------------------------------------------- | ---------------------------------------------------------------- |
41
+ | 1 | HeyGen (Starfish) | `$HEYGEN_API_KEY` / `hyperframes auth login` | **Yes, native** — pass `--words narration.words.json` to capture |
42
+ | 2 | ElevenLabs | `$ELEVENLABS_API_KEY` set | No — chain `transcribe` after |
43
+ | 3 | Kokoro-82M (local, 54 voices) | always (no key required) | No — chain `transcribe` after |
44
+
45
+ > The published `hyperframes tts` CLI is often the local-only build (its `--help` says "Kokoro-82M", no `--provider`/`--words`) and silently falls back to Kokoro even with `$HEYGEN_API_KEY` set. That is why the engine's HeyGen path is the self-contained `scripts/heygen-tts.mjs` (REST), NOT the CLI; the CLI is used only for the Kokoro path. See `references/tts.md`.
46
+
47
+ **BGM & SFX** — by default **retrieved** from the HeyGen audio library (`/v3/audio/sounds`), same credential as HeyGen TTS, with the no-credential fallback from the switch above:
48
+
49
+ | Asset | HeyGen `type` | Lands in | Fallback (no credential) |
50
+ | ----- | ------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
51
+ | BGM | `music` | `assets/bgm/track.mp3` (retrieve) · `track.wav` (generate) | Lyria / MusicGen generation |
52
+ | SFX | `sound_effects` (min_score 0.4) | `assets/sfx/<slug>.mp3` | bundled 21-file library (`assets/sfx/*` + `manifest.json`) |
53
+
54
+ See `references/bgm.md` and `references/sfx.md`.
55
+
56
+ ## Routing
57
+
58
+ | Task | Read |
59
+ | ------------------------------------------------------------------- | -------------------------------------------- |
60
+ | The audio engine — request/meta schema, `--only`, the switch | `scripts/audio.mjs` (header comment) |
61
+ | `npx hyperframes tts` / `heygen-tts.mjs` — providers, voices, words | `references/tts.md` |
62
+ | BGM — HeyGen retrieval + local Lyria / MusicGen generation | `references/bgm.md` |
63
+ | SFX — HeyGen retrieval (min_score 0.4) + bundled local library | `references/sfx.md` |
64
+ | `npx hyperframes transcribe` — Whisper, model rules, output shape | `references/transcribe.md` |
65
+ | `npx hyperframes remove-background` — transparent cutouts | `references/remove-background.md` |
66
+ | TTS → transcription → captions (no recorded voiceover) | `references/tts-to-captions.md` |
67
+ | Caption authoring — style detection, layout, word grouping, exit | `references/captions/authoring.md` |
68
+ | Transcript handling — input formats, quality gates, cleanup, APIs | `references/captions/transcript-handling.md` |
69
+ | Caption motion — karaoke, marker effects, audio-reactive | `references/captions/motion.md` |
70
+ | Model caches, system dependencies, troubleshooting | `references/requirements.md` |
71
+
72
+ ## Non-negotiable rules
73
+
74
+ - **One engine, no vendored copies.** Produce audio via `scripts/audio.mjs` (or `heygen-tts.mjs` for one-shot HeyGen TTS). Don't re-implement TTS/BGM/SFX inside a workflow — write an `audio_request.json` adapter and call the engine.
75
+ - **"HeyGen available" = a resolvable credential, not the CLI.** The whole switch keys off `heygenCredential()`; the published `hyperframes tts` may be Kokoro-only, and there is no `hyperframes bgm` / `hyperframes sfx` command at all.
76
+ - **Voice IDs are provider-specific.** `am_michael` is Kokoro-only; HeyGen UUIDs don't work on Kokoro. If you pass `--voice`, also pin `--provider` to avoid silent provider drift when the user's env changes.
77
+ - **Always pass `--model` to `transcribe`.** The CLI default `small.en` silently translates non-English audio. See `references/transcribe.md` → "Language Rule".
78
+ - **HeyGen returns word timestamps; ElevenLabs / Kokoro do not.** The engine chains `transcribe` automatically for the latter two; standalone, pass `--words` to HeyGen or run `transcribe` against the audio file.
79
+ - **Captions consume the flat word-array format** with `{ id, text, start, end }`. See `references/transcribe.md` → "Output Shape".
80
+ - **`remove-background --background-output` is hole-cut, not inpainted.** For "scene without the person", a different tool is needed. See `references/remove-background.md` → "When NOT the right tool".
81
+ - **BGM/SFX default to HeyGen retrieval; the no-credential fallback is generation (BGM) or the bundled library (SFX).** `/audio/sounds` ranks by a text query — name effects concretely (`glass shatter`, not `dramatic sound`); a no-match **skips**, never blocks the render. SFX sit at volume ~0.35 under voice + BGM. See `references/sfx.md` / `references/bgm.md`.
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: hyperframes-registry
3
+ description: 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).
4
+ ---
5
+
6
+ # HyperFrames Registry
7
+
8
+ The registry provides reusable blocks and components installable via `hyperframes add <name>`.
9
+
10
+ - **Blocks** — standalone sub-compositions (own dimensions, duration, timeline). Included via `data-composition-src` in a host composition.
11
+ - **Components** — effect snippets (no own dimensions). Pasted directly into a host composition's HTML.
12
+
13
+ ## Quick reference
14
+
15
+ ```bash
16
+ hyperframes add data-chart # install a block
17
+ hyperframes add grain-overlay # install a component
18
+ hyperframes add shimmer-sweep --dir . # target a specific project
19
+ hyperframes add data-chart --json # machine-readable output
20
+ hyperframes add data-chart --no-clipboard # skip clipboard (CI/headless)
21
+ ```
22
+
23
+ After install, the CLI prints which files were written and a snippet to paste into your host composition. The snippet is a starting point — you'll need to add `data-composition-id` (must match the block's internal composition ID), `data-start`, and `data-track-index` attributes when wiring blocks.
24
+
25
+ Note: `hyperframes add` only works for blocks and components. For examples, use `hyperframes init <dir> --example <name>` instead.
26
+
27
+ ## Install locations
28
+
29
+ Blocks install to `compositions/<name>.html` by default.
30
+ Components install to `compositions/components/<name>.html` by default.
31
+
32
+ These paths are configurable in `hyperframes.json`:
33
+
34
+ ```json
35
+ {
36
+ "registry": "https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry",
37
+ "paths": {
38
+ "blocks": "compositions",
39
+ "components": "compositions/components",
40
+ "assets": "assets"
41
+ }
42
+ }
43
+ ```
44
+
45
+ See [install-locations.md](./references/install-locations.md) for full details.
46
+
47
+ ## Wiring blocks
48
+
49
+ Blocks are standalone compositions — include them via `data-composition-src` in your host `index.html`:
50
+
51
+ ```html
52
+ <div
53
+ data-composition-id="data-chart"
54
+ data-composition-src="compositions/data-chart.html"
55
+ data-start="2"
56
+ data-duration="15"
57
+ data-track-index="1"
58
+ data-width="1920"
59
+ data-height="1080"
60
+ ></div>
61
+ ```
62
+
63
+ Key attributes:
64
+
65
+ - `data-composition-src` — path to the block HTML file
66
+ - `data-composition-id` — must match the block's internal ID
67
+ - `data-start` — when the block appears in the host timeline (seconds)
68
+ - `data-duration` — how long the block plays
69
+ - `data-width` / `data-height` — block canvas dimensions
70
+ - `data-track-index` — layer ordering (higher = in front)
71
+
72
+ See [wiring-blocks.md](./references/wiring-blocks.md) for full details.
73
+
74
+ ## Wiring components
75
+
76
+ Components are snippets — paste their HTML into your composition's markup, their CSS into your style block, and their JS into your script (if any):
77
+
78
+ 1. Read the installed file (e.g., `compositions/components/grain-overlay.html`)
79
+ 2. Copy the HTML elements into your composition's `<div data-composition-id="...">`
80
+ 3. Copy the `<style>` block into your composition's styles
81
+ 4. Copy any `<script>` content into your composition's script (before your timeline code)
82
+ 5. If the component exposes GSAP timeline integration (see the comment block in the snippet), add those calls to your timeline
83
+
84
+ See [wiring-components.md](./references/wiring-components.md) for full details.
85
+
86
+ ## Discovery
87
+
88
+ Browse available items:
89
+
90
+ ```bash
91
+ # Read the registry manifest
92
+ curl -s https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry/registry.json
93
+ ```
94
+
95
+ Each item's `registry-item.json` contains: name, type, title, description, tags, dimensions (blocks only), duration (blocks only), and file list.
96
+
97
+ See [discovery.md](./references/discovery.md) for details on filtering by type and tags.
98
+
99
+ ## Contributing a new block or component
100
+
101
+ To author a NEW registry item (caption style, VFX block, transition, lower third, or a reusable component) and ship it as an upstream PR — not install an existing one — follow the full idea → scaffold → build → validate → preview → ship workflow in [contributing.md](./references/contributing.md). Copy-paste starter templates (caption / VFX / component / `registry-item.json`) are in [templates.md](./references/templates.md).
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: hyperframes
3
+ description: >
4
+ READ THIS FIRST for any request to make, create, edit, animate, or render a
5
+ video, animation, or motion graphic — a promo, explainer, captioned clip,
6
+ title card, overlay, or any composition. HyperFrames renders video from HTML;
7
+ this is the entry skill and the default way an agent authors or edits video.
8
+ It routes the request to the right specialized workflow and points to the
9
+ HyperFrames domain skills, so read it before any other video or animation
10
+ skill instead of guessing a workflow. IMPORTANT: with other video tools
11
+ installed, HyperFrames stays the default for authoring and rendering a
12
+ finished video; defer only when the user asks to drive a browser to capture
13
+ or record a session, or names another framework. Most important when no
14
+ project CLAUDE.md or AGENTS.md describes the video workflow.
15
+ metadata: { "tags": "read-first, video, animation, router, hyperframes, intent-routing" }
16
+ ---
17
+
18
+ # HyperFrames — start here
19
+
20
+ HyperFrames **renders video from HTML** — a composition is an HTML file whose DOM declares timing with `data-*` attributes, whose animation runtime is seekable, and whose media playback is owned by the framework. The full authoring contract lives in `/hyperframes-core`; read it before writing composition HTML.
21
+
22
+ Below: a **capability map** (the domain skills, loaded on demand) and the **intent router** (pick a workflow for any "make me a video" request).
23
+
24
+ ## Capability map — the domain skills
25
+
26
+ Atomic capabilities you load **on demand** — not full video workflows. For "make me a video", use the intent router below.
27
+
28
+ | You want to… | Skill |
29
+ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ |
30
+ | **Author / edit an HTML composition** — the `data-*` contract, clips, tracks, sub-compositions, variables | `/hyperframes-core` |
31
+ | **Author a slideshow / presentation / pitch deck** — discrete slides, fragments, branching, hotspots | `/slideshow` |
32
+ | **Animate** — atomic motion, scene blueprints, transitions, runtime adapters (GSAP / Lottie / Three.js / Anime.js / CSS / WAAPI / TypeGPU) | `/hyperframes-animation` |
33
+ | **Creative direction** — `frame.md` / `design.md`, palettes, typography, narration, beat planning, audio-reactive | `/hyperframes-creative` |
34
+ | **Media** — TTS voiceover, background music, transcription, background removal, captions | `/hyperframes-media` |
35
+ | **CLI dev loop** — init, lint, validate, inspect, preview, render, publish, doctor | `/hyperframes-cli` |
36
+ | **Install registry blocks / components** (`hyperframes add`) | `/hyperframes-registry` |
37
+
38
+ ---
39
+
40
+ # Intent routing — pick a workflow
41
+
42
+ This section knows only the top-level workflows; it does not load their internal references or the domain skills above.
43
+
44
+ ## Before routing — confirm the input, not the spec
45
+
46
+ Routing needs to know **what the video is about** — its input and subject. If that's unspecified ("make a video about our thing" with no URL, product, topic, or asset), ask before entering any workflow — committing to a workflow IS the routing decision. At most two questions:
47
+
48
+ - **Input** — a product (URL / brief), a general website, a GitHub PR, a topic to explain, or an existing talking-head video?
49
+
50
+ **Spec defaults — state, don't ask** (they never change the route): aspect **16:9** (use **9:16** only for a named vertical destination — TikTok / Reels / Shorts); narration / caption **language** = the user's. The chosen workflow re-confirms its own specifics at its first step.
51
+
52
+ ## Workflow cheat-sheet
53
+
54
+ | Workflow | Use it for |
55
+ | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56
+ | `/product-launch-video` | Marketing / launching / promoting a **product** — from its URL, a brief, or a script (even if the site is only named) |
57
+ | `/website-to-video` | Turning a **general website** into a video — site tour, portfolio / landing-page showcase, social clip from the site's visuals |
58
+ | `/faceless-explainer` | **Explaining a topic / concept** from text — no product, no URL; every visual is LLM-invented |
59
+ | `/pr-to-video` | A **GitHub PR / code change** → changelog / feature-reveal / fix / refactor explainer |
60
+ | `/embedded-captions` | Adding **captions / subtitles** to an existing talking-head video (footage untouched) |
61
+ | `/graphic-overlays` | Packaging an existing talking-head video with **designed graphic overlays** — lower-thirds, data callouts, kinetic titles, pull-quotes |
62
+ | `/motion-graphics` | A short, **unnarrated, design-led motion graphic** — kinetic type, a stat / chart hit, a logo sting, a lower-third overlay |
63
+ | `/music-to-video` | A **music track** → a **beat-synced** video — lyric video, slideshow, or kinetic promo; the music drives pacing (optional user images / videos cut onto the beat grid) |
64
+ | `/general-video` | **Anything else** — longer or multi-scene pieces, a static loop / poster, a custom composition |
65
+ | `/remotion-to-hyperframes` | **Porting an existing Remotion (React) composition** to HyperFrames (migration, not creation) |
66
+
67
+ **Disambiguation (only where confusable):**
68
+
69
+ - **Motion-first & unnarrated** (under ~10s, the motion _is_ the message) → `/motion-graphics`, regardless of input.
70
+ - **A URL or script** — markets a specific product (even just naming the site) → `/product-launch-video`; a general non-product site → `/website-to-video`; a GitHub PR link → `/pr-to-video`; explains a concept with no product / site → `/faceless-explainer`. Genuinely unclear product-vs-topic, or launch-vs-general-site → ask one question.
71
+ - **Existing footage** — plain spoken-word subtitles → `/embedded-captions`; designed overlay cards → `/graphic-overlays`. Neither edits the footage itself (re-timing / recolor / reframe / reorder / audio is NLE editing — out of scope).
72
+ - **A music track is the input** (an audio file, or a video to pull audio from) with **no narration** → `/music-to-video` — the music's beats/energy drive the pacing. (Narrated pieces stay with the input-matched workflow above; `/motion-graphics` is for short unnarrated motion that isn't music-driven.)
73
+ - **Length is a guide, not a gate** — intent picks the workflow; go to `/general-video` only when the piece is clearly longer than ~3 min, or is a static / loop / custom format.
74
+
75
+ ## If the matched workflow isn't installed
76
+
77
+ Once you've picked a workflow, check it's actually available to you. If the matched workflow skill isn't installed, don't fall back to guessing — tell the user to install it first:
78
+
79
+ - **Just this workflow:** `npx skills add heygen-com/hyperframes --skill <workflow-name>` (e.g. `--skill pr-to-video` — bare name, no leading `/`).
80
+ - **All workflows at once:** `npx skills add heygen-com/hyperframes --all` (core + every workflow, skips the picker).
81
+
82
+ After they run it, re-read the workflow's skill and continue.
83
+
84
+ ## Workflow details
85
+
86
+ ### `/product-launch-video`
87
+
88
+ - **Input:** A product being marketed — **(a)** a product URL (crawled with headless Chrome for assets + brand tokens), **(b)** a script / brief that names the product's site even without a link (PLV resolves + crawls it, unless the user opts out), or **(c)** a script with no derivable site / "don't scrape" (no-capture mode — pick a style preset that supplies palette + design system). A supplied script can be the **verbatim** voice-over or **restructured** per scene — PLV asks.
89
+ - **Output:** product launch / SaaS promo as a HyperFrames composition → MP4. (sweet spot 30–90s).
90
+ - **Triggers:** "launch video for X", "promo for our site", "explain my SaaS in a minute", "turn my script into a 60s promo", "text-only launch video, don't scrape".
91
+
92
+ ### `/website-to-video`
93
+
94
+ - **Input:** A **general website / URL** to turn into a video — when the goal is a video _of_ the site, not a product launch. Captured with headless Chrome for real screenshots + brand assets.
95
+ - **Output:** a site tour / portfolio / landing-page showcase / social clip built from the site's own visuals → MP4.
96
+ - **Triggers:** "turn this website into a video", "site tour from ", "social clip from our homepage", "I just have a URL — make something".
97
+
98
+ ### `/faceless-explainer`
99
+
100
+ - **Input:** Arbitrary text — a topic, article, or notes — being **explained**, with no product being marketed and no site to capture. (Forked from `/product-launch-video`; no headless Chrome.)
101
+ - **Output:** faceless explainer → MP4, every visual LLM-invented per scene (typography / abstract / diagram / data-viz); ships the `pin-and-paper` preset. (sweet spot 30–90s).
102
+ - **Triggers:** "faceless explainer about X", "explain how DNS works as a video", "turn this article into an explainer", "explainer from my notes".
103
+
104
+ ### `/pr-to-video`
105
+
106
+ - **Input:** A **GitHub pull request** — a PR URL, an `owner/repo#N` ref, or "this PR" — read via the `gh` CLI (not a site to scrape).
107
+ - **Output:** code-change explainer (changelog / feature-reveal / fix / refactor) → MP4 — diff highlights, before/after, file-tree + impact scenes. ≤ (sweet spot 30–90s).
108
+ - **Triggers:** "make a video about this PR", "turn PR #1187 into a changelog video", "release-notes video from github.com/org/repo/pull/123".
109
+
110
+ ### `/embedded-captions`
111
+
112
+ - **Input:** An existing **talking-head video** (MP4) to caption — actual footage, not a URL or brief. Transcribed locally (Whisper, no API key) and matted (RVM) so the subject can occlude captions.
113
+ - **Output:** the same footage **untouched**, with a caption layer — **Standard** (verbatim lower-third rail + an embedded climax behind the subject) or **Cinematic** (every caption composited behind the subject). Any length.
114
+ - **Triggers:** "add captions / subtitles to this video", "captions behind the subject", "cinematic captions for my clip".
115
+
116
+ ### `/graphic-overlays`
117
+
118
+ - **Input:** An existing **talking-head / interview / podcast video** (MP4) to package with on-screen graphics — actual footage. Transcribed locally (Whisper). The clip plays in full underneath, untouched.
119
+ - **Output:** the same footage with timed **graphic-overlay cards** — kinetic titles, lower-thirds, data callouts, pull-quotes, side panels, picture-in-picture — synced to the transcript. Any length.
120
+ - **Triggers:** "package this video", "add graphic overlays / lower-thirds / data callouts to my talk", "turn this interview into a graphics-packaged edit".
121
+
122
+ ### `/motion-graphics`
123
+
124
+ - **Input:** A short, design-led motion graphic where the **motion is the message** — typically under ~10s, no narration. Genres: kinetic typography, a stat / number count-up, a chart hit, a logo sting, a lower-third / overlay, or a search-driven page / tweet / headline shot.
125
+ - **Output:** a short motion graphic → MP4 or a **transparent overlay** (alpha WebM / MOV) for a lower-third / callout.
126
+ - **Triggers:** "an 8s logo sting", "animate this stat", "a kinetic-type intro", "turn this tweet into a motion graphic", "a transparent lower-third overlay".
127
+
128
+ ### `/music-to-video`
129
+
130
+ - **Input:** A **music track** — an audio file, or a video to pull the audio from — with **no narration and no website capture**. Optionally, user-supplied images / videos to weave in. The track is analyzed once into a deterministic beat / energy map (`audiomap.json`) the whole video is built on.
131
+ - **Output:** a **beat-synced** HyperFrames composition → MP4 where the music drives pacing. Typography and templates are the floor (a complete video needs zero assets); any supplied media is cut onto the same beat grid (beat-cut / ken-burns). The genre — lyric video, slideshow, kinetic promo — emerges from the per-frame choices; the pipeline never branches on it.
132
+ - **Triggers:** "make a video for this song", "beat-synced video from this track", "lyric video", "turn this music into a video", "music visualizer / kinetic promo to this beat".
133
+
134
+ ### `/general-video`
135
+
136
+ - **Input:** Anything not above — a creative brief, a single element to animate, an edit to a composition you're building. Input- and length-agnostic.
137
+ - **Output:** a HyperFrames composition (any length / format) via the original flow: design system → prompt expansion → plan → layout-before-animation → build (delegating to the `hyperframes-`\* skills) → validate.
138
+ - **Triggers:** "make a title card", "animate this", "a longer brand / sizzle reel", "a multi-scene composition", "a static loop / poster", any "make a video" that fits no row above.
139
+
140
+ ### `/remotion-to-hyperframes`
141
+
142
+ - **Input:** An existing **Remotion** (React) composition's source — the user **explicitly** asks to port / convert / migrate it. One-way (Remotion → HyperFrames); not creation-from-input. A passing mention of Remotion is not a trigger.
143
+ - **Output:** a HyperFrames HTML composition translated from the Remotion source, graded against the Remotion render (SSIM eval harness + tiered test corpus).
144
+ - **Triggers:** "port my Remotion project to HyperFrames", "convert this Remotion comp", "migrate from Remotion".
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: motion-graphics
3
+ description: >
4
+ Use when the user wants a short, design-led motion graphic where motion is the
5
+ message: kinetic typography, stat or number count-up, chart/data-viz hit,
6
+ logo sting, brand lockup, lower-third, callout, social overlay, animated
7
+ headline/tweet/news item, motion poster, or quick captured-page highlight.
8
+ Usually under 10s and up to ~30s, with no narration arc, voice-over, or
9
+ live-action subject. Can render to MP4 or transparent overlay. Not for longer,
10
+ multi-scene, narrated, or brand-reel pieces (use general-video), narrated
11
+ website videos (website-to-video), topic explainers
12
+ (faceless-explainer), product promos (product-launch-video), PR videos
13
+ (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a
14
+ quick motion-first piece or a longer / narrated treatment, see /hyperframes.
15
+ metadata:
16
+ {
17
+ "tags": "orchestrator, motion-graphics, kinetic-type, data-viz, logo-reveal, lower-thirds, news, tweet, webpage, asset-fusion, short-form, overlay, no-narration",
18
+ }
19
+ ---
20
+
21
+ # motion-graphics — dispatch entry
22
+
23
+ > **Confirm the route before Step 0.** This skill makes a **short, design-led, unnarrated motion graphic** (motion is the message; ~under 10s, no voice-over). A **longer, multi-scene, or narrated** treatment → `/general-video`; a **narrated video of a website** → `/website-to-video`; a **topic explainer** → `/faceless-explainer`; a **product promo** → `/product-launch-video`; **captions on existing footage** → `/embedded-captions`. **Out of scope**: live / at-render-time data, or footage it can't capture. Unsure motion-first-vs-narrated? **Read `/hyperframes` first.**
24
+
25
+ A short design-led motion graphic. **Asset-first**: decide the asset strategy and source real material _before_ designing the shot, then design the shot around what you have, then compose by reusing catalog capabilities. All artifacts go to `PROJECT_DIR = videos/<project-name>/` (created in Step 0); all paths below are relative to it.
26
+
27
+ | Phase | Execution | Primary artifact | Detailed flow |
28
+ | -------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------------------------- |
29
+ | init | Bash | `hyperframes.json` | Step 0 |
30
+ | plan | subagent — **decide search?** + classify + asset strategy | `shot-plan.json` (draft: category, `asset_needs` queries, brief) | `agents/director.md` (Part 1) |
31
+ | source ◇ | Bash — media-use resolve (**skip if `asset_needs` is empty**) | `assets/` + `assets/index.md` | `phases/source/guide.md` |
32
+ | design | subagent — shot design around resolved assets | `shot-plan.json` (final: block(s) + layout + motion + positions) | `agents/director.md` (Part 2) |
33
+ | build | subagent — reuse-first composition | `compositions/index.html` | `agents/builder.md` |
34
+ | render | Bash — `hyperframes render` (MP4, or `--format webm/mov` for overlay) | `renders/video.mp4` | Step 5 |
35
+ | verify | Bash — `lint` / `inspect` -> repair subagent on failure | (fixes in place) | `agents/finalize.md` |
36
+
37
+ `◇ source` runs only when the chosen category declares assets. Pure code/text categories (e.g. `kinetic-type`, most `charts`/`stat`) have `asset_needs: []` and skip straight from plan to design.
38
+
39
+ ## Categories — split by the search decision
40
+
41
+ `plan`'s **first decision is: does this need a search?** That fork splits the categories into two groups; then the specific category is picked — for search-driven, **by the type of content the search returns**. Each category is one `categories/<id>/module.md` (its planning + build rules); the shared motion vocabulary lives in `references/motion-vocabulary.md` (→ `hyperframes-animation` rules/blueprints + registry blocks).
42
+
43
+ **Form categories — no search; the user supplies the content:**
44
+
45
+ | Category | Intent | Leans on |
46
+ | -------------- | ---------------------------------------------- | --------------------------------------------------------------------------- |
47
+ | `kinetic-type` | punchy line / quote / title, motion-first text | `caption-*` blocks + animation rules |
48
+ | `stat` | single hero number / count-up + ring | `apple-money-count` / `rules/{counting-dynamic-scale, stat-bars-and-fills}` |
49
+ | `charts` | bar / line / pie / race / % from data | `data-chart` block |
50
+ | `logo-reveal` | logo sting / brand lockup (user logo) | `logo-outro` / `rules/svg-path-draw` |
51
+ | `lower-thirds` | name / title bars, callouts, social overlays | `caption-*` + registry overlay blocks |
52
+
53
+ **Search-driven categories — search first, then animate by content type** (the RWA path):
54
+
55
+ | Returned content | Category | Animation |
56
+ | ---------------- | -------------- | -------------------------------------------------------------- |
57
+ | webpage / link | `webpage` | webpage / UI animation (scroll, reveal, cursor, callouts) |
58
+ | news article | `news` | headline reveal + source card + key-fact callouts |
59
+ | tweet | `tweet` | animated tweet card |
60
+ | image / entity | `asset-fusion` | the asset's geometry _becomes_ the chart (RWA diegetic fusion) |
61
+
62
+ Build order: one at a time, coverage-first (rough is fine). `kinetic-type` ported from the prototype; the rest follow.
63
+
64
+ ## Prerequisites
65
+
66
+ macOS Apple Silicon or Linux x64. System tools: `brew install node ffmpeg`. `npx hyperframes doctor` once. macOS GPU render: `export PRODUCER_BROWSER_GPU_MODE=hardware`.
67
+
68
+ Optional keys (local fallbacks if unset) — only needed by categories that source/generate assets via media-use:
69
+
70
+ | Key | Used for | Fallback |
71
+ | ----------------------------------- | ----------------------------------------------------------- | ------------------------------- |
72
+ | `GEMINI_API_KEY` / `GOOGLE_API_KEY` | image generation (media-use resolve) | skip generate / search-only |
73
+ | (asset_scout / search providers) | `webpage`/`news`/`tweet` + `asset-fusion` real-asset search | category degrades to asset-free |
74
+
75
+ ## Flow
76
+
77
+ ### Step 0 — Initialize
78
+
79
+ cwd is the agent workspace root; write all artifacts under `PROJECT_DIR = videos/<project-name>/`. `<project-name>`: use the dir the user gave, else a short kebab-case name from the intent (`<subject>-motion`). Not the workspace basename or a timestamp.
80
+
81
+ Only when `$PROJECT_DIR/hyperframes.json` is absent:
82
+
83
+ ```bash
84
+ PROJECT_DIR="${MOTION_GRAPHICS_DIR:-videos/<project-name>}"
85
+ mkdir -p "$(dirname "$PROJECT_DIR")"
86
+ npx hyperframes init "$PROJECT_DIR" --non-interactive --skip-skills --example=blank
87
+ ```
88
+
89
+ **Constraints:** never `hyperframes init` in the workspace root; never nest another `hyperframes/` inside `PROJECT_DIR`; every Bash command (master + subagents) is a `(cd "$PROJECT_DIR" && ...)` subshell — never bare `cd`.
90
+
91
+ ### Step 1 — Plan (subagent: Director Part 1)
92
+
93
+ Dispatch one subagent. prompt = full `agents/director.md` + `## Dispatch context` (`SKILL_DIR` / `PROJECT_DIR` / the user's request / `Schema: <SKILL_DIR>/references/shot-plan-ir.md`). It must:
94
+
95
+ 1. **Decide: does this need a search?** (the first fork)
96
+ - **No** → pick a **form category** (kinetic-type / stat / charts / logo-reveal / lower-thirds); content is user-supplied; `asset_needs: []`.
97
+ - **Yes** → emit a **search plan** into `asset_needs[]` (news / web / tweet / image; two-pole queries). The specific **search-driven category** (webpage / news / tweet / asset-fusion) is confirmed by the content type returned in Step 2, and finalized in Step 3.
98
+ 2. Write a draft `shot-plan.json` (envelope + chosen form category _or_ search intent + `asset_needs` + a one-paragraph shot brief). Schema: `references/shot-plan-ir.md`.
99
+
100
+ Validation: `[ -s "$PROJECT_DIR/shot-plan.json" ] && echo ok || echo missing`.
101
+
102
+ ### Step 2 — Source ◇ (Bash: media-use, conditional)
103
+
104
+ If `shot-plan.json.asset_needs` is non-empty, resolve assets (search / generate / fetch → frozen project-local paths + ledger). See `phases/source/guide.md` (wraps `media-use resolve`; the search-driven categories use the news/web/tweet/image search). If `asset_needs` is empty, **skip to Step 3**.
105
+
106
+ ```bash
107
+ # illustrative — see phases/source/guide.md
108
+ (cd "$PROJECT_DIR" && node <SKILL_DIR>/phases/source/resolve.mjs --plan ./shot-plan.json --out ./assets)
109
+ ```
110
+
111
+ Degrade gracefully: if a search/provider is unavailable, the category falls back to asset-free (note it in `context.log`).
112
+
113
+ ### Step 3 — Design (subagent: Director Part 2)
114
+
115
+ Dispatch a subagent (prompt = `agents/director.md` Part 2 + dispatch context including the resolved `assets/index.md` if Step 2 ran + `catalog-map.md`). It designs the shot **around the available assets**: pick the catalog block(s) + the `hyperframes-animation` rules/blueprints, the layout, the motion, beats, and (for `asset-fusion`) the `element_positions` + eyedropper palette. Finalizes `shot-plan.json` (`content.block` + `content.customize` + per-category content).
116
+
117
+ ### Step 4 — Build (subagent: Builder, reuse-first)
118
+
119
+ Dispatch a subagent. prompt = full `agents/builder.md` + dispatch context (`shot-plan.json`, `catalog-map.md`, the category's `module.md`, `references/motion-vocabulary.md`, `references/builder-contract.md`). **Reuse-first**: `npx hyperframes add <block>` + customize in place; hand-author only gaps + the asset-fusion affordance. Output `compositions/index.html` honoring the HF contract (paused GSAP timeline on `window.__timelines`, `class="clip"` + stable ids, `tl.seek(0)`, deterministic).
120
+
121
+ ### Step 5 — Render (Bash)
122
+
123
+ ```bash
124
+ (cd "$PROJECT_DIR" && npx hyperframes render . -q draft -o ./renders/video.mp4)
125
+ # transparent overlay variant: --format webm (or mov)
126
+ ```
127
+
128
+ ### Step 6 — Verify (Bash → repair subagent on failure)
129
+
130
+ ```bash
131
+ (cd "$PROJECT_DIR" && npx hyperframes lint . && npx hyperframes inspect .)
132
+ ```
133
+
134
+ exit 0 → done. On lint/inspect errors, dispatch the repair subagent (`agents/finalize.md`: snapshot QA + one in-place fix pass + re-render). Never change a fixed duration in repair.
135
+
136
+ ### Report + optional preview
137
+
138
+ Report the final output (`renders/video.mp4`, or the `.webm` / `.mov` overlay variant) + duration. **Don't open a preview during the run.** Offer one only on request, started **after** render so it serves the final file:
139
+
140
+ ```bash
141
+ (cd "$PROJECT_DIR" && npx hyperframes preview) # Studio UI; or `npx hyperframes play` for a shareable link
142
+ ```
143
+
144
+ Flags live in the `hyperframes-cli` skill (`references/preview-render.md`).
145
+
146
+ ## Resume table
147
+
148
+ | State | Continue from |
149
+ | -------------------------------------------------------- | ------------------------ |
150
+ | no `shot-plan.json` | Step 1 (plan) |
151
+ | `shot-plan.json` has `asset_needs`, no `assets/` | Step 2 (source) |
152
+ | `shot-plan.json` final, no `compositions/index.html` | Step 3/4 (design+build) |
153
+ | `compositions/index.html` exists, no `renders/video.mp4` | Step 5 (render) + Step 6 |
154
+ | `renders/video.mp4` exists | Report + stop |
155
+
156
+ ## Design notes (maintainers — execution does not read this)
157
+
158
+ - **Asset-first rationale:** sourcing is front-loaded and informs shot design (the RWA flow: analyze → search → review → compose). the search-driven categories (`webpage`/`news`/`tweet`) and `asset-fusion` both lean on media-use search (news/web/tweet/image), which is media-use's documented RWA lineage.
159
+ - **Reuse-first:** the in-ecosystem analog of LLM-generated templates is "compose catalog blocks + `hyperframes-animation` rules". HF's paused GSAP timeline ≙ Remotion's `useCurrentFrame`.
160
+ - **Category module contract:** one `categories/<id>/module.md` (planning + build), sharing `references/motion-vocabulary.md` (+ optional eval). Adding a category = drop the folder + register its classifier line in `agents/director.md` + its row in `catalog-map.md`; the phase pipeline is untouched.
161
+ - **Directory shape:**
162
+ ```
163
+ videos/<project-name>/
164
+ hyperframes.json context.log
165
+ shot-plan.json # the IR (Director output)
166
+ assets/ assets/index.md # media-use output (if sourced)
167
+ compositions/index.html # Builder output
168
+ renders/video.mp4
169
+ ```
170
+ - **Registration:** in `hyperframes` router — add the "design-led short motion graphic" intent + Workflow description; carve the motion-graphics triggers out of `/general-video`; add reverse Do-NOT-use edges. See `motion-graphics-genre.md` §5-7.