Communitygithub.com

Biznomad/claude-skills

為 HyperFrames 合成進行素材前置處理 — 文字轉語音旁白 (Kokoro)、音訊/影片轉錄 (Whisper),以及用於透明疊加層的背景移除 (u2net)。

claude-skills 是什麼?

這個技能集合了三個 CLI 指令,讓開發者能為 HyperFrames 合成準備素材:`tts` 使用 Kokoro-82M 模型進行本機文字轉語音,`transcribe` 使用 Whisper 生成含逐字時間戳的轉錄文字,`remove-background` 則使用 u2net_human_seg 移除影片或圖片背景,產生透明疊加層。每個指令在首次執行時會自動下載與快取模型,無需額外API金鑰。此技能支援多種使用場景,包括從文字生成旁白、為字幕轉錄語音、建立透明疊加的主體遮罩,以及將 TTS 與轉錄串聯產生字幕所需的時間戳。它適用於 Claude Code 等支援 npm / npx 指令的 AI 代理平台,並提供進階選項,如多語 TTS、模型大小選擇 (`tiny` 到 `large-v3`) 以及品質預設 (`fast`、`balanced`、`best`)。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Biznomad/claude-skills/tree/HEAD/hyperframes-media

在你喜歡的 AI 中提問

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

預覽

來自技能 README

說明文件

HyperFrames 媒體前置處理

三個用於產生合成素材的 CLI 指令:tts (語音)、transcribe (時間戳) 和 remove-background (透明影片)。每個指令在首次執行時會下載模型,並快取在 ~/.cache/hyperframes/ 目錄下。將輸出放入專案後,即可在合成 HTML 中引用 — 音訊/影片元素的慣例請參閱 hyperframes 技能。

文字轉語音 (tts)

使用 Kokoro-82M 在本機產生語音音訊。無需 API 金鑰。

npx hyperframes tts "Text here" --voice af_nova --output narration.wav
npx hyperframes tts script.txt --voice bf_emma --output narration.wav
npx hyperframes tts --list                       # 所有 54 種聲音

聲音選擇

根據內容類型選擇聲音。預設為 af_heart。

內容類型聲音原因
產品示範af_heart/af_nova溫暖、專業
教學 / 操作指南am_adam/bf_emma中立、易於理解
行銷 / 宣傳af_sky/am_michael充滿活力或權威感
文件bf_emma/bm_george清晰的英式英語、正式
休閒 / 社群af_heart/af_sky平易近人、自然

多語言

聲音 ID 透過第一個字母編碼語言:a=美式英語、b=英式英語、e=西班牙語、f=法語、h=印地語、i=義大利語、j=日語、p=巴西葡萄牙語、z=中文。CLI 會自動從前綴偵測音素化區域設定 — 當聲音與文字匹配時,無需 --lang 參數。

npx hyperframes tts "La reunión empieza a las nueve" --voice ef_dora --output es.wav
npx hyperframes tts "今日はいい天気ですね" --voice jf_alpha --output ja.wav

僅在需要覆蓋自動偵測(例如風格化口音)時使用 --lang。有效的語言代碼:en-us、en-gb、es、fr-fr、hi、it、pt-br、ja、zh。非英語的音素化需要系統全域安裝 espeak-ng(brew install espeak-ng / apt-get install espeak-ng)。

語速

  • 0.7-0.8 — 教學、複雜內容、無障礙存取
  • 1.0 — 自然語速(預設)
  • 1.1-1.2 — 開場、轉場、活潑內容
  • 1.5+ — 很少適用;請仔細測試

長篇幅腳本

對於超過幾段的內容,請寫入 .txt 檔案並傳遞檔案路徑。超過約 5 分鐘語音的輸入,最好分段處理。

系統需求

Python 3.8+ 並安裝 kokoro-onnx 和 soundfile(pip install kokoro-onnx soundfile)。模型在首次使用時下載(約 311 MB + 27 MB 聲音,快取在 ~/.cache/hyperframes/tts/)。

轉錄 (transcribe)

產生包含逐字時間戳的標準化 transcript.json 檔案。

npx hyperframes transcribe audio.mp3
npx hyperframes transcribe video.mp4 --model small --language es
npx hyperframes transcribe subtitles.srt          # 匯入現有檔案
npx hyperframes transcribe subtitles.vtt
npx hyperframes transcribe openai-response.json

語言規則(不可協商)

除非使用者明確指出音訊是英語,否則絕對不要使用 .en 模型。 .en 模型(small.en、medium.en)會翻譯非英語音訊成英語,而非進行轉錄。這會靜默地破壞原始語言。

  1. 語言已知且非英語 → --model small --language <code>(不加 .en 後綴)
  2. 語言已知且為英語 → --model small.en
  3. 語言未知 → --model small(不加 .en、不加 --language)— whisper 會自動偵測

預設模型為 small,而非 small.en。

模型大小

模型大小速度使用時機
tiny75 MB最快快速預覽、測試管線
base142 MB快短片、清晰音訊
small466 MB中等預設 — 大多數內容
medium1.5 GB慢重要內容、吵雜音訊、音樂
large-v33.1 GB最慢製作品質

含人聲的音樂:至少從 medium 開始;生成的音軌通常需要手動匯入 SRT/VTT。對於字幕品質檢查(每次轉錄後必須執行)、清理 JS、重試規則以及 OpenAI/Groq API 匯入路徑,請參閱 hyperframes/references/transcript-guide.md。

輸出格式

合成使用一個包含單字物件的扁平陣列。標準化過程中會新增 id 欄位(w0、w1、...),以便在字幕覆寫中提供穩定的引用;為保持向後相容,這是選用欄位。

[
  { "id": "w0", "text": "Hello", "start": 0.0, "end": 0.5 },
  { "id": "w1", "text": "world.", "start": 0.6, "end": 1.2 }
]

背景移除 (remove-background)

移除影片或圖片的背景,使主體(通常是人 — 虛擬替身、簡報者、說話頭像)作為合成中的透明疊加層。

npx hyperframes remove-background subject.mp4 -o transparent.webm  # 預設:VP9 alpha WebM
npx hyperframes remove-background subject.mp4 -o transparent.mov   # ProRes 4444(剪輯用途)
 npx hyperframes remove-background portrait.jpg -o cutout.png       # 單張圖片去背
npx hyperframes remove-background subject.mp4 -o subject.webm \
  --background-output plate.webm                                   # 一次處理產生兩層
npx hyperframes remove-background subject.mp4 -o transparent.webm --device cpu
npx hyperframes remove-background --info                           # 偵測到的供應商

使用 u2net_human_seg (MIT 授權)。首次執行會下載約 168 MB 的權重至 ~/.cache/hyperframes/background-removal/models/。

圖層分離 (--background-output)

傳遞 --background-output(或 -b)以在去背圖層旁另外產生一個透明影片:相同的原始 RGB,但 Alpha 是 255 − 遮罩 而非 遮罩。去背圖層是帶有透明背景的主體;底層圖層是原始背景,主體位置則為透明空洞。

檔案Alpha 是…用途
-o subject.webm遮罩 — 主體不透明,背景透明前景圖層,放置在上方
--background-output plate.webm反向 — 背景不透明,主體區域透明底層圖層;將文字或圖形放在此層與主體之間

兩個輸出共用相同的 --quality 預設值,並由單次推論產生 — 編碼成本約為兩倍,分割成本不變。僅對影片輸入和 .webm/.mov 輸出有效。

挖洞底層,非修補底層。 plate.webm 中的主體區域是完全透明的 — 在其下方合成不透明內容以填補空洞。判斷 --background-output 是否為正確工具的唯一測試:在主體原本所在的位置,是否會有任何東西透過主體的輪廓被看到?

使用案例正確工具
文字/圖形位於去背圖層與底層之間(此指令存在的原因)挖洞 (--background-output)
主體放置到不相關的場景只需 subject.webm;忽略底層
單獨顯示沒有人的房間,沒有其他內容修補底層 — 需要修補器(LaMa、ProPainter、E2FGVI)。非此指令。
將主體替換為不同主體修補底層 — 同上述理由

如果使用者要求「移除人之後的房間」並打算單獨顯示,不要使用 --background-output。告訴他們需要使用修補器。

典型的圖層合成(標準的挖洞使用案例):

<!-- z=1 反向 Alpha 底層填滿整個畫面,除主體區域外 -->
<video
  src="plate.webm"
  data-start="0"
  data-duration="6"
  data-track-index="0"
  muted
  playsinline
></video>

<!-- z=2 圖形 / 文字位於兩層之間 -->
<h1 id="headline" style="z-index:2; ...">用 HyperFrames 打造</h1>

<!-- z=3 去背圖層將主體浮在標題之上 -->
<div class="cutout-wrap" style="position:absolute;inset:0;z-index:3">
  <video
    src="subject.webm"
    data-start="0"
    data-duration="6"
    data-track-index="1"
    muted
    playsinline
  ></video>
</div>

這在功能上等同於下方文字在主體之後的模式,但不需要在專案中保留原始的 presenter.mp4 — 底層取代了它。當您只想提供兩個透明圖層,並讓使用者在它們之間放置任意內容時,這非常有用。

輸出格式

格式使用時機
.webm (VP9 + alpha)預設。合成直接透過 <video> 播放。
.mov (ProRes 4444)在 DaVinci/Premiere/FCP 中剪輯。檔案較大。
.png單張圖片去背(靜態主體,疊加於背景之上)。

Chrome 瀏覽器原生支援 VP9 alpha 解碼,因此 .webm 可以像其他靜音自動播放影片一樣插入合成中 — <video> 軌道慣例請參閱 hyperframes 技能。

品質預設

--quality fast|balanced|best 僅控制 VP9 編碼器的 CRF — 分割品質是固定的。

預設CRF使用時機
fast30疊代調整、檔案較小、色彩匹配較寬鬆
balanced18預設。對大多數用途來說視覺上無差異
best12母版 / 最終交付。檔案最大,匹配最嚴謹

合成模式 — 選擇正確的模式

去背 WebM 是來源 MP4 RGB 的重新編碼副本。此選擇會根據您放在其後方的內容而產生後果:

模式去背圖層後方是什麼結果
去背圖層疊加於不同場景(最常見)靜態圖片、漸層或無關影片效果極佳。去背圖層的 RGB 是主體的唯⼀來源 — 沒有重複,沒有邊緣光暈。這是 remove-background 的設計目的。
去背圖層疊加於自身的原始 MP4(文字在主體之後)產生去背圖層的那個 MP4同一個人有兩個 RGB 來源。在預設 --quality balanced (crf 18) 下,重複幾乎不可見;在 --quality fast (crf 30) 下,您會看到輕微的色彩偏移 / 邊緣光暈。製作母版時使用 --quality best (crf 12)。
去背圖層疊加於同一個人的_不同_鏡次同一主體的素材看起來像是兩個不同的人重疊。請勿這樣做。

文字在主體之後(標題位於簡報者後方):

<video
  src="presenter.mp4"
  id="bg"
  data-start="0"
  data-duration="6"
  data-track-index="0"
  muted
  playsinline
></video>
<h1 id="headline" style="z-index:2; ...">用 HyperFrames 打造</h1>
<div class="cutout-wrap" style="position:absolute;inset:0;z-index:3;opacity:0">
  <video
    src="presenter.webm"
    data-start="0"
    data-duration="6"
    data-track-index="1"
    muted
    playsinline
  ></video>
</div>

兩個關鍵規則:

  1. 將去背影片包裹在一個不具時間屬性的 <div> 中,並動畫化包裹層的不透明度,而非影片元素本身。框架會強制作用中的片段(任何具有 data-start/data-duration 屬性的元素)的不透明度為 1,因此直接動畫化影片的不透明度會被靜默覆蓋。包裹層沒有 data-* 屬性,因此它歸您的 CSS/GSAP 控制。
  2. 兩個影片都使用 data-start="0" 和 data-media-start="0",以便框架從 t=0 開始同步解碼它們。延遲裝載去背圖層(data-start=3.3)會引入一次尋軌 + 預熱,導致與基礎 MP4 相差一幀 — 在切換點會出現一幀的錯位。

然後,在切換點使用 GSAP 翻轉包裹層的不透明度:tl.set(cutoutWrap, { opacity: 1 }, 3.3)。

TTS → 轉錄 → 字幕

當沒有預先錄製的旁白時,產生一個並將其轉錄回來,以獲得用於字幕的逐字時間戳:

npx hyperframes tts script.txt --voice af_heart --output narration.wav
npx hyperframes transcribe narration.wav   # → transcript.json

Individual skills in this repo

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

Biznomad/claude-skills

TikTok Ads deep analysis covering creative quality, tracking, bidding, campaign structure, and TikTok Shop. Evaluates 25 checks with emphasis on creative-first strategy, safe zone compliance, and Smart+ campaigns. Use when user says "TikTok Ads", "TikTok marketing", "TikTok Shop", "Spark Ads", "Smart+", or "TikTok campaign".

Biznomad/claude-skills

YouTube Ads specific analysis covering campaign types, creative quality, audience targeting, and measurement. Evaluates video ad performance across skippable, non-skippable, bumper, Shorts, and Demand Gen formats. Use when user says "YouTube Ads", "video ads", "pre-roll", "bumper ads", "YouTube campaign", or "Shorts ads".

Biznomad/claude-skills

Help users get promoted at work. Use when someone is preparing for a promotion conversation, building their case for advancement, trying to understand what's blocking their promotion, or figuring out how to get to the next level in their career.

Biznomad/claude-skills

CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

Biznomad/claude-skills

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

Biznomad/claude-skills

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, and registry discovery.

Biznomad/claude-skills

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For dev-loop CLI commands (init, lint, inspect, preview, render) see the hyperframes-cli skill; for asset preprocessing commands (tts, transcribe, remove-background) see the hyperframes-media skill.

Biznomad/claude-skills

Optimize landing pages for higher conversion rates using proven frameworks and design patterns. Use when designing, reviewing, or improving landing pages, hero sections, pricing pages, CTAs, or when the user asks about conversion optimization.

Biznomad/claude-skills

Building promotion cases, brag documents, tracking wins, and self-advocacy for career advancement. Use when preparing for promotions, documenting accomplishments, or building your case for advancement.

Biznomad/claude-skills

Translate an existing Remotion (React-based) video composition into a HyperFrames HTML composition. Use ONLY when the user explicitly asks to port, convert, migrate, translate, or rewrite a Remotion composition as HyperFrames (e.g. "port my Remotion project to HyperFrames"). Do NOT use when (a) authoring a NEW HyperFrames composition (even if A/B-testing a Remotion video); (b) Remotion is mentioned in passing; (c) Remotion code is shared as reference, not for translation; (d) the user wants "the same video as my Remotion one" without explicitly asking to migrate the source — treat as a fresh HyperFrames build. When in doubt, default to the `hyperframes` skill. Detects unsupported patterns (useState, useEffect side effects, async calculateMetadata, third-party React component libraries, `@remotion/lambda`) and recommends the runtime interop escape hatch instead of a lossy translation.

Biznomad/claude-skills

Produce programmable videos with Remotion using scene planning, asset orchestration, and validation gates for automated, brand-consistent video content.

Biznomad/claude-skills

Generate cinematic film-style video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants cinematic, film-like, movie-quality, Hollywood-style, dramatic, or professional film-quality AI video. Triggers on: cinematic, film look, movie scene, dramatic lighting, depth of field, lens flare, anamorphic, letterbox, noir, epic, Steadicam, dolly, crane shot, or any cinematic video generation request. Always use this skill even if the user doesn't explicitly say "cinematic" but describes a film-like aesthetic.

Biznomad/claude-skills

为 Seedance 2.0(Higgsfield)生成电影级胶片风格视频提示词。在用户想要电影级、胶片感、电影质量、好莱坞风格、戏剧性或专业胶片质量的AI视频时使用。触发词:电影级、胶片感、电影场景、戏剧性打光、景深、镜头光晕、变形、信箱式、黑色电影、史诗、稳定摄像机、推车镜头、吊臂镜头或任何电影级视频生成请求。即使用户没有明确说"电影级"但描述了胶片美学,也要使用此技能。

Biznomad/claude-skills

Convert comic book panels, manga pages, webtoons, and illustrated storyboards into animated video using Seedance 2.0 on Higgsfield. Use whenever the user wants to animate comics, bring illustrations to life, convert manga to video, animate storyboards, or create motion from static sequential art. Triggers on: comic to video, manga animation, panel animation, storyboard to video, webtoon animation, comic book motion, sequential art, graphic novel animation, or any illustrate-to-animate request. Use even when user says "make this drawing move" or "animate this page.

Biznomad/claude-skills

Generate music video and beat-synced visual content prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants to create a music video, lyric video, beat-synced visuals, performance video, concert visual, album art animation, or music-driven visual content. Triggers on: music video, lyric video, beat sync, music visualization, performance video, concert visual, album visual, song video, music clip, beat drop visual, rhythm sync, or any music-driven video request. Use even for "make visuals for my song" or "video for this track.

Biznomad/claude-skills

Build, redesign, and deploy websites across any stack — static HTML, Next.js, Astro, or Shopify Liquid themes. Handles design systems, brand-aware layouts, component architecture, and deployment pipelines (Netlify, Vercel, Shopify API). Use when asked to build a website, redesign a site, create a landing page, build a web app, create Shopify sections/templates, or deploy web projects. Triggers on requests like "build me a website", "redesign this page", "create a landing page", "build a Shopify theme", "deploy to Netlify".

Biznomad/claude-skills

Capture a website and create a HyperFrames video from it. Use when: (1) a user provides a URL and wants a video, (2) someone says "capture this site", "turn this into a video", "make a promo from my site", (3) the user wants a social ad, product tour, or any video based on an existing website, (4) the user shares a link and asks for any kind of video content. Even if the user just pastes a URL — this is the skill to use.

相關技能