Communitygithub.com

Biznomad/agent-skills

使用 HyperFrames HTML 创建视频合成、动画、标题卡片、叠加层、字幕、旁白、音频反应式视觉效果和场景过渡。适用于构建任何基于 HTML 的视频内容、为音频添加同步字幕、生成文本转语音旁白、创建音频反应式动画以及添加场景过渡。

agent-skills 是什么?

该技能使 AI 代理能够在 HyperFrames HTML 环境中执行完整的视频制作工作流程。它支持创建视频合成、动画、标题卡片、叠加层、字幕、旁白、音频反应式视觉效果和场景过渡。技能的核心原则是将 HTML 作为视频的唯一真实来源,通过 `data-*` 属性控制剪辑的可见性和媒体播放,并使用 GSAP 动画库管理时间线和动画。该技能通过一个系统的流程指导代理:首先从设计系统获取品牌信息,然后进行提示扩展、规划布局和动画,最后编写 HTML。它遵循“先布局后动画”的原则,要求代理首先确定并构建每个场景的“英雄帧”的静态 CSS 布局,然后再添加进入和退出动画,以避免元素意外重叠。该技能明确了其适用范围:对于含糊的请求(如“制作一个产品发布视频”),代理需要探索用户意图;对于具体的请求(如“添加一个标题卡片”),则直接执行。此外,技能还详细说明了时序数据属性、合成结构、变量(参数化合成)的使用方法,以及如何使用 CLI 命令进行渲染。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Biznomad/agent-skills/tree/HEAD/hyperframes

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

HyperFrames

HTML 是视频的唯一真实来源。一个合成就是一个 HTML 文件,带有用于时序的 data-* 属性、一个用于动画的 GSAP 时间线,以及用于外观的 CSS。该框架处理剪辑可见性、媒体播放和时间线同步。

方法

探索阶段(仅限探索性请求)

对于开放式的请求(“制作一个产品发布视频”、“为我们的品牌创建一些东西”),如果用户尚未确定方向,请先了解其意图,再选择颜色:

  • 受众 —— 谁观看这个视频?开发者?高管?普通消费者?
  • 平台 —— 在哪里播放?社交媒体(15秒)、网站主页、产品演示、内部视频?
  • 优先级 —— 什么最重要?运动质量?内容准确性?品牌保真度?速度?
  • 变体 —— 用户是想要多个选项,还是只有一个最佳方案?

对于具体的请求(“添加一个标题卡片”、“修复场景3的时序”),跳过探索阶段。

对于探索性请求,可以考虑提供2-3个有意义的变体——不仅仅是颜色替换,而是不同的节奏、能量水平或结构方法。一个安全/可预期的,一个大胆的。这不是强制要求——只是在适当时可用的一种工具。

第1步:设计系统

如果项目中存在 design.md 或 DESIGN.md 文件,请先阅读它(检查两种大小写——在 Linux 上是不同的文件)。它是品牌颜色、字体和约束的真实来源。使用其精确的值——不要发明颜色或替换字体。任何格式都可以(YAML frontmatter、散文、表格——只需提取值)。

如果它指定的字体在本地找不到(没有包含 .woff2 文件的 fonts/ 目录,也不是内置字体),请在编写 HTML 之前警告用户:“design.md 指定了 [字体名称] 但未找到字体文件。请将 .woff2 文件添加到 fonts/ 目录,否则我将回退到 [最接近的内置替代字体]。”

如果不存在 design.md,请为用户提供一个选择:

  1. 用户指定了风格或情绪? → 阅读 visual-styles.md 查看8个命名预设。选择最接近的一个。
  2. 想要可视化浏览选项? → 运行设计选择器:阅读 references/design-picker.md 了解完整工作流程。这将提供一个可视化选择器页面。用户在浏览器中配置情绪、调色板、排版和运动,然后复制生成的 design.md 并将其粘贴回对话中。
  3. 想要跳过并快速进行? → 询问:情绪、浅色或深色、是否需要任何品牌颜色/字体?然后从 house-style.md 中选择一个调色板。

design.md 定义了品牌。它没有定义视频合成规则。 那些规则来自 references/video-composition.md 和 house-style.md。使用适合视频规模的品牌颜色——而不是 web 用户界面的不透明度。

第2步:提示扩展

始终在每个合成上运行(单场景片段和琐碎的编辑除外)。这一步使用户的意图与 design.md 和 house-style.md 保持一致,并产生一个一致的中间产物,所有下游代理都能以相同方式读取。

阅读 references/prompt-expansion.md 了解完整过程和输出格式。

第3步:规划

在编写 HTML 之前,从高层次思考:

  1. 内容 —— 观众应该体验到什么?确定叙事弧线、关键时刻和情感节点。
  2. 结构 —— 有多少个合成,哪些是子合成与内联合成,哪些轨道承载什么内容(视频、音频、叠加层、字幕)。
  3. 节奏 —— 在实现之前声明你的场景节奏。哪些场景是快速切换,哪些是停留,着色器落在哪里,能量峰值在哪里。命名模式:快-快-慢-快-着色器-停留。阅读 references/beat-direction.md 了解节奏模板。
  4. 时序 —— 哪些剪辑驱动持续时间,过渡落在哪里,节奏是怎样的。
  5. 布局 —— 首先构建最终状态。请参见下面的“先布局后动画”。
  6. 动画 —— 然后使用下面的规则添加运动。

构建所要求的内容。 一个“添加标题卡片”的请求不是一个“添加标题卡片 + 3个支持场景 + 背景音乐 + 字幕”的请求。每个场景、每个元素、每个动画补间都应该有其存在的理由。如果额外的场景或元素能真正改进作品,请提出建议——但不要添加它们。

对于小的编辑(修复颜色、调整时序、添加一个元素),直接跳到规则部分。

先布局后动画

将每个元素定位在其最显眼的时刻应处于的位置——即它完全进入、正确放置且尚未退出的帧。首先将其编写为静态 HTML+CSS。不要使用 GSAP。

为什么这很重要: 如果你将元素定位在其动画起始状态(屏幕外、缩放为0、不透明度为0)然后补间到你认为它们应该落地的位置,你是在猜测最终的布局。重叠的元素在视频渲染之前是不可见的。通过首先构建最终状态,可以在添加任何运动之前发现并修复布局问题。

过程

  1. 识别每个场景的英雄帧 —— 大多数元素同时可见的时刻。这就是你要构建的布局。
  2. 为该帧编写静态 CSS。.scene-content 容器必须使用 width: 100%; height: 100%; padding: Npx; 并搭配 display: flex; flex-direction: column; gap: Npx; box-sizing: border-box 来完全填充场景。使用内边距将内容向内推——永远不要在内容容器上使用 position: absolute; top: Npx。绝对定位的内容容器在内容高于剩余空间时会溢出。position: absolute 仅保留给装饰性元素使用。
  3. 使用 gsap.from() 添加进入动画 —— 从屏幕外/不可见动画到 CSS 位置。CSS 位置是真实状态;补间描述了到达该位置的旅程。(在通过 data-composition-src 加载的子合成中,优先使用 gsap.fromTo() —— 请参见 references/motion-principles.md 中关于 GSAP 的关键规则。)
  4. 使用 gsap.to() 添加退出动画 —— 从 CSS 位置动画到屏幕外/不可见。

示例

/* scene-content 填充场景,内边距定位内容 */
.scene-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 120px 160px;
  gap: 24px;
  box-sizing: border-box;
}
.title {
  font-size: 120px;
}
.subtitle {
  font-size: 42px;
}
/* 容器填充任何场景尺寸(1920x1080、1080x1920 等)。
   内边距定位内容。Flex + gap 处理间距。 */

错误的做法——硬编码尺寸和绝对定位:

.scene-content {
  position: absolute;
  top: 200px;
  left: 160px;
  width: 1920px;
  height: 1080px;
  display: flex; /* ... */
}
// 第3步:动画进入这些位置
tl.from(".title", { y: 60, opacity: 0, duration: 0.6, ease: "power3.out" }, 0);
tl.from(".subtitle", { y: 40, opacity: 0, duration: 0.5, ease: "power3.out" }, 0.2);
tl.from(".logo", { scale: 0.8, opacity: 0, duration: 0.4, ease: "power2.out" }, 0.3);

// 第4步:从这些位置动画退出
tl.to(".title", { y: -40, opacity: 0, duration: 0.4, ease: "power2.in" }, 3);
tl.to(".subtitle", { y: -30, opacity: 0, duration: 0.3, ease: "power2.in" }, 3.1);
tl.to(".logo", { scale: 0.9, opacity: 0, duration: 0.3, ease: "power2.in" }, 3.2);

当元素在时间上共享空间时

如果元素 A 在元素 B 进入同一区域之前退出,那么两者在各自的英雄帧处都应有正确的 CSS 位置。时间线顺序保证了它们永远不会在视觉上共存——但是如果你跳过了布局步骤,你将无法捕获因时序错误导致它们意外重叠的情况。

什么算是有意的重叠

分层效果(文字后的辉光、阴影元素、背景图案)和 Z 轴堆叠设计(卡片堆叠、深度层)是有意的。布局步骤是为了捕获无意的重叠——两个标题落在彼此之上、一个统计数据覆盖了一个标签、内容溢出画布。

数据属性

所有剪辑

属性必需值
id是唯一标识符
data-start是秒数或剪辑 ID 引用("el-1"、"intro + 2")
data-duration对于 img/div/合成是必需的秒。视频/音频默认使用媒体时长。
data-track-index是整数。同一轨道的剪辑不能重叠。
data-media-start否从源文件开始的裁剪偏移量(秒)
data-volume否0-1(默认为 1)

data-track-index 不影响视觉层次——请使用 CSS z-index。

合成剪辑

属性必需值
data-composition-id是唯一的合成 ID
data-start是开始时间(根合成:使用 "0")
data-duration是优先于 GSAP 时间线时长
data-width / data-height是像素尺寸 (1920x1080 或 1080x1920)
data-composition-src否外部 HTML 文件的路径
data-variable-values否子合成宿主元素上每个实例变量覆盖的 JSON 对象

在根 <html> 元素上:

属性必需值
data-composition-variables否声明的变量的 JSON 数组(id/type/label/default)——驱动作坊编辑 UI 并为 getVariables() 提供默认值

合成结构

通过 data-composition-src 加载的子合成使用 <template> 包装器。独立的合成(主 index.html)不使用 <template>——它们直接将 data-composition-id 的 div 放在 <body> 中。在独立文件上使用 <template> 会隐藏浏览器中的所有内容并破坏渲染。

子合成结构:

<template id="my-comp-template">
  <div data-composition-id="my-comp" data-width="1920" data-height="1080">
    <!-- content -->
    <style>
      [data-composition-id="my-comp"] {
        /* scoped styles */
      }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      window.__timelines = window.__timelines || {};
      const tl = gsap.timeline({ paused: true });
      // tweens...
      window.__timelines["my-comp"] = tl;
    </script>
  </div>
</template>

在根元素中加载:<div id="el-1" data-composition-id="my-comp" data-composition-src="compositions/my-comp.html" data-start="0" data-duration="10" data-track-index="1"></div>

变量(参数化合成)

使用不同的内容渲染同一个合成——标题、主题色、价格、字幕——而无需编辑源 HTML。

三步模式:

  1. 声明 变量在合成的 <html> 根元素上,使用 data-composition-variables。每个条目需要 id、type(string、number、color、boolean、enum 之一)、label 和 default。Enum 条目还需要 options: [{value, label}, ...]。
  2. 读取 合成脚本内已解析的值,使用 window.__hyperframes.getVariables()。返回声明的默认值 + 每个实例的覆盖值 + CLI 覆盖值的合并结果。
  3. 覆盖 在渲染时使用 npx hyperframes render --variables '{...}'(顶层)或使用宿主元素上的 data-variable-values='{...}'(子合成的每个实例)。
<!doctype html>
<html
  data-composition-variables='[
  {"id":"title","type":"string","label":"Title","default":"Hello"},
  {"id":"theme","type":"enum","label":"Theme","default":"light","options":[
    {"value":"light","label":"Light"},
    {"value":"dark","label":"Dark"}
  ]}
]'
>
  <body>
    <div data-composition-id="root" data-width="1920" data-height="1080">
      <h1 id="hero" class="clip" data-start="0" data-duration="3"></h1>
      <script>
        const { title, theme } = window.__hyperframes.getVariables();
        document.getElementById("hero").textContent = title;
        document.body.dataset.theme = theme;
      </script>
    </div>
  </body>
</html>
# 开发预览使用声明的默认值
npx hyperframes preview

# 使用覆盖值进行渲染
npx hyperframes render --variables '{"title":"Q4 Report","theme":"dark"}' --output q4.mp4

# 或者从 JSON 文件中读取
npx hyperframes render --variables-file ./vars.json

子合成的每个实例值: 相同的 getVariables() 在通过 data-composition-src 加载的子合成中也可用。每个宿主元素传递其自己的值:

<div
  data-composition-id="card-pro"
  data-composition-src="compositions/card.html"
  data-variable-values='{"title":"Pro","price":"$29"}'
></div>
<div
  data-composition-id="card-enterprise"
  data-composition-src="compositions/card.html"

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Biznomad/agent-skills

Landing page quality assessment for paid advertising campaigns. Evaluates message match, page speed, mobile experience, trust signals, form optimization, and conversion rate potential. Use when user says "landing page", "post-click experience", "landing page audit", "conversion rate", or "landing page optimization".

Biznomad/agent-skills

TikTok Ads deep analysis covering creative quality, tracking, bidding, campaign structure, and TikTok Shop. Evaluates 25 checks with emphasis on creative-first strategy, safe zone compliance, and Smart+ campaigns. Use when user says "TikTok Ads", "TikTok marketing", "TikTok Shop", "Spark Ads", "Smart+", or "TikTok campaign".

Biznomad/agent-skills

YouTube Ads specific analysis covering campaign types, creative quality, audience targeting, and measurement. Evaluates video ad performance across skippable, non-skippable, bumper, Shorts, and Demand Gen formats. Use when user says "YouTube Ads", "video ads", "pre-roll", "bumper ads", "YouTube campaign", or "Shorts ads".

Biznomad/agent-skills

Help users get promoted at work. Use when someone is preparing for a promotion conversation, building their case for advancement, trying to understand what's blocking their promotion, or figuring out how to get to the next level in their career.

Biznomad/agent-skills

CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

Biznomad/agent-skills

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

Biznomad/agent-skills

Read-only queue dashboard for workspace-aware ship. Shows which VERSION slots are currently claimed by open PRs, which sibling Conductor workspaces have WIP work likely to ship soon, and what slot /ship would pick next. No mutations — just a snapshot. Use when asked to "landing report", "what's in the queue", "show me open PRs", or "which version do I claim next". (gstack)

Biznomad/agent-skills

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

Biznomad/agent-skills

Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.

Biznomad/agent-skills

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, and registry discovery.

Biznomad/agent-skills

Still-to-video conversion guide: model selection, motion prompting, and camera movement. Covers Wan 2.5 i2v, Seedance, Fabric, Grok Video with when to use each. Use for: animating images, creating video from stills, adding motion, product animations. Triggers: image to video, i2v, animate image, still to video, add motion to image, image animation, photo to video, animate still, wan i2v, image2video, bring image to life, animate photo, motion from image

Biznomad/agent-skills

>- The Landing Page Audit skill performs comprehensive evaluations of post-click experiences, combining technical performance analysis with conversion rate optimization (CRO) assessment.

Biznomad/agent-skills

Write high-converting landing page copy using proven frameworks like PAS (Problem-Agitate-Solution), AIDA, and StoryBrand. Creates headlines, value propositions, CTAs, and full page sections optimized for conversion. Use when users need landing page copy, sales page content, or marketing website text.

Biznomad/agent-skills

Optimize landing pages for higher conversion rates using proven frameworks and design patterns. Use when designing, reviewing, or improving landing pages, hero sections, pricing pages, CTAs, or when the user asks about conversion optimization.

Biznomad/agent-skills

Read-only queue dashboard for workspace-aware ship. (gstack)

Biznomad/agent-skills

Building promotion cases, brag documents, tracking wins, and self-advocacy for career advancement. Use when preparing for promotions, documenting accomplishments, or building your case for advancement.

Biznomad/agent-skills

Best practices for Remotion - Video creation in React

Biznomad/agent-skills

Translate an existing Remotion (React-based) video composition into a HyperFrames HTML composition. Use ONLY when the user explicitly asks to port, convert, migrate, translate, or rewrite a Remotion composition as HyperFrames (e.g. "port my Remotion project to HyperFrames"). Do NOT use when (a) authoring a NEW HyperFrames composition (even if A/B-testing a Remotion video); (b) Remotion is mentioned in passing; (c) Remotion code is shared as reference, not for translation; (d) the user wants "the same video as my Remotion one" without explicitly asking to migrate the source — treat as a fresh HyperFrames build. When in doubt, default to the `hyperframes` skill. Detects unsupported patterns (useState, useEffect side effects, async calculateMetadata, third-party React component libraries, `@remotion/lambda`) and recommends the runtime interop escape hatch instead of a lossy translation.

Biznomad/agent-skills

Produce programmable videos with Remotion using scene planning, asset orchestration, and validation gates for automated, brand-consistent video content.

Biznomad/agent-skills

Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.

相关技能