Communitygithub.com

DansiDanutz/视频编辑器

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

视频编辑器 是什么?

此技能将 HyperFrames CLI 的强大功能直接集成到 AI 代理的工作流程中,实现了全面的视频编辑开发循环。它提供了一套丰富的命令,从项目初始化(`init`)、通过语义搜索(`catalog`)发现预设动画和资产,到添加和使用这些资产(`add`)。核心开发流程强调通过 `lint` 快速迭代、通过 `check` 进行最终验证(包含 lint 和浏览器审计),并通过 `preview` 打开 Studio 预览以供人工审批。关于特定编辑任务(如关键帧动画、音频处理和合成管理)的详细参考资料可通过交叉引用的 Markdown 文件获得,这些文件会自动进行审查。 该技能适用于通过 `npx hyperframes` 运行的任何项目,并涵盖多种渲染后端:本地渲染(`render`)、HeyGen 托管云渲染(`cloud render`)、无服务器 AWS Lambda(`lambda render`)和 Google Cloud Run(`cloudrun render`)。对于 AI 代理而言,关键约定包括在手动制作动画之前搜索目录、使用 JSON 输出(`--json`)以优化令牌效率,以及通过 `feedback --search-miss` 报告目录缺失。该技能强调了结构化的工作流程:在提出计划之前,先通过 `/media-use` 解析资产请求,使用 `timeline --json` 理解项目结构,并在逆向操作时利用 `history` 系统进行安全的协作编辑。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/DansiDanutz/Video-Editor/tree/HEAD/.claude/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 而非文本形式;它在相同或更好的正确性下消耗更少的令牌。参见 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. 验证输出: 确认文件存在且非空。读取渲染摘要的第二行(beginframe vs screenshot、GPU、阶段计时)。screenshot + software gpu 在 Linux 上是较慢的路径。ffprobe -v error -show_format -show_streams 并比较持续时间和帧率(如果简要中设置了的话)与根 data-duration。

你轮次中的项目历史记录

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

  • 轮次开始: npx hyperframes history begin --who <你的名字> --label "<你将要做什么>",然后运行 npx hyperframes history --since mine --who <你的名字> 以查看此人自你上一轮次以来更改了什么。基于他们的编辑;切勿覆盖它们。
  • 检查失败,或用户说情况变糟: npx hyperframes history undo --who <你的名字> 撤销你最新的轮次,并保留用户的编辑。不要手动编辑回退。如果发生冲突,它会以退出码 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,然后使用一个浏览器会话和一个遍历过程来审计运行时错误、失败的请求、布局、*.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 以改为根据含义排名(参见下面的离线层)。

  • 即使用户视频不是英文,也用英文查询。 两个层都索引英文目录,因此使用其他语言的查询不会产生可搜索的术语并返回空结果。用英文描述动作;屏幕上的文字保持视频所需的任何语言。查询中无可搜索的单词 正是这个意思,并且不是缺失组件,因此不要将其报告为目录差距。

  • 读取哪个层回答了;永远不要从结果出现来推断它。 使用 --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 是注册表和 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 下载,因此在大多数代理运行中都是关闭的——等待它意味着永远不会报告。层信息会随报告一起发送,因此词汇错过与语义错过是可区分的,而无需你判断你遇到了哪一种。返回的是目录尚未拥有的动作列表,直接读取而非从安装计数中猜测,因此重要的措辞是你想要的效果,而不是你想象的项目名称。它不携带评级,也永远不会进入评级指标。

  • 提供离线层;永远不要静默启用它。 一次性约 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 始终以退出码 0 退出。基于其有效载荷进行判断:

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

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

  • 当相应的警告、变量或 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 --docker --strict --output out.mp4
本地变量驱动的批量渲染npx hyperframes render --batch rows.json --output "renders/{name}.mp4"
HeyGen 托管的零基础设施渲染npx hyperframes cloud render
自管理分布式 AWS 渲染npx hyperframes lambda render <project> --width 1920 --height 1080 --wait
自管理分布式 GCP 渲染npx hyperframes cloudrun render <project> --width 1920 --height 1080 --wait

技能归属是自动的——上面的示例不需要 --skill。一个

Individual skills in this repo

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

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

Use when building or editing a HyperFrames project that people open in Studio: 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`.

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

Turn a product or marketing URL, pasted script, or brief into a product launch / promo video — SaaS promos, feature reveals, product demos, app and company launches. Use when the user wants to market, launch, promote, or reveal a product; the default for any commercial URL. Site tours / showcases of a website route here too — the brief carries the show-it-as-is intent. Unclear → /hyperframes.

DansiDanutz/Video-Editor

Divide a finished story/script into filmable scenes with per-scene image and animation prompts. Use when building a scene outline or shot list, deciding scene boundaries, durations, or what each visual must show.

DansiDanutz/Video-Editor

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

相关技能