Communitygithub.com

sandeshrajbhandari/hyperframes-instruct

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

hyperframes-instruct 是什么?

该技能为HyperFrames视频合成平台提供了完整的CLI开发工作流,支持从项目初始化到最终渲染的全流程操作。它基于Node.js 22+和FFmpeg,通过'npx hyperframes'命令集实现模板创建、资产搜索、动作编排、时间线管理、lint检查、预览渲染及多平台部署(本地、HeyGen云、AWS Lambda、Google Cloud Run)。关键设计包括强制性的创作者编辑交叉引用(如关键帧路径、音频处理、子合成验证)、基于目录的重复利用优先原则(支持离线语义搜索)、以及严格的分级渲染质量(draft/looks/delivery)。此外,它还提供了智能历史管理(支持回合制撤销)、JSON输出模式(优化AI Agent token消耗)、以及基于浏览器会话的全面检查(含WCAG对比度审计)。该技能特别适合需要高效迭代、团队协作及多环境部署的视频创作场景。

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

在你喜欢的 AI 中提问

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

文档

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

HyperFrames CLI

除非项目说明提供了包装器,否则以npx hyperframes ...的形式运行命令。有包装器时,使用包装器。CLI需要Node.js 22或更高版本以及FFmpeg。

开发循环

  1. 脚手架: npx hyperframes init <project>(居中空白)。或者捕获站点。仅在需要从命名示例开始时传递--example=<name>。
  2. 找到动作: 如果请求指定了资源、声音、图像、语音或快速视觉编辑,在提出计划之前先通过/media-use解决。否则,在手工制作动画之前,搜索一个已经实现该效果的原始动作:npx hyperframes catalog --query "揭示一行一行出现的标题"。描述你想要的效果,而不是你想到的机制。使用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下,其聊天会接手此对话。如果没有桌面应用,则会以退出码1退出并打印下载链接。对Agent使用--json。
  10. 验证输出: 确认文件存在且非空。阅读渲染摘要的第二行(beginframe vs screenshot、GPU、阶段时间)。Linux上的screenshot + software gpu是慢路径。使用ffprobe -v error -show_format -show_streams并比较时长(如果简报中设置了fps,则比较fps)与根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。当片段放置或画面时间也改变时,同时加载核心。
  • 请求指定资源、声音、图像、语音或快速视觉编辑时,在提出计划之前先通过/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,然后使用一个浏览器会话和一个seek遍来审计运行时错误、失败的请求、布局、*.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了解相应的修复。

Agent惯例

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

  • 即使视频不是英语,也用英语查询。 两个层都索引英语目录,因此使用其他文字进行的查询不会产生可搜索的词条,并且不会返回任何结果。用英语描述动作;画面上的字幕保留视频所需的任何语言。查询中没有可搜索的单词 正是这个意思,并非缺少组件,因此不要将其报告为目录缺口。

  • 阅读哪个层回答了;永远不要从出现的结果推断。 使用--json时,信封包含query、tier(on-device或words)、tier_detail、dropped、unindexed、shown、total和results,以及当回答层产生top_score时的top_score和当请求的层无法运行或搜索未返回结果且更好的层仍在等待某人同意时的warnings。words层结果薄弱是正常的;同样的结果在on-device层出现则是Bug。top_score仅适用于on-device层,并且背后没有阈值:排序器会对每个查询按某种顺序返回整个目录,因此将其视为证据而不是通过或失败。

  • dropped和unindexed是注册表和on-device索引之间的相反偏差,重新措辞查询都无法解决。 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保持其不发送任何内容的承诺。在任一层面报告,只要结果没有做到所需的事情;不要等待on-device层,该层需要用户同意的33 MB下载,因此在大多数Agent运行中都是关闭的——等待它意味着永远不会报告。层信息会随报告一起传递,因此词汇缺失与含义缺失可以区分,而你无需判断自己遇到了哪种情况。返回的是目录中尚不存在的动作列表,直接读取而非根据安装次数猜测,因此重要的措辞是你想要的效果,而不是你想象的项目名称。它不携带评分,也永远不会进入评分指标。

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

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

  • doctor --json始终以退出码0退出。基于其负载进行判断:

    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 hyperframes render --quality looks --output out.mp4
最终本地交付npx hyperframes render --quality delivery --output out.mp4
可复现的容器渲染`npx hyperframes render --

Individual skills in this repo

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

sandeshrajbhandari/hyperframes-instruct

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

sandeshrajbhandari/hyperframes-instruct

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.

sandeshrajbhandari/hyperframes-instruct

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

sandeshrajbhandari/hyperframes-instruct

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.

sandeshrajbhandari/hyperframes-instruct

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

sandeshrajbhandari/hyperframes-instruct

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.

sandeshrajbhandari/hyperframes-instruct

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

sandeshrajbhandari/hyperframes-instruct

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.

sandeshrajbhandari/hyperframes-instruct

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

sandeshrajbhandari/hyperframes-instruct

Agent Media OS, the single skill for every media need in 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.

sandeshrajbhandari/hyperframes-instruct

A short, design-led motion graphic where motion is the message — kinetic typography, stat count-up, chart/data-viz hit, logo sting / brand lockup, lower-third / callout / social overlay, animated map (highlight regions, connect places, zoom to a location), animated tweet / news-article / headline, webpage / UI animation (scroll, cursor, callouts), or fusing a real image's geometry into a chart. Usually under 10s (up to ~30s), no narration or live-action subject; renders to MP4 or transparent overlay. Longer / narrated / multi-scene → /general-video. Unclear → /hyperframes.

相关技能