Community编程与开发github.com

delorenj/skills

我的 Claude 技能百宝箱

skills 是什么?

HyperFrames 是一个以 HTML 为视频创作数据源的高级框架。它将视频制作抽象为 HTML 文件,通过 `data-*` 属性控制时间,结合 GSAP 时间线处理动画,并使用 CSS 定义视觉样式。该框架负责处理片段可见性、媒体播放和时间线同步,为开发者提供了一种代码驱动、高度可控的视频合成方式。 工作流程遵循严谨的步骤:首先通过“探索”阶段理解用户意图并建立设计系统(读取 `design.md` 或使用预设样式);然后进行提示扩展以统一上下文;接着制定包括叙事结构、节奏、时序和布局在内的详细计划;最后才编写 HTML 和动画代码。框架特别强调“先布局后动画”的原则,要求先构建元素的最终可见状态(CSS),再使用 `gsap.from()` 和 `gsap.to()` 添加进入和退出动画,从而避免布局重叠和时序错误。 HyperFrames 通过 `data-*` 属性系统实现精细控制,支持主合成与子合成(通过 `data-composition-src` 加载外部 HTML),并提供完整的视频/音频集成方案。它适用于 Claude Code、Cursor 等支持自定义技能的 AI 编码工具,为需要精确控制视频节奏、品牌一致性和复杂动画场景的创作任务提供了强大的技术基础。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add delorenj/skills

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

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

预览

来自技能 README

文档

HyperFrames

HTML 是视频的数据源。一个合成是一个 HTML 文件,通过 data-* 属性控制时间,使用 GSAP 时间线实现动画,CSS 定义外观。框架负责处理片段可见性、媒体播放和时间线同步。

方法

探索阶段(仅限开放式请求)

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

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

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

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

第 1 步:设计系统

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

如果它指定了本地找不到的字体(没有包含 .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。按照适合视频的规模使用品牌颜色——不要使用网页 UI 的不透明度。

第 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 来填满整个场景。使用 padding 将内容向内推——绝对不要对内容容器使用 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 填充场景,padding 定位内容 */
.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 等)。
   Padding 定位内容。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-durationimg/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-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">
    <!-- 内容 -->
    <style>
      [data-composition-id="my-comp"] {
        /* 作用域样式 */
      }
    </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 });
      // 补间...
      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>

视频和音频

视频必须是 muted playsinline。音频始终是独立的 <audio> 元素:

<video
  id="el-v"
  data-start="0"
  data-duration="30"
  data-track-index="0"
  src="video.mp4"
  muted
  playsinline
></video>
<audio
  id="el-a"
  d

Individual skills in this repo

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

delorenj/skills

Plan and generate terminal ASCII animations/screensaver-style output (FPS, refresh rules, loop policy, low-flicker guidance), with a static poster frame and an optional local demo script.

delorenj/skills

ASCII video: convert video/audio to colored ASCII MP4/GIF.

delorenj/skills

Plan, build and quality-check a premium short commercial for a real business (roofing, property, ecommerce, B2B software) using AI-generated footage, code-built motion (HTML/GSAP), selective Three.js and an independent-critic "Gauntlet" loop. Use when asked to make a launch-style / SaaS-style video, business ad, explainer, sample reel or pitch video, or to review and improve one. Encodes motion principles distilled from 28 professional launch films, a quality bar, audio rules and a business-offer playbook.

delorenj/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.

delorenj/skills

Generate professional voiceovers using ElevenLabs AI. Use when the user needs to create voiceovers for videos, audio narration, or text-to-speech content. Supports multiple voices with character presets (narrator, salesperson, expert) for natural delivery. Includes single scene regeneration for fine-tuning.

delorenj/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.

delorenj/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.

delorenj/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.

delorenj/skills

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For dev-loop CLI commands (init, lint, inspect, preview, render) see the hyperframes-cli skill; for asset preprocessing commands (tts, transcribe, remove-background) see the hyperframes-media skill.

delorenj/skills

Manim CE animations: 3Blue1Brown math/algo videos.

delorenj/skills

Join a Google Meet or Zoom call as a video meeting agent via PikaStreaming. Trigger: user drops a Google Meet or Zoom link, or asks to join a meeting.

delorenj/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.

delorenj/skills

Generate speech using the self-hosted voxxy (vox) TTS service at https://vox.delo.sh. Use when the user asks to speak, say, narrate, synthesize speech, clone a voice, create a voice, add or register a voice, pipe TTS, or control voice qualities by description (e.g. "a young woman with a cheerful voice"). Handles HTTP API usage, voice profile management, description-based voice design, cloning, MCP registration, and integration patterns for new platforms.

delorenj/skills

Capture a website and create a HyperFrames video from it. Use when: (1) a user provides a URL and wants a video, (2) someone says "capture this site", "turn this into a video", "make a promo from my site", (3) the user wants a social ad, product tour, or any video based on an existing website, (4) the user shares a link and asks for any kind of video content. Even if the user just pastes a URL — this is the skill to use.

delorenj/skills

YouTube transcripts to summaries, threads, blogs.

相关技能