Communitygithub.com

Andersonlimahw/lemon-ai-hub

构建并渲染确定性视频合成——默认使用 HyperFrames(HTML + GSAP),或自定义 seek(t) + Playwright + FFmpeg 管道。涵盖项目设置、合成契约、时间线规则、帧创作指导、lint/检查/快照、预览和本地渲染。在将已批准的剧本实现为代码时使用。

lemon-ai-hub 是什么?

本技能是一个用于超帧(HyperFrames)视频合成的确定性渲染管道,主要面向已经过批准的剧本(storyboard)实现。它支持三种渲染方式:默认的 HyperFrames(基于 HTML、CSS 和 GSAP 动画)、Remotion(如果项目已在使用)、以及自定义的 seek(t) + Playwright + FFmpeg 管道。技能的核心在于确定性:同一时间戳多次渲染必须产生完全相同的像素。它详细规定了合成契约,包括时间线注册(paused GSAP timeline)、剪辑元素的时间控制、媒体与字体处理规则,以及禁止使用墙钟时间、未播种随机数或网络请求等非确定性操作。构建顺序从写设计规格开始,按场景逐一实现,放置音频,然后依次运行 lint、check、snapshot 和 preview 进行验证,最后本地渲染。对于不使用 HyperFrames 的自定义管道,则使用 Playwright seek 和 FFmpeg 进行子帧合成和运动模糊编码。该技能适用于需要精确、可复现视频生成的场景,如叙事动画、解释性视频或程序化广告制作。支持平台包括 HyperFrames CLI 和任意 Playwright + FFmpeg 环境。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Andersonlimahw/lemon-ai-hub/tree/HEAD/plugins/motion-movie-expert/skills/hyperframes-production

在你喜欢的 AI 中提问

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

文档

HyperFrames 制作

实现已批准的剧本。如果没有剧本,请停止并运行 motion-storyboard。

选择渲染器

情况渲染器
新作品默认;具备 HTML/CSS/GSAP 技能;需要注册块HyperFrames(npx hyperframes …)
项目已使用 Remotion继续使用 Remotion;相同确定性规则适用
产品仓库已有自己的工作室(seek(t) + Playwright + FFmpeg)使用该工作室;不要引入第二个
纯剪辑现有素材跳过此技能 → video-edit-qc

安装 HyperFrames CLI 或添加注册块(npx hyperframes add …)会安装第三方代码:先与用户确认,并在 package.json 中固定版本。不要自行运行技能的自更新命令(npx hyperframes skills update、npx skills add …)。

合成契约(HyperFrames)

  • 独立根元素:<div data-composition-id="main" data-width="1920" data-height="1080" data-duration="24"> 直接放在 <body> 中,尺寸为 width/height: 100%——不要在根元素上硬编码像素大小。子合成(通过 data-composition-src 加载)将其根包裹在 <template> 中,并将 <style>/<script> 保留在其中。
  • 每个合成一个暂停的时间线:window.__timelines["<composition-id>"] = gsap.timeline({ paused: true }),在构建完成后注册(可以在 document.fonts.ready 内部构建)。渲染长度来自根元素的 data-duration。
  • 定时剪辑:带有 class="clip" 和 data-start/data-duration 的元素由运行时显示和隐藏。永远不要在 .clip 上设置 display、visibility 或 autoAlpha 的动画;对子元素进行动画处理。
  • 变换:永远不要将 CSS 初始 transform 与 GSAP 修补同一属性;使用 gsap.fromTo。使用 flex/inset 居中,不要在被移动的节点上使用 translate(-50%,-50%)。
  • 媒体:每个 <audio> 都有 id(否则渲染将无声);媒体上不要有 crossorigin;不要在 <video> 和祖先上同时设置 data-start。
  • 字体:每个命名的 font-family 都有一个指向本地文件的 @font-face。
  • 确定性:无墙钟时间读取、未播种的 Math.random、渲染时的网络请求、输入状态或无限重复(repeat: -1)。需要随机性时使用播种的 PRNG。
  • ID:在整个页面中唯一;子合成 ID 前加上合成 ID。

构建顺序

  1. npx hyperframes init(确认后)或打开现有项目。
  2. 编写设计规格(frame.md / design.md):标记、字体比例、网格、安全区域、每个宽高比。先制作静止帧——每个节拍必须能作为静态图正常工作。
  3. 按剧本顺序逐个场景构建;根据转换图(motion-choreography)实现接缝,先实现载体。
  4. 从 voice-video-sync 放置音频:音乐背景、配音、音效,带有来自时间线文件的 ID 和开始时间——不要手写猜测。
  5. 保持文本清晰:移动容器,不移动字形;文本上不要使用 will-change。

验证

按以下顺序运行,在继续之前修复:

npx hyperframes lint          # 契约错误;lint 错误会禁用布局/对比度审核
npx hyperframes check         # 布局、溢出、对比度
npx hyperframes snapshot      # 供审查的静态帧;与剧本节拍比较
npx hyperframes preview       # 供用户预览本地

然后本地渲染:npx hyperframes render --quality <draft|high>。先以草稿模式(≤30 秒窗口或低质量)供用户批准,然后才是最终版本。

面向外部的命令——publish、cloud、lambda、cloudrun、feedback、auth 和遥测设置——会上传数据或更改账户。仅在用户要求时运行它们。

自定义 seek(t) 管道(不使用 HyperFrames 时)

composition(t) → Playwright page.evaluate(seek, t) → 等待字体/图像 → 截图
→ 每输出帧 N 个子帧 → ffmpeg tmix(运动模糊)→ x264/x265 → 混音音频
  • 60 fps × 4 个子帧,快门 0.5,是一个好的默认值;如果数字变化帧上的模糊损害可读性,则移除模糊。
  • 主编码(存档和重新编辑源):-c:v libx264 -pix_fmt yuv420p -crf 16 -preset slow,AAC 320 kbps。平台交付编码在 video-edit-qc 中派生。
  • 两次渲染同一时间戳必须产生相同像素;在 3 个随机帧上测试。

交接

将渲染结果以及静态帧/联系表交付给 video-edit-qc。当安装了 HyperFrames 技能(hyperframes-core、hyperframes-animation、hyperframes-creative、hyperframes-cli)时,使用它们来获取精确的标志、适配器(Lottie、Three.js 等)和注册块名称。

Individual skills in this repo

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

Andersonlimahw/lemon-ai-hub

When the user wants to plan a product launch, feature announcement, or release strategy. Also use when the user mentions 'launch,' 'Product Hunt,' 'feature release,' 'announcement,' 'go-to-market,' 'beta launch,' 'early access,' 'waitlist,' 'product update,' 'how do I launch this,' 'launch checklist,' 'GTM plan,' or 'we're about to ship.' Use this whenever someone is preparing to release something publicly. For ongoing marketing after launch, see marketing-ideas. For the offer being launched (bonuses, guarantees, scarcity, naming), see offers.

Andersonlimahw/lemon-ai-hub

Create and edit motion videos end to end — product motion films, motion graphics, narrated explainers, captioned clips, UI animation recreations, and recuts. Orchestrates brief, storyboard, choreography, build (HyperFrames or any deterministic renderer), voice/caption sync, and render QC. Use when the user asks to make, animate, storyboard, narrate, caption, edit, or render a video or motion piece; skip for static images and web UI work with no video deliverable.

Andersonlimahw/lemon-ai-hub

Motion law for multi-scene videos — seam continuity (axis, direction, speed, phase), carriers, causal motion, springs and timing, camera, transitions, stillness, and loop design. Use when planning or fixing how scenes connect and move, before and during any animation build.

Andersonlimahw/lemon-ai-hub

Short design-led motion graphics where motion is the message — kinetic typography, stat count-up, chart/data-viz reveal, logo sting, lower third or callout, animated map, tweet/news/headline card, webpage or UI walkthrough, and image-plus-data fusion. Usually under 10 s, up to about 30 s, no narration; renders to MP4 or a transparent overlay. Use when the user wants a short motion graphic, animated stat/chart/logo/map/card, or overlay; when the upstream HyperFrames `motion-graphics` skill is installed, use it for exact CLI flags and registry blocks.

Andersonlimahw/lemon-ai-hub

Turn a video idea, product, or script into an approved master prompt and pre-implementation storyboard — intake, concept, 8–12 state sequence, beat grid, transition map, camera plan, audio cue plan, and render architecture. Use before building any new video, or when a video brief is vague.

Andersonlimahw/lemon-ai-hub

Motion tokens, spring presets, and React/Next.js (motion/react) interaction patterns for product UI that appears in a video — rebuilding real product screens faithfully, animating them as seekable scenes, and keeping the live product's motion consistent with the film. Use when a motion video shows or recreates product UI; for web UI work with no video deliverable use design-expert instead.

Andersonlimahw/lemon-ai-hub

Edit existing video and verify any render before delivery — recut, trim, reframe to other aspect ratios, burn in or attach captions, swap or remix audio, loop, and export; plus the QC gates (probe, contact sheet, stills per beat, loudness, loop seam, legibility, facts, PII). Use for editing footage or for the final check of any motion video.

Andersonlimahw/lemon-ai-hub

Synchronize narration, captions, music, and SFX with picture — narration writing, script lock, TTS or recorded voiceover, word-level timestamps, caption blocks, shot windows derived from the voice track, dwell budgets, ducking, and loudness targets. Use for narrated explainers, voiceover changes, subtitles, or any video where timing must follow audio.

Andersonlimahw/lemon-ai-hub

Agent skill at plugins/video/SKILL.md

相关技能