Communitygithub.com

Biznomad/claude-skills

为 HyperFrames 编排进行资源预处理——文本转语音旁白 (Kokoro)、音频/视频转录 (Whisper) 以及用于透明叠加的背景移除 (u2net)。在需要从文本生成画外音、为字幕转录语音、移除视频或图像背景以用作透明叠加层、选择 TTS 语音或 whisper 模型,或将上述步骤串联起来 (TTS → 转录 → 字幕) 时使用。每个命令在首次运行时都会下载其对应的模型。

claude-skills 是什么?

这是一个专为 HyperFrames 创作工具设计的媒体资源预处理技能包,提供了三个核心命令行工具。`tts` 命令利用本地运行的 Kokoro-82M 模型进行文本转语音,无需任何 API 密钥,支持 54 种预设语音和包括中英文在内的多语言。`transcribe` 命令通过 Whisper 模型将音频或视频文件转录为包含单词级时间戳的标准化 `transcript.json` 文件,极其强调正确选择语言模型以避免意外翻译非英语内容。`remove-background` 命令则使用 u2net_human_seg 模型,从视频或图像中移除背景,生成带有透明度的 WebM 或 MOV 文件,用于创建演示者、头像等对象的透明叠加。该技能包支持在 macOS 和 Linux 上运行,每个工具在首次使用时都会自动下载模型并缓存至 `~/.cache/hyperframes/` 目录下,并提供了详细的语音选择指南、模型大小权衡、以及高级合成模式(如使用 `--background-output` 实现“抠图板”效果以在主体和背景之间放置文字),其标记引用自 hyperframes 技能。

兼容平台✓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(编辑用)
w
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; ...">MAKE IT IN 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; ...">MAKE IT IN 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 属性的元素)上强制设置 opacity: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.j

…

[为翻译截断]

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.

相关技能