Communitygithub.com

muhammedadnank/Antigravity-Skills

构建一个高级电影感落地页,鼠标滑动可控制英雄视频进度,并围绕品牌叙事弧线设计多个内容板块。

Antigravity-Skills 是什么?

此技能用于打造一款高端的电影级落地页,其核心体验是鼠标驱动的视频 scrubbing 效果。页面顶部,英雄视频会作为固定背景,用户左右移动鼠标即可实时控制视频播放进度,创造出流畅、互动的视觉表现。页面主体部分包含4-5个完全不透明的独立板块,每个板块都拥有自己独特的品牌标识,包括特定的色彩、字体和布局,共同引导观众经历一个精心设计的品牌叙事弧线。该技能支持任何语言和主题,并集成了自动提取调色板、选择排版、处理RTL/LTR布局、使用ffmpeg为视频重新编码以确保scrubbing流畅等完整工作流程。它适用于Vite、React和Tailwind CSS框架,开发者只需提供英雄视频和品牌信息,即可快速生成一个完整的营销或产品展示网站。

兼容平台✓Claude Code~Codex CLI✓Cursor✓Antigravity
npx skills add https://github.com/muhammedadnank/Antigravity-Skills/tree/HEAD/skills/cinematic-scrub-landing

在你喜欢的 AI 中提问

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

预览

来自技能 README

带有鼠标划动视频和玻璃效果标题面板的英雄部分
黄色
奶油色
深色
红色

文档

电影感划动落地页 — 黄金模板

构建一个高级的品牌感知落地页,其中英雄视频随鼠标响应,页面其余部分引导观众经历一个5拍的叙事弧线。用户提供视频,可选地提供Logo + 产品照片 + 品牌背景——此技能负责调色板提取、排版选择、RTL/LTR布局、项目脚手架、全关键帧视频重新编码、鼠标划动效果、板块库以及验证。

为什么存在这个技能

参考实现位于 https://github.com/hoodini/bamba——一个以零食“במבה”为主题的以色列RTL网站。该网站中,一个婴儿视频随光标在整个页面上移动,而下方4个不同的板块(亮黄色食谱、奶油色怀旧相册、深色沉思定价、红色号召性行动收尾)引导观众经历渴望 → 欢乐 → 怀旧 → 沉思 → 行动的旅程。

带有鼠标划动视频和玻璃效果标题面板的英雄部分

此技能中的每一条规则都源自该构建。 硬性规则部分 中的要点都是来之不易的——它们会覆盖通用的“良好代码”默认值。


板块图库(你要构建的内容)

英雄部分始终位于顶部。在其下方,从板块库中选择4个板块,按叙事弧线排序。每个板块都是完全不透明的(没有视频透光),并且有自己的品牌标识:

节拍类型参考
1 — 渴望英雄 (鼠标划动视频)英雄
2 — 欢乐阳光 — 明亮的主色调渐变,浮动主题SVG,巨大的幽灵排版,统计卡片黄色
3 — 怀旧相册 — 奶油色纸张,点状微图案,宝丽来风格bento布局,含真实产品照片奶油色
4 — 沉思烘烤 — 深色背景,径向强调色光晕,三张定价卡片,每张有不同的视觉处理深色
5 — 行动信号 — 全出血强对比色(红/橙/绿),巨大标题 + 号召性行动按钮,玻璃效果面板红色

对于技术/SaaS品牌,根据需要更换板块类型(请参阅下面的板块库)——但始终以信号板块结束。


如何使用这个技能

  1. 将资源放入 一个干净的工作目录:

    • 英雄视频 (任何容器格式 — .mp4, .mov, .webm)
    • Logo (强烈推荐SVG;接受带透明度的PNG)
    • 1-3张产品/主题图片 (JPG/PNG, 透明背景为佳)
  2. 向用户确认(简短地 — 提出默认值,然后继续):

    • 产品名 + 元标语
    • 语言代码 (决定RTL/LTR + 字体选择)
    • 品牌背景 — 时代、受众、情感核心、调色板感觉
    • 可选:明确的调色板十六进制色值、叙事弧线节拍
  3. 按顺序执行下面的工作流程。 所有阶段都是强制性的。不要跳过ffmpeg重新编码——那是让划动感觉丝滑的神奇步骤。

  4. 在报告完成前进行验证。 阶段9有12项检查。全部运行。


输入 — 从用户处收集

PRODUCT_NAME: "<例如:במבה / Bamba / Hope the Cheetah / Acme CRM>"
TAGLINE: "<元信息 — 例如:'这不是零食,是一生的回忆'>"
LANGUAGE: "<he | en | ar | es | fr | ja | ...>"
IS_RTL: "<true | false>"                                   # he/ar/fa = true;其他均为 false
HERO_VIDEO_FILE: "<工作目录中的确切文件名 — 例如:baby2.mp4>"
LOGO_FILE: "<确切文件名 — 如果没有则留空>"
PRODUCT_IMAGE_FILE: "<确切文件名 — 如果没有则留空>"
BRAND_CONTEXT: |
  <2-4句话:它所唤起的时代、受众是谁、情感核心是什么、
  视觉形象是什么(温暖/冷静/俏皮/严肃)。驱动调色板+主题。>
PALETTE: "<可选 — 如果覆盖则填写逗号分隔的十六进制色值>"
NARRATIVE_ARC: "<可选 — 5个情感节拍;如果留空则由AI建议>"

完整的文本模板(包含相同的YAML块和提示正文)位于 references/GOLDEN_PROMPT.md — 当你没有直接技能运行时,将YAML填入后粘贴到Claude中。


阶段0 — 规划设计(在编码前输出≤200字的简报)

在编写任何代码之前,输出:

  1. 提取的5色调色板:background(最深墨色)、cream(温暖的灰白文本 — 永远不要用#FFFFFF)、accent(主要品牌色)、accent2(次要品牌色)、support(第三色)。如果未提供PALETTE,则从Logo+产品图片中提取。调色板必须是内部协调的——要么全暖色,要么全冷色,切勿混合。暖色品牌(食品、自然、怀旧、动物)→ 不要蓝色、蓝绿色、薄荷色、青色。冷色品牌(科技、金融、医疗、科幻)→ 除了一小部分强调色外,不要暖色调。

  2. 排版三件套(展示/正文/手写体强调)适用于该语言:

    • he: Rubik (展示) + Assistant (正文) + Suez One (强调)
    • en: Anton (展示) + Inter (正文) + Caveat (强调)
    • ar: Cairo (展示) + Tajawal (正文) + Reem Kufi (强调)
    • es / fr / it / de: Anton 或 Bebas Neue (展示) + Inter (正文) + Caveat (强调)
    • ja: Noto Sans JP weight 900 (展示) + Noto Sans JP (正文) + Yusei Magic (强调)
    • 其他:选择三种匹配该脚本的Google字体,具有相同的display-black / body-clean / handwritten-script角色。
  3. 叙事弧线 — 映射到BRAND_CONTEXT的5个情感节拍。将每个节拍匹配到板块库中的一个板块类型。

然后执行 — 无需请求确认。


阶段1 — 资源准备(神奇步骤)

1a. 验证ffmpeg

which ffmpeg     # 或:PowerShell上使用 Get-Command ffmpeg

如果缺失,停止并通知用户安装(brew install ffmpeg / Windows: http://ffmpeg.org)。

1b. 将英雄视频重新编码为每帧都是关键帧

浏览器只能即时跳转到关键帧——标准视频大约每250帧有1个关键帧,这会导致鼠标划动严重卡顿。这个简单的命令是高级效果和业余效果之间的区别:

ffmpeg -y -i <HERO_VIDEO_FILE> -g 1 -keyint_min 1 -c:v libx264 -preset slow -crf 20 -pix_fmt yuv420p -an hero.mp4

验证输出:hero.mp4 应该为5-50 MB。如果 > 50 MB,用 -crf 25 重新运行;如果 > 80 MB,用 -crf 28 重新运行。去掉音频(-an)——英雄视频是静音的。

1c. 复制Logo和产品图片

cp <LOGO_FILE>           public/logo.<ext>
cp <PRODUCT_IMAGE_FILE>  public/product.<ext>   # 如果提供的话

阶段2 — 脚手架搭建

npm create vite@latest site -- --template react-ts
cd site
npm install
npm install lucide-react
npm install -D tailwindcss@3 postcss autoprefixer
npx tailwindcss init -p
mkdir -p public
mv ../hero.mp4 public/hero.mp4
# 同时将logo和产品图片移动到public/

阶段3 — Tailwind配置

完全替换 tailwind.config.js。使用提取的调色板和适合语言的字体:

/** @type {import('tailwindcss').Config} */
export default {
  content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
  theme: {
    extend: {
      colors: {
        background: '<墨色/深色>',
        cream:      '<温暖的灰白 — 永远不要用#FFFFFF>',
        accent:     '<主要品牌色>',
        accent2:    '<次要色>',
        support:    '<第三色>',
      },
      fontFamily: {
        sans:    ['<正文字体>',         'system-ui', 'sans-serif'],
        display: ['<展示字体>',      'sans-serif'],
        accent:  ['"<手写体字体>"', 'cursive'],
      },
    },
  },
  plugins: [],
}

阶段4 — index.html

完全替换。遵循IS_RTL。始终包含指向Logo的favicon链接:

<!DOCTYPE html>
<html lang="<LANGUAGE>" dir="<rtl|ltr>">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/logo.svg" />
    <link rel="apple-touch-icon" href="/logo.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="<所选三种字体的Google Fonts URL>" rel="stylesheet">
    <title><PRODUCT_NAME> — <TAGLINE></title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>

阶段5 — index.css(设计系统)

完全替换。下面的每个实用类都是承载样式的。名称假设了之前提取的暖色调色板;对于冷色品牌,将阴影色调中的“黄色”/“红色”提及替换为实际强调色。

必须包含:

  • html { scroll-behavior: smooth; } + section[id] { scroll-margin-top: 90px; } 以便锚点板块不会落在固定导航下方。
  • body 背景 = background 颜色(视频加载失败时的备用颜色)。光标 = crosshair。默认字体 = 正文字体。
  • .liquid-glass / .liquid-glass-strong — 背景模糊 + 饱和度 + 内发光边框 + 蒙版渐变边缘高光。强变体使用带有accent色调的内发光。
  • .glass-pill — 紧凑的圆角药丸,具有相同的玻璃效果,用于导航项和小徽章。
  • .cta-primary — 品牌号召性行动按钮:linear-gradient(135deg, accent-light, accent, accent-shade) + 强调色发光阴影,悬停时加深 + translateY(-1px) 提升。
  • .brand-mark — 如果未提供SVG,则用于小logo标记的小方形/圆形。
  • .grid-bg — 微妙的1px网格,带有径向淡出遮罩,用于深色板块下方。
  • .reveal / .revealed — IntersectionObserver滚动显现效果:opacity 0 → 1 + translateY 28 → 0,持续0.9s,使用 cubic-bezier(0.16, 1, 0.3, 1)。
  • .scrim-top / .scrim-bottom — 仅用于英雄部分的渐变覆盖层。
  • 每个板块的背景,按感觉而非颜色命名:
    • .sun-section — 明亮的主色调渐变 + 微妙的点状纹理(“欢乐 / 打开袋子”节拍)。
    • .album-section — 温暖的灰白纸张,径向强调色色调 + 点状微图案,边缘蒙版淡出。
    • .roast-section — 深色背景,对角线上有径向强调色+强调色2光晕 + 蒙版网格纹理。
    • .signal-section — 全出血强烈强调色(通常是红/橙/绿),用于行动收尾。
  • .polaroid — 白色卡片,内边距 14px 14px 44px 14px,柔和的分层阴影,悬停时提升至 translateY(-6px) rotate(0)。.polaroid-tape = 黄色/强调色胶带条,绝对定位于顶部居中,旋转-4°,带有虚线边提示。
  • .stamp — 虚线边框药丸,强调色,大写,字母间距 0.18em。
  • .ribbon — 定价/热门徽章,带有 clip-path 三角形底部,深色投影。
  • .highlight-circle — 通过 ::after 绘制的手绘感椭圆形:在行内<span>周围旋转3px的强调色边框。在大型标题中仅用于最重要的单个单词(每个标题最多一个)。
  • 装饰主题滤镜:.peanut-svg / .<motif>-svg 带有 drop-shadow。
  • 遵循 prefers-reduced-motion: reduce — 在媒体查询中禁用显现动画和平滑滚动。

阶段6 — App.tsx架构

架构是不可妥协的。第一次就做对:

6a. 导入

import { useEffect, useRef, useState } from 'react';
import {
  Menu, X, ArrowLeft, ArrowRight, ArrowDown, ArrowUp, MousePointer2,
  // …加上4-8个品牌主题图标 (Heart, Sparkles, Cookie, PawPrint, Cpu, Leaf, …)
} from 'lucide-react';

6b. 在App.tsx内部定义的可重用组件

  • useReveal<T>() — IntersectionObserver钩子,返回一个引用;在首次相交时添加 revealed 类(阈值0.15)。
  • GlassCard — 使用显现钩子的包装器,可选的 strong 属性,接受 className。
  • Motif — 单个装饰性SVG组件,主题化到 BRAND_CONTEXT(食品用花生,动物用爪子,科技用电路,自然用叶子,饮料用水滴,能量用闪电)。在深色/明亮的板块中,以低透明度浮动在3-6个位置。
  • ScrollToTopButton — RTL中固定在 bottom-6 left-6 / LTR中固定在 bottom-6 right-6。当 window.scrollY > window.innerHeight * 0.6 时出现。平滑滚动到顶部。简短的语言适当标签("לראש" / "Top" / "أعلى" / "Inicio")。

6c. 鼠标划动效果(核心)

const videoRef = useRef<HTMLVideoElement>(null);
const stateRef = useRef({ targetTime: 0, isSeeking: false });

useEffect(() => {
  const video = videoRef.current;
  if (!video) return;

  const handleLoaded = () => {
    const mid = video.duration / 2;
    video.currentTime = mid;
    stateRef.current.targetTime = mid;
  };

  const handleSeeked = () => {
    const s = stateRef.current;
    s.isSeeking = false;
    if (Math.abs(s.targetTime - video.currentTime) > 0.01) {
      s.isSeeking = true;
      video.currentTime = s.targetTime;
    }
  };

  const handleMouseMove = (e: MouseEvent) => {
    const s = stateRef.current;
    const d = video.duration;
    if (!d || isNaN(d)) return;
    const normalized = e.clientX / window.innerWidth;
    // 如果主体相对于光标“向后”移动并且感觉不对,可以选择
    // 使用 `1 - (e.clientX / window.innerWidth)` 代替 — 先询问用户。
    s.targetTime = Math.max(0, Math.min(d, normalized * d));
    if (!s.isSeeking) { s.isSeeking = true; video.currentTime = s.targetTime; }
  };

  video.addEventListener('loadedmetadata', handleLoaded);
  video.addEventListener('seeked', handleSeeked);
  window.addEventListener('mousemove', handleMouseMove);
  return () => {
    video.removeEventListener('loadedmetadata', handleLoaded);
    video.removeEventListener('seeked', handleSeeked);
    window.removeEventListener('mousemove', handleMouseMove);
  };
}, []);

isSeeking 守卫是关键的——没有它,mousemove触发的速度比浏览器解码的速度快,你会得到寻道队列溢出和可见的卡顿。

6d. 可点击的滚动监视导航

const navItems: { label: string; target: string }[] = [
  { label: '<演示>',     target: 'top'     },
  { label: '<食谱>',   target:

…

[截断以进行翻译]

Individual skills in this repo

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

muhammedadnank/Antigravity-Skills

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

muhammedadnank/Antigravity-Skills

Build a scroll-driven cinematic landing page from a short video. The user provides a 5–15 second video (often AI-generated); this skill extracts every frame at HD JPEG quality, then produces a single-hero HTML page where the user's scroll gesture scrubs the frames in place (the page itself never scrolls) and 5 dramatic text overlays crossfade in/out — Google Anton headlines, Caveat handwritten accents, locked body, virtual scroll. Use this skill whenever the user wants to "turn this video into a landing page", "make a scroll-scrub landing page", "build a parallax hero from this clip", "add a new landing page to the parasites showcase", "do the same as github/lion/hope for this new video", or any variant that pairs a short clip with dramatic scroll-triggered storytelling. Trigger even if the user only says "use my video for a landing page" — that is this skill.

muhammedadnank/Antigravity-Skills

Best practices for Remotion - Video creation in React

muhammedadnank/Antigravity-Skills

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

muhammedadnank/Antigravity-Skills

Turn any video into a cinematic scroll-driven landing page — Apple-style hero where scrolling progresses the visible frame through the video. Use when the user provides a video file and asks for "a landing page from this video", "scroll-frame website", "Apple-style scroll site", "hero that scrubs the video", "like the GitHub Copilot landing", or any equivalent. Extracts N evenly-spaced frames via ffmpeg, builds a self-contained HTML page with a sticky hero + JS scroll listener that swaps the visible frame as you scroll, plus headline, sections and CTA below. For YUV.AI projects, applies the yuv-design-system skill in Neon mode (pink/cyan/white, default for YUV.AI web) — Decks (purple/yellow) is reserved for slides only. For generic / non-YUV.AI projects, picks an appropriate palette per the source video. Output is one folder with `index.html` and a `frames/` directory — drop on any static host.

相关技能