Communitygithub.com

Biznomad/claude-skills

仅当用户明确要求将 Remotion 视频合成移植、转换、迁移、翻译或重写为 HyperFrames HTML 合成时使用。否则请勿使用此技能。

claude-skills 是什么?

该技能专门用于将基于 React 的 Remotion 视频合成自动翻译为 HyperFrames(HTML + GSAP)合成。翻译过程高度机械化,约 80% 的常见 Remotion 用法(如 useCurrentFrame、interpolate、Sequence、Audio、Img 等)都有直接的 HyperFrames 映射关系。技能内置了分级测试语料库(T1-T4 共 4 个测试用例),并通过结构相似性指数(SSIM)阈值自动验证翻译质量,确保输出结果在视觉上与原始 Remotion 版本高度一致。 核心工作流程包括四个步骤:首先对源代码进行 lint 检查,检测 useState、useEffect 等无法直接翻译的阻塞模式,若发现则停止翻译并推荐运行时互操作(runtime interop)方案;其次根据 API 映射表按需加载相关参考文档(如参数、时序、媒体、字体等);然后生成包含 GSAP 时间线和注册的 index.html 文件;最后运行评估工具验证 SSIM 差异。 该技能明确不支持基于状态机的动画模式(如 useState + useEffect 驱动的动画),也不支持同时运行 Remotion 渲染管道。对于无法翻译的复杂性,它会推荐使用 HyperFrames 的运行时互操作方案(来自 PR #214)。该技能适用于 Claude Code、Cursor、Codex 等 AI 编码助手平台。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Remotion 到 HyperFrames

概述

将 Remotion(基于 React 的视频合成)翻译为 HyperFrames(HTML + GSAP)合成。大多数 Remotion 惯用用法都有直接的 HyperFrames 等价物——对于典型的合成,约 80% 的翻译是机械化的。此技能编码了映射关系,并通过拒绝翻译不适合 HF 基于帧定位的模型的模式来保护那有问题的 20%,并推荐使用 PR #214 中的运行时互操作方案。

该技能附带了一个分级测试语料库(T1–T4,共 4 个测试用例),这些用例根据测量的 SSIM 阈值对翻译结果进行评分。不运行评估就不能进行翻译——一个"看起来没问题"但 SSIM 比已验证基线低 0.05 的翻译实际上是错误的。

何时使用

仅当用户明确要求从 Remotion 迁移时,才使用此技能。 示例触发短语:

  • "将我的 Remotion 项目移植到 HyperFrames"
  • "将此 Remotion 代码转换为 HyperFrames"
  • "从 Remotion 迁移"
  • "翻译此 Remotion 合成"
  • "将此重写为 HyperFrames HTML"

在以下情况下请勿使用此技能:

  • (a) 用户正在创作新的 HyperFrames 合成,即使他们拥有或正在 A/B 测试类似的 Remotion 视频。
  • (b) 用户在交谈中顺便提及 Remotion,但未要求迁移。
  • (c) 用户分享 Remotion 代码作为参考材料,但未要求翻译。
  • (d) 用户要求"和我的 Remotion 视频一样的视频",但没有明确要求迁移源代码——这应视为全新的 HyperFrames 构建。

如有疑问,应改用 hyperframes 技能创作原生的 HyperFrames 合成。

工作流程

步骤 1:对源代码进行 Lint 检查

对 Remotion 源代码目录运行 scripts/lint_source.py。该 lint 检查能检测出无法干净翻译的模式:

  • 阻塞项(拒绝并推荐互操作方案):useState、useReducer、useEffect/useLayoutEffect(带有非空依赖项)、异步 calculateMetadata、第三方 React UI 库(MUI、Chakra、Mantine、antd、shadcn、Radix、NextUI)。
  • 警告项(翻译时去掉该结构):@remotion/lambda 配置、delayRender、useCallback、useMemo、自定义钩子。
  • 信息项(翻译时附带说明):staticFile、interpolateColors。

如果触发了任何阻塞项,请停止。阅读 references/escape-hatch.md 并显示推荐信息。警告不会阻止翻译——在步骤 3 中去掉相关结构并在 TRANSLATION_NOTES.md 中记录差异。@remotion/lambda 配置是典型的警告情况:技能会删除引入语句和 renderMediaOnLambda(...) 调用,但会翻译合成的其余部分。

步骤 2:规划翻译

阅读 references/api-map.md——这是每个 Remotion API 及其 HF 等价物或相关主题参考的索引。根据源代码使用的内容,确定需要加载哪些主题参考:

源代码包含加载参考
Composition、defaultProps、schema、calculateMetadataparameters.md
Sequence、Series、Loop、AbsoluteFill、Freezesequencing.md
useCurrentFrame、interpolate、spring、Easing、interpolateColorstiming.md
Audio、Video、Img、IFrame、staticFile、delayRendermedia.md
TransitionSeries、@remotion/transitionstransitions.md
@remotion/lottielottie.md
@remotion/google-fonts/<Family>、Font.loadFont、@font-facefonts.md

不要全部加载——只加载特定源代码所需的部分。

步骤 3:生成 HF 合成

输出 index.html,包含:

  • 根 <div id="stage">,带有合成的 data-composition-id、data-start="0"、data-duration(以秒为单位)、data-fps、data-width、data-height,以及每个标量 prop 对应的 data-*。
  • 一个扁平的场景 div 列表,带有 data-start / data-duration / data-track-index。
  • 内联 <style> 用于布局;CSS 设置每个动画属性的 from 状态。
  • 一个位于底部的 <script> 标签,包含一个暂停的 gsap.timeline({paused: true})。每个 Remotion useCurrentFrame() 的派生结果都会成为该时间线上合适偏移处的补间动画。
  • window.__timelines["<composition-id>"] = tl; 将时间线注册到 HF 运行时。

自定义 React 子组件会以内联的重复 HTML 形式呈现,使用 prop 接口作为模板(参见 parameters.md 了解每个实例的 data-* 模式)。

步骤 4:验证

运行评估工具——完整指南见 references/eval.md。快速路径:

# 渲染 Remotion 基线(在 fixture 中执行 npm install 后)
cd remotion-src && npx remotion render <CompositionId> out/baseline.mp4

# 渲染 HF 翻译
cd ../hf-src && npx hyperframes render --output ../hf.mp4

# SSIM 差异对比
../../scripts/render_diff.sh ./remotion-src/out/baseline.mp4 ./hf.mp4 ./diff

阈值:比源代码复杂度等级(参见 eval.md 中的验证阈值表)的 p05 低约 0.02。如果差异对比失败,运行 scripts/frame_strip.sh 查看哪些帧出现了差异,然后重新阅读相关的时序 / 序列 / 媒体参考。

关键点:两次渲染必须使用匹配的像素格式。在 Remotion 源代码的 remotion.config.ts 中设置 Config.setVideoImageFormat("png") 和 Config.setColorSpace("bt709")——否则差异对比测量的是编码器差异(约 0.05 SSIM 影响),而不是翻译的保真度。

步骤 5:记录差异

任何未能干净翻译的内容(丢弃的音量渐变、近似的自定义展示、替换的字体)都应在 HF 输出旁边生成 TRANSLATION_NOTES.md 进行记录。有关格式,请参见 references/limitations.md。

此技能明确不做什么

  • 不翻译 React 状态机。 通过 useState + useEffect 驱动动画的合成在 HyperFrames 的基于帧定位模型中不是确定性的帧捕获目标。推荐使用运行时互操作方案。
  • 不在 HyperFrames 旁边运行 Remotion 的渲染管道。 这是 PR #214 中的运行时互操作方案——一个针对未通过此技能 lint 检查的合成的单独解决方案。

(@remotion/lambda 不是阻塞项——Lambda 配置是部署问题,而非动画问题。此技能会将其作为警告处理,去掉它并翻译其余部分。参见 references/escape-hatch.md。)

如何评估自己的翻译

运行测试语料库编排工具:

./assets/test-corpus/run.sh

它会运行 T1、T2、T3(渲染 + 差异对比)和 T4(lint 验证),打印每个等级的通过/失败表格,并输出聚合的 JSON 报告。使用此工具验证技能在干净版本库中是否端到端正常工作——以及在编辑任何参考后作为回归检查。

已验证基线(截至 2026-04-27):

等级合成形状平均 SSIM阈值
T1单元素淡入0.9740.95
T2多场景 + spring + 音频 + 图像0.9850.95
T3数据驱动、自定义子组件、计数动画0.9530.90
T4逃生口(8 个 lint 用例)8/8 通过不适用

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

Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.

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

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.

相关技能