Communitygithub.com

Aseel1600/Edit01

适用于用户拥有音乐曲目(音频文件或视频文件需提取音频)并希望生成一个与节拍同步的 HyperFrames 视频,风格从平缓到强烈。音乐驱动一切:一个分析器读取一次,编排器规划帧并填充每帧计划,一个子代理构建每帧。排版和模板是基础——完整视频无需任何素材——但用户提供的任何图像或视频都会在相同的节拍网格上剪切到帧中(节拍剪切 / 肯·伯恩斯效果)。风格(歌词视频、幻灯片、动态宣传片)由每帧的选择决定;流程从不根据风格分支。

Edit01 是什么?

Aseel1600/Edit01 是一个 AI 代理技能,用于根据单首音乐曲目创建节拍同步的 HyperFrames 视频。该技能的核心是工作流程:一个专用的节拍分析器(`analyze-beatgrid.py`)分析音频一次,生成一个 `audiomap.json`。然后,一个编排代理将曲目切割成帧(约 1-6 帧),确定每帧的节奏(节拍剪切或短语流动、情绪和感觉),并用可选的用户提供的图像或视频填充每个帧的计划。每个帧由一个独立的子代理(`frame-worker`)独立构建,产生一个自包含的 HTML 合成文件,这些文件随后被组装成一个最终的、可播放的 `index.html`。最终输出是一个 MP4 视频。该技能强调严格的顺序:设置、分析、帧骨架、计划批准(用户参与)、帧构建、组装和验证/渲染。用户参与的两个关键点是:计划批准(步骤 3)和最终渲染(步骤 6)。该技能旨在用于 Claude Code(或其他基于 HyperFrames 的 AI 编码代理),并假设一个预配置的 HyperFrames 环境。它特别强大,因为它提供了一个从音频分析到最终视频渲染的完全自动化的流程,只需最少的用户干预,适用于需要快速将音乐转化为视觉内容的开发者或内容创作者。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Aseel1600/Edit01/tree/HEAD/.agents/skills/music-to-video

在你喜欢的 AI 中提问

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

文档

music-to-video — 一个基于音乐、节拍同步的视频工作流

使用此技能将音乐曲目转换为与节拍同步的 HyperFrames 视频。您分析一次曲目,布置帧,填充每帧计划,并将每个帧构建为一个合成。输入是一首音乐曲目加上可选的用户图像或视频——没有旁白,也没有网站捕获。排版和模板是基础(完整视频无需任何素材);用户提供的任何媒体都会在同一个节拍网格上剪切进来。

您是指挥官。在 videos/<project>/ 中工作。按顺序运行步骤,并在继续之前通过每个关卡。两个步骤需要用户参与:步骤 3(计划批准)和步骤 6(渲染批准)。除了步骤 4(其中您为每个帧分派一个子代理)之外,您自己执行每个步骤。将设计规则和运动规则保留在此文件之外——它们位于 references/ 和 frame-worker 子代理中。

SKILL_DIR = 此技能目录。PROJECT_DIR = videos/<项目名称>/。

工作流:步骤 0 设置 → hyperframes.json + assets/bgm.mp3;步骤 1 分析 → audiomap.json;步骤 2 骨架 → STORYBOARD.md(帧,组 TBD);步骤 3 计划 → 完整的 STORYBOARD.md + frame.md;步骤 4 构建 → compositions/frames/NN-*.html;步骤 5 组装 → index.html;步骤 6 渲染 → renders/video.mp4。

塑造一切的两个理念

  • 一个分析器,并且您信任它。 analyze-beatgrid.py 是唯一的节拍分析器——永远不要用其他工具或耳朵重新测量节拍。它的能量/密度/滚动/起始点/静音始终可靠。其 bpm 和 beats_sec 仅当音乐具有真正的节奏感时才可靠;在平缓的音乐上,网格是跟踪器强加的一个节拍器,因此请根据乐句和能量调整节奏,并且永远不要硬切到它。判断您处于哪种情况是每个帧的 pacing(步骤 2)。
  • 一个帧 = 一个文件;组位于内部。 步骤 2 将曲目切割成帧,每个帧成为一个合成文件 compositions/frames/NN-<frame_id>.html,由一个 frame-worker 构建。一个帧可以细分为组(每个组是一个模板或一个运动基元组合)。额外的密度位于组_内部_,因此帧数跟踪不同的处理方式,而不是节拍——快速曲目不会增加子代理的数量。

步骤 0:设置、BGM 和输入

目标:确定音乐源,创建 HyperFrames 项目,并记录任何用户提供的媒体。

音乐是主轴——在任何其他事情之前先建立一首曲目。此技能针对快速、高能量的 BGM 进行了调整:强大的节拍网格驱动剪辑(平缓曲目也可以,但根据乐句而不是节拍调整节奏)。如果用户给您提供了音频——一个音乐文件,或一个要从中提取音频的视频——则使用它。如果没有,则生成一个:根据用户的描述选择情绪(例如“强有力的合成波”、“陷阱节拍”、“欢快的企业音乐”)并通过 /hyperframes-media(references/bgm.md——凭据可用时使用 HeyGen 检索,否则使用本地 Lyria / MusicGen;ElevenLabs 或其他生成器也可以)生成曲目。在生成之前,运行 npx hyperframes auth status 并逐字输出其结果(不要转述或重写)——它显示 BGM 是来自 HeyGen 还是本地 MusicGen,如果未登录,则显示如何登录。如果未登录,请停止并等待用户选择——登录,或使用本地 MusicGen 离线继续——然后再生成曲目;不要将密钥写入每个仓库的 .env。(在自主模式下,记下状态并离线继续。)有关规范指南,请参阅 /hyperframes-media → Preflight。无论哪种方式,曲目都会保存在 assets/bgm.mp3 中。暂存任何用户提供的图像或视频,以便帧可以在节拍网格上编织它们;否则排版将承载整个视频。

仅在 hyperframes.json 缺失时才初始化。根据简报以 kebab-case 命名 <project>,例如 midnight-drive-loop——永远不要使用时间戳。init 会检查已安装的技能与 GitHub 上的最新版本,并更新全局集合中的任何过时技能。

npx hyperframes init "videos/<project>" --non-interactive --example=blank
mkdir -p "$PROJECT_DIR/assets" "$PROJECT_DIR/renders"
cp "<user-music>" "$PROJECT_DIR/assets/bgm.mp3"   # 如果需要,先从视频中提取
# 仅当用户提供了图像/视频时:
node <SKILL_DIR>/scripts/stage-assets.mjs --from <dir> --hyperframes "$PROJECT_DIR" --into public

品牌(字体 + 调色板)在步骤 3 中选择,而不是现在。不要预先选择流派或曲目类型——素材只是一个可选成分,流派由每帧的选择决定。

关卡: hyperframes.json + assets/bgm.mp3 存在;已记录宽高比/长度/fps 以及(如果有的话)素材清单。


步骤 1:分析音乐

目标:生成整个视频所基于的规范时间分析。

analyze-beatgrid.py 是唯一的节拍分析器——永远不要用其他工具或耳朵重新测量节拍。它读取一次曲目并写入 audiomap.json:能量阶段(水平/密度/感觉)、起始点 + onset_rate、滚动、静音、hard_stops、key_moments、乐句、节奏/网格和 audio.duration_sec。它是确定性的——相同的文件总是给出相同的映射。大多数字段在任何音乐上都可靠;bpm 和 beats_sec 仅当音乐具有真正的节奏感时才可靠,判断这一点是您在步骤 2 中做出的决定。

先决条件:Python 3 带有 librosa、numpy 和 soundfile。如果导入失败,请在运行分析器之前将它们安装到活动的 Python 环境中:

python3 -m pip install librosa numpy soundfile
python3 <SKILL_DIR>/scripts/analyze-beatgrid.py "$PROJECT_DIR/assets/bgm.mp3" \
  -o "$PROJECT_DIR/audiomap.json" --print

关卡: audiomap.json 存在;audio.duration_sec 已知。


步骤 2:帧骨架(仅结构)

目标:读取音乐并布置帧——STORYBOARD.md 的骨架。

阅读 references/frame-skeleton.md。自行将 audiomap.json 转换为 STORYBOARD.md 的骨架——没有中间 JSON。在真实的音乐变化处(hard_stops、SURGE/DROP key_moments、滚动的边缘、没有起始点的区域、大的能量跳跃)将曲目切割成帧,将每个边界对齐到 audiomap 锚点。为每个帧设置 span_sec、pacing(对步骤 1 信任判断的裁决——当网格为实时为 beat_cut,当节拍器强加于平缓音乐时为 phrase_flow)、mood 和一行 feel(步骤 3 匹配模板所用的纯音乐情境)。在此处仅进行分类和布局:将每个帧的 ### Groups 保留为 TBD (Step 3),并将 frontmatter style 留空——没有模板、文案、颜色或字体。预期约 1-6 帧。

关卡: 帧平铺曲目(第一帧在 0,最后一帧在 duration_s);每个帧都带有 span_sec + pacing + mood + feel;每个 ### Groups 都是 TBD;任何地方都没有内容。


步骤 3:填充计划(用户关卡)

目标:将骨架转换为经批准的完整 STORYBOARD.md。

阅读 references/planning.md、storyboard-format.md、template-catalog.md、motion-primitive-catalog.md 和 montage.md(仅当用户提供素材时)。在原地编辑同一个文件,执行两项操作:

  1. 选择品牌。 从 ../hyperframes-creative/frame-presets/ 中选择一个预设,使用 ../hyperframes-creative/references/design-spec.md 中的表格(匹配曲目的情绪;只有其字体和颜色重要——模板拥有合成)。将其未经修改复制到 frame.md 中,并从中填充 frontmatter style(字体 + 最多 4-6 种颜色的调色板)。
  2. 填充每个帧。 决定其组并为每个组提供一种处理方式:从目录中匹配的模板(具有绑定参数和真实的 audiomap 锚点)、从基元目录中自由组合,或遵守 pacing 的素材处理。编写文案。您拥有 WHAT(模板/基元 + 内容 + 锚点);frame-worker 拥有 HOW——永远不要将毫秒级补间写入故事板。
node <SKILL_DIR>/scripts/validate-plan.mjs --storyboard "$PROJECT_DIR/STORYBOARD.md" \
  --audiomap "$PROJECT_DIR/audiomap.json" --templates <SKILL_DIR>/references/templates

修复每个 ✗(硬错误:持续时间不匹配、帧未平铺曲目、缺少 src);警告是最佳努力。然后向用户显示逐帧摘要,并迭代直到他们批准。

关卡: frame.md 是预设的逐字副本;validate-plan.mjs 以退出码 0 退出;用户批准了计划。


步骤 4:根据计划构建帧

目标:将每个帧构建为一个独立的合成文件。

创建 compositions/frames/。阅读 sub-agents/frame-worker.md 和 ../hyperframes-core/references/subagent-dispatch.md。为每个帧分派一个 frame-worker,尽可能并行(否则分批)。每个 worker 只获取一个帧和以下上下文:

PROJECT_DIR: <绝对路径>
frame_id: <NN-frame_id>              # = 帧文件名 stem,例如 02-f2;合成 id
您的块:`## Frame N — <frame_id>` 块位于 PROJECT_DIR/STORYBOARD.md
audiomap: PROJECT_DIR/audiomap.json
frame.md: PROJECT_DIR/frame.md
材料:对于每个组,<SKILL_DIR>/references/templates/<id>/index.html(模板)和
           <SKILL_DIR>/references/motion-primitives/<id>/(自由组合);已暂存的 assets/(素材组)
契约:../hyperframes-core/references/sub-compositions.md + determinism-rules.md
画布:<w>×<h>   节奏:<beat_cut|phrase_flow>
写入到:PROJECT_DIR/compositions/frames/<frame_id>.html

worker 分叉引用的材料,将每个锚点转换为帧局部秒数(local_t = track_t − span_sec[0]),以 0ms 剪切门控其组,并写入一个可搜索的帧文件。该 worker 从不运行 hyperframes CLI——这些命令操作已组装的项目的,该项目尚不存在,因此它们会报告错误的文件。worker 只需写入契约并停止;您在组装后验证(步骤 6)。每个 worker 返回时,您可以确认其文件已落到磁盘上。

关卡: 每个帧都有其 compositions/frames/NN-*.html 在磁盘上。


步骤 5:组装

目标:将构建的帧 + BGM 连接到可播放的 index.html 中。

assemble-index.mjs 是确定性的——没有子代理,没有判断。它在其累积的 data-start 处引用每个帧文件,将 assets/bgm.mp3 挂载到轨道 11 上,并硬切帧到帧(帧平铺曲目,没有间隙,因此没有过渡注入器)。

node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard "$PROJECT_DIR/STORYBOARD.md" \
  --hyperframes "$PROJECT_DIR" --audiomap "$PROJECT_DIR/audiomap.json"

修复其报告的任何 ✗——缺失或空白帧文件意味着该 worker 编写了部分文件;重新分派它(步骤 4)并重新组装。

关卡: index.html 存在;总持续时间 == audiomap.audio.duration_sec。


步骤 6:验证并渲染

目标:验证组装的视频,获得用户批准,并渲染最终的 MP4。

在已组装的项目上运行 CLI——这是正确的单元(逐帧 worker 无法运行它)。lint 检查结构,validate 运行无头 Chrome(捕获 JS 错误和缺失素材),inspect 快照帧。

( cd "$PROJECT_DIR" && npx hyperframes lint . && npx hyperframes validate . && npx hyperframes inspect . )

在 t=0、每个帧开始处、最强的 DROP/SURGE 处、每个 hard_stops[].t 处和最后一帧处进行检查。失败时,自行进行最便宜的安全修复:编辑有问题的 compositions/frames/NN-*.html。切勿更改持续时间或音频时序来隐藏同步问题。通过关卡后,暂停等待用户审查,然后仅在获得批准后渲染:

( cd "$PROJECT_DIR" && npx hyperframes render . --skill=music-to-video -q draft -o renders/video.mp4 --fps 30 )

关卡: lint / validate / inspect 通过;用户批准;renders/video.mp4 存在,带有音频,持续时间 == audiomap.audio.duration_sec。最终回复应说明 MP4 路径和持续时间。


恢复表

您现有的从何处继续
仅 assets/bgm.mp3步骤 1
audiomap.json步骤 2
STORYBOARD.md(骨架)步骤 3
STORYBOARD.md(完整)步骤 4
所有帧文件步骤 5
index.html步骤 6

快速参考

格式: 默认为横向 1920x1080;纵向 1080x1920;方形 1080x1080。在故事板 frontmatter 中设置一次画布(canvas: { w, h, fps })。

脚本位于 scripts/ 下:analyze-beatgrid.py(唯一分析器)、validate-plan.mjs(计划检查)、assemble-index.mjs(索引组装)、stage-assets.mjs(暂存用户媒体)、lib/storyboard.mjs(供应商解析器)。其他所有内容都是 hyperframes CLI。

阅读何时
references/frame-skeleton.md步骤 2:读取音乐,布置帧,设置节奏
references/planning.md · storyboard-format.md步骤 3:选择品牌,填充每个帧,编写计划
references/template-catalog.md步骤 3:为每个组选择模板
references/motion-primitive-catalog.md步骤 3:为自由组合帧创建基元组合
references/montage.md步骤 3(如果用户提供素材):编排素材以遵守节奏
sub-agents/frame-worker.md步骤 4:构建每个帧的合同
../hyperframes-core/references/subagent-dispatch.md步骤 4:正确分派子代理
../hyperframes-core/references/sub-compositions.md · determinism-rules.md步骤 4:帧编写规则
../hyperframes-creative/references/design-spec.md步骤 3:品牌预设

Individual skills in this repo

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

Aseel1600/Edit01

Generate AI videos from text prompts using multiple provider gateways. Use when: (1) Generating videos from text descriptions, (2) Creating AI-generated video clips for content production, (3) Image-to-video generation with a reference image, (4) Choosing between video generation providers (VEO, Kling, Sora, Runway, Seedance, MiniMax, Gemini Omni). Supports gateways: HeyGen API, fal.ai API, Kling official direct API, and the Gemini API (Gemini Omni Flash).

Aseel1600/Edit01

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

Aseel1600/Edit01

Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.

Aseel1600/Edit01

Review local character animation with schema checks, Playwright browser previews, frame sampling, and FFmpeg/ffprobe final output checks.

Aseel1600/Edit01

Create videos from a text prompt using HeyGen's Video Agent. Use when: (1) Creating a video from a description or idea, (2) Generating explainer, demo, or marketing videos from a prompt, (3) Making a video without specifying exact avatars, voices, or scenes, (4) Quick video prototyping or drafts, (5) One-shot prompt-to-video generation, (6) User says "make me a video" or "create a video about X".

Aseel1600/Edit01

Generate Mandarin and multilingual narration with Volcengine Doubao Speech 2.0. Use when creating Chinese voiceovers, when the user prefers Doubao/Volcengine/火山引擎/豆包 TTS, or when narration needs character-level timestamp metadata for subtitles.

Aseel1600/Edit01

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

Aseel1600/Edit01

Generate expressive, multilingual narration with fish.audio (S1 / S2-generation models) and reuse cloned voices via reference_id. Use when the user prefers fish.audio/Fish Audio TTS, wants a specific playground voice model, or needs high-emotion voice-clone narration.

Aseel1600/Edit01

Use when implementing Disney's 12 animation principles with Framer Motion in React applications

Aseel1600/Edit01

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). HyperFrames-native: single paused timeline, seek-safe, deterministic.

Aseel1600/Edit01

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

Aseel1600/Edit01

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.

Aseel1600/Edit01

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

Aseel1600/Edit01

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

Aseel1600/Edit01

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, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

Aseel1600/Edit01

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

Aseel1600/Edit01

Best practices for Remotion - Video creation in React

Aseel1600/Edit01

Toolkit-specific Remotion patterns — custom transitions, shared components, and project conventions. For core Remotion framework knowledge (hooks, animations, rendering, etc.), see the `remotion-official` skill.

Aseel1600/Edit01

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

Aseel1600/Edit01

Animate SVG character rigs with GSAP, CSS transforms, Remotion frame control, and HyperFrames-compatible browser previews.

相关技能