Communitygithub.com

vijayahnlu/reels

使用 HyperFrames CLI 开发循环:初始化、添加、目录、捕获、检查、快照、比较、分级比较、预览、播放、呈现、节拍、关键帧、单次或批量渲染、发布、云端、云运行、反馈、Lambda、诊断、浏览器、信息、升级、技能、合成、时间线、历史、清理、文档、基准测试、遥测、转录、认证、TTS 和移除背景。也用于诊断构建或渲染失败。validate、inspect 和 layout 是已弃用的别名;请使用 check。涵盖本地、HeyGen 托管云、AWS Lambda 和 Google Cloud Run 渲染。

reels 是什么?

HyperFrames CLI 技能提供了一个全面的开发循环,用于创建和管理视频合成,支持本地、HeyGen 云、AWS Lambda 和 Google Cloud Run 等渲染平台。它通过一系列命令指导用户完成项目从初始化到最终发布的完整流程,包括资产目录搜索、关键帧动画、音频编辑、子合成测试和性能基准测试。该工具强调高效工作流,例如使用 `catalog --query` 搜索现有动画原语以避免手动创作,以及通过 `history` 命令管理项目变更历史。它还为 AI 代理提供了详细约定,例如优先使用 `--json` 输出格式、在创作前搜索目录、以及报告搜索缺失以改进目录。技能 Markdown 文档包含了完整的 CLI 命令参考、开发循环步骤、强制性交叉引用规则,以及针对代理行为的特定指导,确保开发者能够高效且准确地使用 HyperFrames。

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

在你喜欢的 AI 中提问

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

文档

插件安装: 在执行设置或 freshness 命令之前,当此技能位于 HyperFrames 插件内部时,请遵循插件执行规则。独立安装则保留下面的更新说明。

HyperFrames CLI

除非项目说明提供了包装器,否则命令应以 npx hyperframes ... 的形式运行。如果有包装器,则必须遵循。该 CLI 需要 Node.js 22 或更高版本以及 FFmpeg。

开发循环

  1. 脚手架: npx hyperframes init <project>(居中空白)。或者捕获一个站点。仅当要从命名示例开始时,才传递 --example=<name>。
  2. 寻找素材: 如果请求指定了资产、声音、图像、语音或快速视觉编辑,请在提出方案之前通过 /media-use 进行解析。否则,在手动创作动画之前,先搜索已存在的原始素材:npx hyperframes catalog --query "reveal a headline one line at a time"。请描述你想要的效果,而不是你脑海中的机制。使用 npx hyperframes add <name> 进行安装(见 /hyperframes-registry)。只有当没有合适的素材时,才进行手动创作。
  3. 创作: 使用 /hyperframes-core 编写合成。要了解项目时间线上有什么(轨道、片段、开始时间、结束时间、播放内容),请运行 npx hyperframes timeline --json,而不是读取 index.html 和每个子合成文件:嵌套行携带绝对的主动画线 absStart/absEnd 及其所属的 file,而不仅仅是它们本地、每个子合成的时间。优先使用 --json 而非文本形式;它能以相同或更好的准确性消耗更少的 token。参见 references/upgrade-info-misc.md 以获取无需阅读整个输出即可回答常见问题的一行命令。
  4. 编辑时快速获取反馈: 在第一次 HTML 遍历之后和结构更改之后,运行 npx hyperframes lint。
  5. 运行最终关卡: 运行 npx hyperframes check;它会在打开浏览器之前重新运行 lint。不要额外再运行一次独立的 lint。添加 --snapshots 以获取带注释的概览帧并查找裁剪区域。
  6. 检查子合成: 当 index.html 挂载了 data-composition-src,请获取中间点快照并检查每个挂载的场景。
  7. 打开最终的 Studio 预览: 运行 npx hyperframes preview --background,验证 URL 返回 HTTP 200,将时间线项目 URL 交给用户,并询问是要修改还是渲染。保持其运行直到审查结束。
  8. 批准后才渲染: 迭代时使用 --quality draft,首次真正编码时使用 --quality looks(CLI 默认),最终交付时使用 --quality delivery。
  9. 将项目交给桌面应用(如有): 当渲染的 Framey 行以 hyperframes open … 结尾时,提供 npx hyperframes open [dir]。这将在 HyperFrames 桌面应用中打开项目并将其添加到主页;在 Claude Code、Codex 或 Grok 下,其聊天会接管此会话。如果没有该应用,则退出 1 并打印下载链接。--json 用于代理。当 open 提示在用户回来后运行 catch-up,或者任何命令以命名它的行结尾时,请在下次更改前运行 npx hyperframes catch-up [dir]:它会列出自交接以来在应用中被请求和更改的内容。较旧版本的 CLI 没有 catch-up。
  10. 验证输出: 确认文件存在且非空。读取渲染摘要的第二行(beginframe vs screenshot,GPU,阶段时间)。Linux 上的 screenshot + software gpu 是慢路径。运行 ffprobe -v error -show_format -show_streams 并将持续时间(如果指示中设置了帧率则也包括帧率)与根 data-duration 进行比较。

你轮次中的项目历史

每次对项目的写入都会保留为一个可以撤销的条目。仅在两个时刻使用它,而不是每一步:

  • 轮次开始: npx hyperframes history begin --who <your-name> --label "<你将要做什么>",然后运行 npx hyperframes history --since mine --who <your-name> 查看自你上一轮次以来用户更改了什么。基于他们的编辑进行构建;永远不要覆盖它们。
  • 检查失败,或用户说情况变糟: npx hyperframes history undo --who <your-name> 会撤销你最新的轮次,并保留用户的编辑不变。不要手动回退。如果发生冲突,它会退出 2 并打印两个选项。

每轮结束时运行 npx hyperframes history end,以便你的写入被标记为你的作品,而不是“在应用外更改”。当一个轮次处于打开状态时,项目上的每次写入都会被视为你的写入,直到 10 分钟内没有写入;之后该轮次将自动结束。

强制性创作者-编辑交叉引用

  • 在创作或诊断缩放、切入/切出、重新构图、摄像机移动或任何关键帧动画之前,请先阅读 /hyperframes-keyframes。
  • 在运行 hyperframes keyframes 之前,请阅读 /hyperframes-keyframes;该命令显示动画轨迹,但不诊断剪辑剪切。
  • 对于剪辑的剪切、修剪、拼接、重新排序或源时间编辑,请阅读 /hyperframes-core 并使用其剪辑/时间线合约。
  • 对于淡入/淡出、交叉淡入淡出、轨道增益、音量自动化、闪避、画外音雕刻或已放置音频上的特效,请阅读 /hyperframes-audio。当剪辑位置或画面时间也发生更改时,请同时加载 core。
  • 指定资产、声音、图像、语音或快速视觉编辑的请求在提出方案之前通过 /media-use 解析。 从 /hyperframes-core → references/creator-editing-recipes.md 复制创作者编辑标记。
# 快速迭代检查;在创作过程中根据需要重复。
npx hyperframes lint

# 要求的最终关卡;包含 lint。
npx hyperframes check
npx hyperframes preview --background
npx hyperframes render --quality looks --output out.mp4
test -s out.mp4
ffprobe -v error -show_format -show_streams out.mp4

check 首先运行 lint,然后使用一个浏览器会话和一次搜索遍历来审计运行时错误、失败的请求、布局、*.motion.json 断言和 WCAG 对比度。持久性问题会阻塞退出代码;瞬态进入或退出问题是提示信息。使用 --strict 来阻塞警告。为了兼容性,validate、inspect 和 layout 仍然是别名,但不能出现在新的指令或脚本中。

渲染前预览

仅在 check 通过后,打开最终合成预览 (#project/<name>) 以审查组装好的时间线。聊天中的计划和 storyboard.html 草图页不被视为最终视频的批准。渲染始终需要由 hyperframes/references/review-loop.md 定义的最终批准。

子合成冒烟测试

静态审计无法捕获所有挂载故障。当项目使用子合成时,为每个宿主槽位至少捕获一个可见的中间点:

npx hyperframes snapshot --at <t1>,<t2>,<t3>

微小的无样式内容、画布大小的图标、缺失的主要元素或时间线注册超时都被视为阻塞渲染的挂载缺陷。参见 hyperframes-core/references/sub-compositions.md 以了解相应的修复方法。

代理约定

  • 在手动编写动画之前,先搜索目录。 npx hyperframes catalog --query "<节拍,用普通英语描述>"。搜索完全是本地的:没有托管服务、没有账户,查询文本永远不会发送到任何地方。默认情况下,它根据与项目名称、标题、描述和标签共享的词汇进行排名,这可能会遗漏任何不重复使用目录自身措辞的表述。添加 --on-device 可按语义进行排名(见下面的离线层)。

  • 即使视频不是英文,也请用英语查询。 两层都为英文目录建立索引,因此使用其他语言的查询不会产生可搜索的术语并返回空结果。用英语描述动作;屏幕文字保留视频所需的任何语言。No searchable words in query 正意味着这一点,并且不是缺少组件,因此不要将其报告为目录缺口。

  • 阅读是哪个层级返回的结果;永远不要从结果出现来推断。 使用 --json 时,信封携带 query、tier(on-device 或 words)、tier_detail、dropped、unindexed、shown、total 和 results,以及当回答层级产生结果时的 top_score 和当请求的层级无法运行、或搜索未返回任何内容且仍有更好的层级在等待用户同意时的 warnings。words 层级的弱结果是预期的;on-device 层级的相同结果是 bug。top_score 仅用于 on-device 层级且背后没有阈值:对于每次查询,排序器都会以某种顺序返回整个目录,因此将其视为证据,而不是通过或失败。

  • dropped 和 unindexed 是注册表与设备端索引之间相反的偏差,更改查询措辞无法解决两者中的任何一个。 dropped 计算此注册表无法安装的已排名名称,因此正在丢失的是最强的匹配项。unindexed 计算索引根本无法看到的注册表动作,任何查询都无法返回。刷新注册表不是这两种情况的答案:它的清单具有 24 小时的 TTL 并且会自我修复,而向量是单独发布到 ~/.hyperframes/catalog/ 的工件。当 unindexed 大于零时,使用 --on-device 重新运行会重新获取该索引,这就是提供给用户的补救措施。纯粹的超覆盖偏差(dropped 大于零而 unindexed 为零)不会触发重新获取;清除 ~/.hyperframes/catalog/ 是解决该问题的唯一方法。这两个计数都是名称而不是结果,因此任何一个都可能超过 total。

  • 当搜索结果没有值得安装的内容时,请如实相告。 npx hyperframes feedback --search-miss "<你运行的查询>" --wanted "<你需要的动作>" --tier <回答的层级>。你不需要组装那一行:catalog --query 会预先填充它,并且每个 --json 搜索信封都将其携带为 report_gap,其中查询和层级已经正确——填写 --wanted 并发送。这是将查询发送到任何地方的唯一路径,并且它是一个单独的、深思熟虑的命令,正是为了确保普通的 catalog --query 保持其不发送任何内容的承诺。在任一层级上报告,只要结果没有实现该效果;不要专门等设备端层级,它需要用户同意下载 33 MB,因此在大多数代理运行中处于关闭状态——等它意味着永远不会报告。层级会随报告一起传递,因此词汇缺失与语义缺失之间仍然可以区分,而无需你判断遇到了哪一种。返回的是一份目录尚未拥有的动作列表,直接读取而非从安装计数猜测,因此重要的措辞是你想要的效果,而不是你想象的项目名称。它不携带任何评级,也永远不会进入评级指标。

  • 提供离线层;永远不要静默启用它。 一次性约 33 MB 的下载(bge-small-en-v1.5 的量化 ONNX 构建及其分词器,固定修订版)以及来自注册表的目录向量,两者都缓存在 ~/.hyperframes/ 下,不会添加到项目或任何包中。一旦缓存,它会根据语义进行排名,且不发送任何内容。大声说出大小,让用户决定,然后在他们同意后传递 --on-device(添加 -y 跳过提示)。交互式提示仅在 TTY 上触发。在 --json 下没有提示,但未找到任何内容的搜索会将相同的请求放在 warnings 中,因此请读取该数组并自行将决定权交给用户。当用户问下载是什么、为什么是这个模型、或者什么离开了机器时,请将他们引导到 https://hyperframes.heygen.com/developers/catalog-search。

  • 优先为代理和 CI 调用使用 --json。服务器模式 render、preview 和 play 不提供普通的 JSON 输出;preview --selection --json 和 preview --context --json 是查询模式的例外。

  • doctor --json 总是以零退出。基于其有效负载进行判断:

    npx hyperframes doctor --json | jq -e '.ok' >/dev/null
    
  • 非 TTY 模式是自动的,并搭建居中的空白项目。仅当要从命名示例开始时才传递 --example。使用 --non-interactive 在 TTY 上强制纯标志模式。

  • 在同一验证循环中的所有命令使用一个 HYPERFRAMES_RUN_ID。

  • 当磁盘空间紧张时,运行 npx hyperframes clean(先使用 --dry-run 列出内容);它会移除死渲染留下的文件和可以自我重建的空闲缓存,绝不会移除输出、源文件或正在运行的渲染使用的任何内容。将 QC 帧写入临时目录,而不是项目目录。

  • 当相应的警告、变量或 CI 条件必须阻塞渲染时,使用 --strict、--strict-all 和 --strict-variables。

  • JSON 路径会将主目录编辑为 $HOME;不要尝试逆转该编辑。

  • 当托管云项目接近或超过 200 MB 上传限制时,使用 cloud render --dry-run --json 并遵循 references/cloud.md 中的 .hyperframesignore 调查。永远不要仅仅因为资产大就忽略它。

  • 永远不要仅仅因为检查通过就渲染。在最终预览处暂停并等待批准。

Studio 导向的编辑

当用户提到“这个元素”或当前选择时,查询 Studio 而不是猜测:

npx hyperframes preview --context --json --context-fields selection

尽可能使用 selection.target.hfId,否则使用其选择器和源文件。如果结果报告 no-selection,要求用户点击该元素并重新运行。仅请求你需要的上下文切片;仅在需要计算样式或可编辑文本元数据时使用 --context-detail full。完整行为和错误代码位于 references/preview-render.md。

渲染选择

需求命令
快速本地迭代npx hyperframes render --quality draft
首次真正编码npx h

…

[因翻译被截断]

Individual skills in this repo

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

vijayahnlu/reels

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

vijayahnlu/reels

Use when audio already placed in a HyperFrames composition needs to be mixed: fade-in/fade-out, crossfade, track gain or volume, volume automation, ducking, a music bed that fights a voiceover (voiceover carve), effects on a track (EQ, compressor, limiter, gate, saturation, delay, reverb, chorus, phaser, bitcrush), automation envelopes drawn on a track's volume or any effect parameter, or one submix bus carrying a chain, a fader and an automation clock for several tracks at once (`<hf-audio-group>`). Don't use for sourcing or generating audio — finding BGM, SFX, or making a voiceover is `/media-use`. Don't use for clip timing or track layout, which is `/hyperframes-core`.

vijayahnlu/reels

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

vijayahnlu/reels

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`.

vijayahnlu/reels

Use when a HyperFrames composition needs a punch-in, punch-out, zoom, reframe, Ken Burns treatment, camera move, visual match/whip handoff, or other seek-safe 2D/3D keyframes; also for GSAP, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

vijayahnlu/reels

Search, install, and wire registry blocks and components into HyperFrames compositions. Use BEFORE hand-building any named visual — whenever a brief, a user, or a storyboard names a look, effect, treatment, or transition such as CRT scanlines, glitch, chromatic aberration, film grain, a shimmer sweep, a chart, a code or terminal window, a map, or a confetti burst — because roughly 400 hosted items already cover many of them and the search ranks all of them with nothing installed, no project, and no account. Also use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

vijayahnlu/reels

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

vijayahnlu/reels

Use when working with a person on a HyperFrames project in Studio: first, whether their message asks for a change at all (questions, loose ideas and "don't change anything" get an answer and a plan, not an edit); for a new film, the plan, storyboard and build order that the HyperFrames launch films follow; and how the timeline should be laid out so it reads well (one caption track, one element kind per track, every scene a sub-composition) and where captions and key content may sit (safe zones). Don't use for how to perform an individual edit (split, trim, retime, volume, copy, swap): that is `creator-editing-recipes.md` in `/hyperframes-core`.

vijayahnlu/reels

Agent Media OS for a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal. When the host app provides its own music or sound-effect tools, use those for music and sound effects; `resolve --type bgm|sfx` needs the heygen CLI. When `HEYGEN_API_BASE` is set, HeyGen calls go through that host with no CLI sign-in.

相关技能