Communitygithub.com

Biznomad/agent-skills

HyperFrames 合成素材的预处理工具——文本转语音(Kokoro)、音视频转写(Whisper)以及透明叠加层的背景去除(u2net)。适用于从文本生成画外音、为字幕转写语音、去除视频或图像背景以用作透明叠加层、选择 TTS 语音或 Whisper 模型,或者将这些步骤串联(TTS → 转写 → 字幕)。每个命令首次运行时都会下载其模型。

agent-skills 是什么?

此技能提供了三个核心 CLI 命令,用于在 HyperFrames 合成项目中预处理媒体素材:`tts`(基于 Kokoro-82M 的本地文本到语音合成,无需 API 密钥,支持 54 种声音和多种语言)、`transcribe`(基于 Whisper 的音频/视频转写,生成带有单词级时间戳的 `transcript.json`,强调语言选择以避免破坏原文)、以及 `remove-background`(基于 u2net_human_seg 的视频/图像背景去除,默认生成支持透明度的 VP9 WebM 文件,可选 ProRes 4444 格式)。这些命令在首次运行时自动下载模型并缓存于 `~/.cache/hyperframes/`。该技能对开发者而言非常有用,因为它支持完全离线、本地运行,无需依赖外部 API,同时提供了详尽的指南,包括语音选择、多语言支持、转录模型尺寸的权衡,以及复杂合成场景(如文字置于主体之后)的背景去除最佳实践。它适用于 Mac 和 Linux 系统,需要 Python 3.8+ 及特定的 Python 包。

兼容平台~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 "这里是文本" --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(编辑用)
px 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)会导致一次 seek 和预热,使其与基础 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 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.

相关技能