Communitygithub.com

Elis3omndz/Claude_Skills

將音樂曲目(音訊檔案、可提取音訊的影片、或根據情緒簡報生成的曲目)轉換為節拍同步的影片——歌詞影片、幻燈片或動態宣傳片。音樂驅動所有節奏;使用者提供的任何圖片/影片都會被剪輯到相同的節拍網格上,且完整的影片無需任何素材即可生成。

Claude_Skills 是什麼?

此技能專注於將音樂曲目轉換為節拍同步的影片,支援歌詞影片、幻燈片和動態宣傳片等多種形式。它作為協調者,透過分析音樂、規劃幀、構建框架和渲染影片,自動化整個影片製作流程。此技能支援 Claude Code、Cursor、Codex 等 AI 代理平台,並透過 HyperFrames 框架實現。其核心依賴於一個統一的節拍分析器 `analyze-beatgrid.py`,確保時序精確;每個幀由專門的子代理構建,並在用戶批准計畫後組裝成最終影片。此外,還提供完整的驗證步驟和渲染支援,確保輸出高品質。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Elis3omndz/Claude_Skills/tree/HEAD/.claude/skills/music-to-video

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

外掛安裝: 在執行設定或更新命令之前,當此技能位於 HyperFrames 外掛內時,請遵循外掛執行規則。獨立安裝則保留以下更新說明。

首先,保持此技能最新——在執行前請先與使用者確認: npx hyperframes skills update music-to-video。若所有內容皆為最新,則此操作為無操作;否則,它會在您依賴此技能及其依賴的核心領域技能之前,更新它們。

音樂轉影片——一個基於音樂、節拍同步的影片製作工作流程

使用此技能將音樂曲目轉換為節拍同步的 HyperFrames 影片。您只需分析曲目一次,規劃幀,填寫每個幀的詳細計畫,並將每個幀構建為一個合成。輸入是一段音樂曲目以及使用者可選擇提供的圖片或影片——沒有旁白,也沒有網站擷取。排版和模板是基礎(一個完整的影片無需任何素材即可生成);使用者提供的任何媒體都會被剪輯到相同的節拍網格上。

您是協調者。在 videos/<project>/ 目錄下工作。依序執行各步驟,並在繼續之前通過每個關卡。有兩個步驟需要使用者參與:步驟 3(計畫批准)和步驟 6(渲染批准)——這兩個都是檢查點關卡,詳細說明請參閱 ../hyperframes/references/brief-contract.md(請在步驟 0 之前閱讀):在自主模式下,將步驟 3 的摘要作為提醒發布並繼續執行;步驟 6 的渲染批准仍需詢問,這是唯一保留的問題。請自行執行所有步驟,除了步驟 4,在此步驟中您需要為每個幀分派一個子代理。設計和動畫規則請不要放在此檔案中——它們位於 references/ 以及 frame-worker 子代理中。

SKILL_DIR = 此技能目錄。PROJECT_DIR = videos/<project-name>/。

工作流程:步驟 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:設定、背景音樂和輸入

目標:確定音樂來源,建立 HyperFrames 專案,並記錄使用者提供的任何媒體。

簡報從意圖層開始。 開放規則,依序為:(1) 存在 BRIEF.md → 讀取它,並詢問其中已回答的內容——其 flow/storyboard 推導出模式(簡報合約 § 1)。(2) 不存在 BRIEF.md 但專案已存在 → 從磁碟上的現有內容繼續;切勿重新詢問。(3) 直接到達此處的全新建請求 → 讀取 /hyperframes 並執行其意圖層(references/intent-interview.md):它確認此路由的必要條件(音樂來源、目的地→長寬比 — ../hyperframes/references/routes/music-to-video.md),並宣布哪些內容暫緩決定——品牌和類型按設計在步驟 3 中選擇。在初始化後立即編寫 BRIEF.md(切勿在此之前——init 會拒絕非空目錄),並記錄基於偏好的答案(brief-format.md)。編輯請求則跳過所有這些。

音樂是主幹——在進行任何其他操作之前先確定一首曲目。此技能針對快速、高能量的背景音樂進行了最佳化:強大的節拍網格驅動剪輯(平靜的曲目也可以,但應根據樂句而非節拍來安排節奏)。如果使用者提供了音訊——音樂檔案或可提取音訊的影片——請使用它。否則,根據請求中的情緒,透過 /media-use 生成一個曲目(audio/references/bgm.md)。在執行第一個經過驗證的提供者操作之前,請先執行 npx hyperframes auth status 並逐字輸出其結果。如果已登出,則應用以下分支之一:

  • 協作模式: 等待登入或明確選擇在離線狀態下使用本地提供者繼續。
  • 自主模式: 陳述狀態並繼續使用可用的本地提供者。

如果沒有離線提供者能滿足所需的音樂功能,則提出阻礙。切勿將金鑰寫入每個儲存庫的 .env 檔案。認證所有權和離線後備方案請參閱 /media-use references/setup-providers.md § 提供者。產生的曲目將放置在 assets/bgm.mp3。將提供的圖片或影片放置在對應位置,以便幀能夠在節拍網格上使用它們;否則,影片將由排版來承載。

歌詞影片: 若要將歌詞與人聲同步,請透過 /media-use 轉錄曲目以取得單詞/行時間,或向使用者索取歌詞文字,然後將歌詞行放置在節拍網格上。

僅在 hyperframes.json 不存在時才進行初始化。從簡報中以 kebab-case 命名 <project>,例如 midnight-drive-loop——切勿使用時間戳。init 會檢查已安裝技能與 GitHub 上最新版本的對比,並在有任何版本過期時更新全域技能集。

npx hyperframes init "videos/<project>" --non-interactive --example=blank --skill=music-to-video
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;已記錄長寬比/長度/幀率以及(如果有的話)素材庫存。


步驟 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 的素材處理方式。在您對一個命名外觀進行自由創作之前,請先在線目錄中搜尋它:對於使用者要求的每個外觀、效果、處理方法或過渡——例如「CRT 掃描線」、「故障效果」、「影片顆粒」、「閃爍掃掠」——請執行 npx hyperframes catalog --query "<外觀名稱,使用純英文>" --json 並閱讀頂部結果。template-catalog.md 和 motion-primitive-catalog.md 僅列出此技能本身的本地素材;搜尋功能會對整個託管註冊表(約 400 個區塊和組件)進行排名,且無需安裝任何東西——無需專案、無需事先的 add、無需帳戶。僅在搜尋後沒有找到合適的內容時,才對某個外觀進行自由創作。撰寫文案。您擁有 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);警告則盡力而為。然後在聊天中將逐幀摘要作為提案發布(../hyperframes/references/review-loop.md § 1),並根據使用者的回覆進行迭代直到他們批准;對於 storyboard: yes,也將其作為 storyboard.html 寫入(../hyperframes-creative/references/storyboard-recipe.md § 3)以便他們打開。在自主模式下,這是一個檢查點關卡:將摘要作為提醒發布並繼續執行(validate-plan.mjs 檢查是一個品質關卡,仍會阻止繼續)。

關卡: frame.md 是原始預設的副本;validate-plan.mjs 退出碼為 0;使用者已批准計畫(自主模式:摘要已作為提醒發布)。


步驟 4:根據計畫構建幀

目標:將每個幀構建為一個自包含的合成檔案。

建立 compositions/frames/ 目錄。閱讀 sub-agents/frame-worker.md 和 ../hyperframes/references/subagent-dispatch.md。為每個幀分派一個 frame-worker,盡可能並行執行(否則分批執行)。每個 worker 將僅處理一個幀以及此上下文:

PROJECT_DIR: <絕對路徑>
frame_id: <NN-frame_id>              # = 幀檔案主體名稱,例如 02-f2;合成 ID
您的區塊:PROJECT_DIR/STORYBOARD.md 中的 `## Frame N — <frame_id>` 區塊
audiomap: PROJECT_DIR/audiomap.json
frame.md: PROJECT_DIR/frame.md
素材:對於每個群組,<SKILL_DIR>/references/templates/<id>/index.html(模板)和
           <SKILL_DIR>/references/motion-primitives/<id>/(自由創作);staged 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:組裝

目標:將構建好的幀 + 背景音樂連線到可播放的 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 無法執行它)。check 執行 s

…

[因翻譯而截斷]

Individual skills in this repo

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

Elis3omndz/Claude_Skills

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Elis3omndz/Claude_Skills

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.

Elis3omndz/Claude_Skills

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.

Elis3omndz/Claude_Skills

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

Elis3omndz/Claude_Skills

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.

Elis3omndz/Claude_Skills

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

Elis3omndz/Claude_Skills

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.

Elis3omndz/Claude_Skills

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

Elis3omndz/Claude_Skills

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.

Elis3omndz/Claude_Skills

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.

Elis3omndz/Claude_Skills

Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR topic explainer (/faceless-explainer). Unclear → /hyperframes.

相關技能