Communitygithub.com

Biznomad/agent-skills

HyperFrames 組合的資產前置處理 — 文字轉語音旁白 (Kokoro)、音訊/影片轉錄 (Whisper) 及透明疊加層的去背 (u2net)。用於從文字生成旁白、為字幕轉錄語音、移除影片或影像背景以作為透明疊加層、選擇 TTS 語音或 Whisper 模型,或將這些步驟串聯 (TTS → 轉錄 → 字幕)。每個指令在首次執行時會下載其模型。

agent-skills 是什麼?

此技能提供三個 CLI 指令,用於 HyperFrames 組合的媒體資產前置處理:`tts` 使用 Kokoro-82M 模型在本地生成語音,無需 API 金鑰;`transcribe` 使用 OpenAI Whisper 模型產生具備逐字時間戳的標準化 `transcript.json`;`remove-background` 則使用 u2net_human_seg 模型從影片或影像中移除背景。每個指令都會在首次執行時下載其模型,並快取在 `~/.cache/hyperframes/` 目錄下,支援多種語言 (TTS 涵蓋美式英語、英式英語、西班牙語等;轉錄則透過 Whisper 自動偵測語言) 和可調整的品質/速度設定。它與 HyperFrames 組合系統無縫整合,產生的資產可直接用於 `<video>` 元素,特別是 `remove-background` 指令支援層分離 (`--background-output`),可在主體背後放置文字或圖形而不需要原始影片。此技能專為 HyperFrames 生態系設計,也可與支援基於 CLI 的媒體處置工作流程的其他環境相容。

相容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Biznomad/agent-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 − mask 而不是 mask。去背圖像是具有透明背景的主體;背景圖層是具有透明洞口的原始環境,該洞口即主體所在位置。

檔案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 可以像任何其他靜音自動播放影片一樣插入組合中 — 請參閱 hyperframes 技能以了解 <video> 音軌慣例。

品質預設

--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 20 individual skills — each has its own dedicated page.

Biznomad/agent-skills

Landing page quality assessment for paid advertising campaigns. Evaluates message match, page speed, mobile experience, trust signals, form optimization, and conversion rate potential. Use when user says "landing page", "post-click experience", "landing page audit", "conversion rate", or "landing page optimization".

Biznomad/agent-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/agent-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/agent-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/agent-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/agent-skills

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.

Biznomad/agent-skills

Read-only queue dashboard for workspace-aware ship. Shows which VERSION slots are currently claimed by open PRs, which sibling Conductor workspaces have WIP work likely to ship soon, and what slot /ship would pick next. No mutations — just a snapshot. Use when asked to "landing report", "what's in the queue", "show me open PRs", or "which version do I claim next". (gstack)

Biznomad/agent-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/agent-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/agent-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/agent-skills

Still-to-video conversion guide: model selection, motion prompting, and camera movement. Covers Wan 2.5 i2v, Seedance, Fabric, Grok Video with when to use each. Use for: animating images, creating video from stills, adding motion, product animations. Triggers: image to video, i2v, animate image, still to video, add motion to image, image animation, photo to video, animate still, wan i2v, image2video, bring image to life, animate photo, motion from image

Biznomad/agent-skills

>- The Landing Page Audit skill performs comprehensive evaluations of post-click experiences, combining technical performance analysis with conversion rate optimization (CRO) assessment.

Biznomad/agent-skills

Write high-converting landing page copy using proven frameworks like PAS (Problem-Agitate-Solution), AIDA, and StoryBrand. Creates headlines, value propositions, CTAs, and full page sections optimized for conversion. Use when users need landing page copy, sales page content, or marketing website text.

Biznomad/agent-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/agent-skills

Read-only queue dashboard for workspace-aware ship. (gstack)

Biznomad/agent-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/agent-skills

Best practices for Remotion - Video creation in React

Biznomad/agent-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/agent-skills

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

Biznomad/agent-skills

Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.

相關技能