Communitygithub.com

SingleGrain-Team/一键提示视频制作

制作一段20-30秒的产品启动影片,展示同一命令或提示在不同界面下执行并获得相同结果的过程。最终输出为1920x1080的MP4视频及可编辑的HyperFrames项目。

一键提示视频制作 是什么?

这个技能用于生成一种独特的“一键提示短片”(one-prompt-reel),其核心论点是“无论你在哪里输入,效果都一样”。它首先在一个宽终端、一个高聊天卡片、一个浮动面板和一个编辑器单元格这四种视觉截然不同的界面中依次输入完全相同的命令或提示字符串。随后,影片硬切到一个快速蒙太奇序列,展示该命令产生的16至24个真实输出结果(如截图、产品画面等),所有剪辑严格遵循节拍或固定节奏网格。最后,影片以该命令被再次显示在一个大型圆角胶囊中作为结尾。该技能支持两种模式:提供音乐时,剪辑将自动对齐检测到的节拍;无音乐时,则默认使用120 BPM的网格。它适用于开发者工具、CLI工具或AI代理技能等不局限于单一界面的产品,能够清晰传达其跨平台一致的执行效果。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SingleGrain-Team/video-skills/tree/HEAD/skills/one-prompt-reel

在你喜欢的 AI 中提问

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

文档

一键提示短片 (one-prompt-reel)

这部影片的主张是:“无论你在哪里输入,效果都一样。”证明方式就是重复。一个字符串,四个看似无关的界面,然后是一连串它产生的输出,最后再次显示这个字符串。

输入

输入必需备注
prompt是确切的命令或句子。50个字符以内效果最佳;它会被输入四次,外加在结尾处再输入一次。
reel 图像是16-24个真实输出:截图、产品画面、从先前渲染中提取的静态图。仅限使用你自己的素材。
品牌名称、标语、URL是用于结尾卡片。
标志否带透明通道的方形PNG。省略则使用纯文字结尾。
音乐否你拥有商业使用许可的音轨。如果不确定许可条款,请使用静音。

工作流程

  1. 搭建项目。 创建一个项目文件夹,将 template/ 复制进去(包含 index.html 和 assets/gsap.min.js),并将展示图像放入 assets/reel/ 目录。然后运行: npx --yes hyperframes check
  2. 填写 CONFIG 块,位于 index.html 中 <script> 的顶部。所有项目特定的配置都在这里:prompt、bpm、reel 文件列表、brand、tagline、url、logo。除非以下规则强制要求,否则不要重构其余部分。
  3. 选择剪辑网格。
    • 无音乐: 保持 cuts: null。剪辑点由 bpm 和 reelPattern 决定(默认:8个一拍剪辑,接着16个半拍剪辑,在120 BPM下 = 4 秒 + 4 秒)。每个界面持续 surfaceBeats 拍,因此整个影片保持在网格上。
    • 有音乐: 将音轨添加为 <audio id="music" data-timeline-role="music" src="assets/music.mp3" data-start="0" data-duration="24" data-track-index="5">,运行 npx hyperframes beats,打开 beats/assets/music.mp3.json,并复制 CONFIG.cuts 中在展示开始或之后的节拍时间(以秒为单位)(多一个条目标记最后一个剪辑的结束,即关闭画面开始的时间)。设置 bpm 为音轨的节奏,以便输入部分也能对齐。如果节拍密度大于0.2秒,则每隔一个取一次。在最后一秒将音乐淡出(/hyperframes-audio)。
  4. 渲染前检查。 运行 npx --yes hyperframes snapshot --at 1.8,4.3,6.8,9.2,11,15,20,23 并打开生成的PNG文件。检查每个界面输入中、一个展示剪辑和结尾画面。
  5. 渲染。 运行 npx --yes hyperframes render --workers 2 -o final.mp4。
  6. 从MP4中提取4-6帧(每个界面一帧,一个展示剪辑,结尾画面),使用 ffmpeg 并检查它们。如果任何内容被裁剪、不可读或空白,则修复并重新渲染。

影片结构(默认24秒)

时间节拍
0-10 秒四个界面,每个持续2.5秒。从右侧滑入,输入大约1.5秒,按下 ENTER,从左侧滑出。一个小标签标明界面名称及其位置(1/4)。
10-18 秒带白色闪白效果的硬切。24张全屏输出图像,每张缓慢推近。命令显示在左下角的圆角胶囊中,贯穿整个展示过程;右下角有一个计数器。
18-24 秒深色结尾画面:标志、名称、标语、命令在带有余烬边缘的圆角胶囊中再次输入一次、URL、单次发光脉冲。

保证效果的规则

  • 四个界面必须在轮廓上不同,而不仅仅是颜色。 宽而低、高而窄、浮动在渐变之上、带有侧边树的深色界面。如果你需要眯着眼才能区分其中两个,重新设计一个。使用纯HTML和CSS构建它们;切勿模仿任何真实产品的边框、标志或配色方案。
  • 相同字符串,相同输入速度。 每个界面在相同持续时间内输入完全相同的 prompt。这种一致性是关键。
  • 使用时间线补间(tween)进行输入,而不是计时器。作用于 {n} 计数器的补间,其 onUpdate 回调用于切片字符串,这种方式是安全的,可以随意定位时间线;而 setInterval 则不行。
  • 使用 tl.set 在半拍循环上闪烁光标,不要使用 CSS 动画或 repeat: -1。
  • 在网格上剪辑。 每个界面的边界、剪辑点和结尾画面的进入点都必须落在节拍上,无论网格是基于音乐还是纯节奏。偏离网格的剪辑是看起来最不专业的。
  • 加速一次。 先慢速剪辑,然后半长度剪辑。不要重复加速。
  • 展示图像是证据。 真实的输出,而非装饰。优先使用1920x1080的静态图像;缩放不规则的尺寸时使用 object-fit: cover。相邻图像交替使用深色和浅色背景,以便每次剪辑都能产生视觉变化。
  • 不使用第三方素材。 不要使用任何你不能分发的标志、其他产品的UI截图、库存视频或字体。字体:明确指定一种字体家族(等宽字体使用 "JetBrains Mono",CLI 本身会处理这个问题);通用等宽字体栈 ui-monospace 在测试中会导致比例显示问题。
  • 确保字幕可读。 检查对比度;hyperframes check 会强制要求文本达到 WCAG AA 标准,因此标签需要在米色背景上使用中等深度的墨水颜色。
  • 静音是可以接受的。 不要添加许可不明的音乐;带有非商业条款的 AI 生成音轨不得使用。
  • 保持闪白补间的 immediateRender: false,否则版面审计会在 t=0 时看到一个白色覆盖层。

验证

  • npx --yes hyperframes check 必须以“检查通过(Check passed)”结束(包括代码检查、布局、对比度)。
  • 快照帧显示所有四个界面在退出前都已完全输入完毕,没有标签覆盖界面,没有空或半加载的展示图像。
  • ffprobe 报告分辨率1920x1080,编码h264,时长在20-30秒窗口内。

交付物

将 final.mp4 放在项目文件夹(index.html, assets/)旁边。如果仓库的约定要求简短说明,请列出:提示词、节奏或节拍来源、展示图像来源、音乐许可(或“静音”)和渲染命令。提及 Studio(npx hyperframes preview)可以重新调整任何内容的时序。

详见 references/surfaces.md 了解四个界面的规格,以及 references/grid.md 了解时序计算。

Individual skills in this repo

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

SingleGrain-Team/video-skills

Make a 30-45 second launch film for a product by staging it inside one persistent, neutral chat window. A user types a request, the assistant answers and calls the product as a connected tool, a progress card runs, a follow-up triggers a second tool action, and the result lands as a count-up headline number before closing on the logo, tagline and call to action. Use when you need a launch, feature or integration announcement video for something that plugs into AI assistants (a skill, MCP server, plugin, connector, CLI). Delivers a rendered 1920x1080 MP4 plus an editable single-file HyperFrames project.

SingleGrain-Team/video-skills

Build a motion graphic where a screen recording plays in a large frame beside a checklist, and each checklist item ticks off at the exact moment that step happens in the recording, ending with every item checked and a short hold. Use when someone has a screen recording (product walkthrough, tutorial, onboarding, install demo) plus a list of steps with timestamps and wants a "watch the steps get done" film. Input is a recording, step labels with timestamps, a title and an optional palette; output is a 1920x1080 H.264 MP4 and the editable HyperFrames project.

SingleGrain-Team/video-skills

Build a 15-20 second product launch film that shows the product's real screen on a laptop built from plain CSS (no 3D model, no generation model) in a dark studio, scrolls the page, zooms into the interface for one key action such as typing a search, and resolves to the logo lockup. Use when someone has a full-page screenshot or screen recording of their product, one action worth showing, and a logo, and wants a short silent-friendly launch teaser rendered as a 1920x1080 MP4 with an editable HyperFrames project.

SingleGrain-Team/video-skills

Builds a 6-8 second logo sting in which the brand mark rides inside a refracting liquid bead (distorted past legibility), the bead swells, holds still for a beat, then ruptures into droplets and leaves the logo lockup (mark plus wordmark) crisp and upright on screen. Delivered as a 1920x1080 H.264 MP4 plus the editable HyperFrames project, with no 3D model, stock footage or generation model. Use it for brand intros and outros, product-launch openers, channel stings and any "reveal our logo" moment, from an SVG or PNG logo (including raster-only logos), a wordmark string and a palette.

SingleGrain-Team/video-skills

Make a roughly 30-second film that explains a code change (a pull request, release or uncommitted diff) to people who will never read the diff. It opens by showing the real diff scrolling past too fast to follow, cuts to a plain-language summary, fires four capability beats each pinned to a real code snippet, and closes on how to get it (install command and URL). Delivered as a 1920x1080 H.264 MP4 plus the editable HyperFrames project. Use when asked to turn a PR, changelog or release into a launch or explainer video.

SingleGrain-Team/video-skills

Render a 5-6 second motion graphic in which an oversized condensed headline (2-4 words) punches in behind a presenter, using a background-removed cutout of the presenter layered on top of the lettering. A hard cut then removes the presenter while the same headline holds the exact same size and position, and a short supporting line appears for a reading hold. Use it for talking-head intros, chapter openers, launch announcements and social hooks when you have one presenter clip, a headline, a supporting line and a palette. Built on HyperFrames; delivers a 1920x1080 H.264 MP4 plus the editable project.

SingleGrain-Team/video-skills

Builds a 10-14 second product sting out of a short run of UI moments (an entry screen, a single counting metric, a navigation list, one click that opens a menu, then an endcard) cut together so every cut carries the previous motion forward and the piece reads as one continuous camera move. Delivered as a 1920x1080 H.264 MP4 plus an editable single-file HyperFrames project. Use it for app launches, feature teasers, social bumpers and site intros when you have a product's logo, a couple of screenshots, one headline number and its real nav labels, and want polished UI motion without narration.

相关技能