Communitygithub.com

shengdabai/Tony-Claude-Code-Skills

HyperFrames CLI 开发循环 — `npx hyperframes` 用于脚手架搭建(init)、验证(lint, inspect)、预览、渲染和环境故障排查(doctor, browser, info, upgrade)。当运行这些命令或排查 HyperFrames 构建/渲染环境问题时调用。对于资源预处理命令(`tts`、`transcribe`、`remove-background`),请改用 `hyperframes-media` 技能。

Tony-Claude-Code-Skills 是什么?

HyperFrames CLI 技能为开发者提供了一套完整的视频创作工作流,通过 `npx hyperframes` 命令实现从项目初始化到最终渲染的全流程管理。它支持 Node.js >= 22 和 FFmpeg,能够自动处理 HTML 合成项目的搭建、语法检查、可视布局检查、本地预览和高质量输出。该技能特别强调在预览前先执行 lint 和 inspect 命令,以确保 `data-composition-id` 属性完整、轨道无重叠、时间线注册正确,并能检测文字溢出容器或画布等布局问题。在渲染阶段,它支持多种参数化配置,包括 FPS、质量等级、输出格式、变量覆盖和 GPU 加速,适用于从快速迭代到最终交付的不同场景。同时集成了环境诊断(doctor)、浏览器管理(browser)、版本信息(info)和升级检查(upgrade)等实用工具,帮助开发者快速定位和解决问题。适用于 Claude Code 等支持自定义技能的 AI 编程助手,让 AI 可以安全、高效地操控 HyperFrames 视频构建环境。

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

在你喜欢的 AI 中提问

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

文档

HyperFrames CLI

一切通过 npx hyperframes 运行。需要 Node.js >= 22 和 FFmpeg。

工作流

  1. 脚手架搭建 — npx hyperframes init my-video
  2. 编写 — 编写 HTML 合成(参见 hyperframes 技能)
  3. 语法检查 — npx hyperframes lint
  4. 可视检查 — npx hyperframes inspect
  5. 预览 — npx hyperframes preview
  6. 渲染 — npx hyperframes render

在预览前先执行 lint 和 inspect。lint 会捕获缺失的 data-composition-id、重叠轨道和未注册的时间线。inspect 在无头 Chrome 中打开渲染后的合成,在时间线中查找,并报告文字溢出气泡/容器或画布的问题。

脚手架搭建

npx hyperframes init my-video                        # 交互式向导
npx hyperframes init my-video --example warm-grain   # 选择一个示例
npx hyperframes init my-video --video clip.mp4        # 带视频文件
npx hyperframes init my-video --audio track.mp3       # 带音频文件
npx hyperframes init my-video --example blank --tailwind # 使用 Tailwind v4 浏览器运行时
npx hyperframes init my-video --non-interactive       # 跳过提示(CI/代理)

模板:blank、warm-grain、play-mode、swiss-grid、vignelli、decision-tree、kinetic-type、product-promo、nyt-graph。

init 创建正确的文件结构,复制媒体文件,使用 Whisper 转录音频,并安装 AI 编码技能。请使用它而不是手动创建文件。

使用 --tailwind 时,在编辑类或主题令牌之前调用 tailwind 技能。脚手架使用 Tailwind v4.2 的浏览器运行时,而非 Studio 的 Tailwind v3 设置。

语法检查

npx hyperframes lint                  # 当前目录
npx hyperframes lint ./my-project     # 特定项目
npx hyperframes lint --verbose        # 信息级别发现
npx hyperframes lint --json           # 机器可读

检查 index.html 和 compositions/ 中的所有文件。报告错误(必须修复)、警告(应该修复)和信息(使用 --verbose)。

可视检查

npx hyperframes inspect                 # 在时间线上检查渲染布局
npx hyperframes inspect ./my-project    # 特定项目
npx hyperframes inspect --json          # 代理可读发现
npx hyperframes inspect --samples 15    # 更密集的时间线扫描
npx hyperframes inspect --at 1.5,4,7.25 # 明确的英雄帧时间戳

在 lint 和 validate 之后使用此命令,尤其是对于包含对话气泡、卡片、字幕或紧凑排版的合成。它会报告:

  • 文本超出最近的视觉容器或气泡
  • 文本被自身的固定宽度/高度框裁剪
  • 文本超出合成画布
  • 子元素脱离裁剪容器

错误应在渲染前修复。警告会被呈现供代理审查;添加 --strict 以在警告时也失败。重复的静态问题默认会被折叠,以便 JSON 输出对 LLM 上下文窗口保持紧凑。如果溢出是入场/出场动画有意为之,请在元素或祖先上标记 data-layout-allow-overflow。如果装饰性元素不应被审计,请标记 data-layout-ignore。

npx hyperframes layout 仍然作为相同可视检查的兼容别名可用。

预览

npx hyperframes preview                   # 服务当前目录
npx hyperframes preview --port 4567       # 自定义端口(默认 3002)

文件更改时热重载。自动在浏览器中打开工作室。

将项目交还给用户时,请使用工作室项目 URL,而不是源代码 index.html 路径:

http://localhost:<port>/#project/<project-name>

使用预览输出中的实际端口和项目目录名称。例如,在 codex-openai-video 目录中执行 npx hyperframes preview --port 3017 后,报告 http://localhost:3017/#project/codex-openai-video。

将 index.html 仅视为源代码上下文。作为实现文件引用它是可以的,但不要将其标记为项目或预览界面。

渲染

npx hyperframes render                                # 标准 MP4
npx hyperframes render --output final.mp4             # 命名输出
npx hyperframes render --quality draft                # 快速迭代
npx hyperframes render --fps 60 --quality high        # 最终交付
npx hyperframes render --format webm                  # 透明 WebM
npx hyperframes render --docker                       # 字节一致
标志选项默认说明
--output路径renders/name_timestamp.mp4输出路径
--fps24, 30, 603060fps 渲染时间加倍
--qualitydraft, standard, highstandarddraft 用于迭代
--formatmp4, webmmp4WebM 支持透明度
--workers1-8 或 autoauto每个工作者启动 Chrome
--docker标志off可重现输出
--gpu标志offGPU 加速编码
--strict标志off在 lint 错误时失败
--strict-all标志off在错误和警告时都失败
--variablesJSON 对象—覆盖在 data-composition-variables 中声明的变量值
--variables-file路径—包含变量值的 JSON 文件(--variables 的替代方案)
--strict-variables标志off在 --variables 中存在未声明的键或类型不匹配时渲染失败

质量指南: 迭代时使用 draft,审阅时使用 standard,最终交付时使用 high。

参数化渲染: 组合通过 <html> 根元素上的 data-composition-variables 声明其变量——这是一个 声明数组 的 JSON(每项包含 {id, type, label, default})定义了模式。脚本通过 window.__hyperframes.getVariables() 读取解析后的值。CLI 的 --variables '{"title":"Q4 Report"}' 是一个按 id 键控的 JSON 对象,覆盖一次渲染的声明默认值;缺失的键会回退,因此同一组合在开发预览和生产中运行不变。(子组合宿主也可以使用 data-variable-values 按实例覆盖——对象形状相同,作用于子组合的一个挂载点。完整模式请参见 hyperframes 技能。)

资源预处理

npx hyperframes tts、transcribe 和 remove-background 生成资源(旁白音频、词级别转录、透明视频),这些资源会放入组合中。每个命令在首次运行时都会下载自己的模型。关于语音选择、Whisper 模型规则(.en 翻译非英语的陷阱)、输出格式选择(VP9 带透明度的 WebM vs ProRes)以及 TTS → 转录 → 字幕链,请调用 hyperframes-media 技能。

故障排查

npx hyperframes doctor       # 检查环境(Chrome、FFmpeg、Node、内存)
npx hyperframes browser      # 管理捆绑的 Chrome
npx hyperframes info         # 版本和环境详情
npx hyperframes upgrade      # 检查更新

如果渲染失败,首先运行 doctor。常见问题:缺少 FFmpeg、缺少 Chrome、内存不足。

其他

npx hyperframes compositions   # 列出项目中的组合
npx hyperframes docs           # 打开文档
npx hyperframes benchmark .    # 基准测试渲染性能

Individual skills in this repo

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

shengdabai/Tony-Claude-Code-Skills

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

shengdabai/Tony-Claude-Code-Skills

接收抖音、小红书、微信视频号等短视频链接或分享文案,查询作品/账号数据并提取语音文字稿,按作者和标题归档为 Markdown。用户希望完整解析短视频、取得数据或文字稿时使用;运行前检查 TikHub 与轻抖使用凭证,缺少时用新手能理解的方式引导购买和安全配置。

shengdabai/Tony-Claude-Code-Skills

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

shengdabai/Tony-Claude-Code-Skills

Anime.js adapter patterns for HyperFrames. Use when writing Anime.js animations or timelines inside HyperFrames compositions, registering animations on window.__hfAnime, making Anime.js seek-driven and deterministic, or translating Anime.js examples into render-safe HyperFrames HTML.

shengdabai/Tony-Claude-Code-Skills

Author a new HyperFrames registry block (caption style, VFX block, transition, lower third) or component (text effect, overlay, snippet) and ship it as an upstream PR to the hyperframes repo. Use ONLY when the user wants to CONTRIBUTE to the public catalog — for in-project caption/transition authoring use the `hyperframes` skill, for installing existing registry items use the `hyperframes-registry` skill.

shengdabai/Tony-Claude-Code-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.

shengdabai/Tony-Claude-Code-Skills

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

shengdabai/Tony-Claude-Code-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.

相关技能