Communitygithub.com

品牌动效构建

从零构建 16 种高级动效,融入自有品牌,生成一个 8 秒循环的 HTML 文件,支持 window.seek(秒数) 实现帧级精确导出为 MP4 或 GIF。适用场景包括界面过渡(按钮到播放器、搜索到结果、卡片到工作区、标签到面板)、数据展示(图表变形、仪表盘缩放、弹性堆叠、磁性坞)、文案动效(遮罩文字、弹性文字、文字到布局、图片揭示)以及系统动效(视角位移、玻璃聚焦、流动路径、粒子 Logo)。当用户提及这些需求时即可使用。

品牌动效构建 是什么?

这个技能——“品牌动效构建”——让 AI 辅助开发者或设计师快速创建 16 种专业级 HTML 动效,并自动适配品牌色彩与字体。其核心是一个 8 秒自循环的独立 HTML 文件,内置 `window.seek(seconds)` API,支持逐帧精确导出,非常适合用于社交媒体帖子、产品演示或视频配音场景。技能覆盖四大类效果:界面(按钮→播放器、搜索→结果等)、数据(图表变形、仪表盘放大等)、文案(遮罩文字、弹性文字等)和系统(视角位移、粒子 Logo 等)。它通过读取 `brand.md` 和 `MOTION.md` 文件获取品牌规范,然后生成自包含、无网络依赖的 HTML 文件,确保离线也能一致渲染。该工作流程包括需求采集(效果类型、实际内容、尺寸、循环模式)、读取配方规范、构建 HTML、在 7 个关键帧点进行质量检查,以及导出为 MP4 和 GIF。该技能适用于多平台,包括 Claude Code、Cursor、Codex 等,并优先使用已安装的工具(如 HyperFrames)进行高效导出。

兼容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/charlie947/motion-graphics-skills/tree/main/skills/motion-effects

在你喜欢的 AI 中提问

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

文档

品牌动效构建 是做什么的?

十六种动效,让产品、数字或文字像由动效设计师打造一般灵动。每一种都是一个配方:它是什么、从哪里开始、在哪里结束、在 8 秒循环中每个部分何时移动,以及让它看起来高级的那个细节。你选择效果,提供真实文案,它就会使用你的色彩和字体从头构建。

开始之前: 阅读 brand.md 和 MOTION.md(如果存在)。如果没有,先运行 brand-intake,或者询问十六进制颜色代码、一种字体和一个 Logo 文件。在没有这些信息的情况下,切勿声称结果符合品牌规范。

步骤 1:询问四样东西,然后等待

  1. 效果。 按名称或编号从 16 种中选一个。如果他们描述的是一个任务(“展示我们的定价”、“揭示发布名称”),则从下表推荐两个最合适的效果供其选择。
  2. 实际内容。 要放入的文字、标签和数字。使用真实数据,或者说明其为示例。
  3. 尺寸。 1080 x 1080(正方形)、1080 x 1350(LinkedIn 竖版)、1080 x 1920(Reel)或 1920 x 1080(YouTube)。
  4. 循环或保持。 循环会无限重复(帖子或 GIF)。保持只播放一次并停留在最终帧(用于配音场景,避免中途重置)。
#效果适用场景
01按钮 → 播放器在着陆页或发布邮件中添加“观看演示”的时刻
02搜索 → 结果展示用户在帮助中心或内容库中的搜索结果
03卡片 → 工作区宣布一项功能,一张小卡片变为整个编辑器
04标签 → 面板对比方案、套餐或渠道,无需大段文字
05图表变形将每周结果放入客户报告或成果帖中
06仪表盘缩放从仪表盘中提取最重要的 KPI
07弹性堆叠依次展示三个优惠、案例或推荐语
08磁性坞展示您使用的工具或产品的集成
09遮罩文字揭示活动名称、期号或发布标题
10弹性文字用标题卡开启活动、网络研讨会或播客
11文字 → 布局将标题转化为轮播封面或文章预告
12图片揭示预告产品发布,然后切换为您自己的图片
13视角位移解释服务、品牌系统或技术栈的各层
14玻璃聚焦让用户阅读报告中重要的一行
15流动路径展示一条内容流向多个渠道
16粒子 Logo用您的标志结束视频、Reel 或帖子

步骤 2:阅读配方

打开 references/effects.md 并完整阅读所选效果:起始状态、结束状态、时间线、高级细节。配方即规范。将演示文字替换为用户的实际文字,并将每个颜色角色(底色、表面色、文字色、柔和色、强调色、次要强调色)映射到 MOTION.md 中的颜色。

步骤 3:构建它

构建一个自包含文件 effect.html,遵循以下规则:

  1. 一个时钟。 每一帧都仅根据时间计算。添加 window.seek(seconds) 函数,可按任意顺序、任意次数绘制该时间点的精确帧。不能使用 setTimeout,不能有自主运行的 CSS 动画,不能出现未设置种子的随机性。
  2. 一个循环,8 秒。 从 0.0 移动到 2.2,保持到 6.6,在 8.0 之前返回。seek(0) 和 seek(8) 必须绘制相同的帧。在保持模式下,仅播放一次移动过程,并从 6.6 开始停留在最终帧。
  3. 回到起点。 返回过程将所有元素缓动回最初的确切位置。不可突然复位。
  4. 真实内容,绝不使用 Lorem。 使用用户的文字和数字。示例数字必须在每一帧带有可见的“示例”或“说明”标签。
  5. 自包含。 嵌入字体,内联图片,无网络请求,确保离线打开时渲染一致。
  6. 除非指定,否则自动播放。 在浏览器中打开时实时播放;当 URL 以 ?render 结尾时,停止时钟,以便导出工具自行调用 window.seek()。
  7. 放大效果。 效果填满所选尺寸的帧,边距遵循 MOTION.md。不能是大空白画布中的小图块。

步骤 4:展示前检查

在 0、1、2.2、4.4、6.6、7.9 和 8 秒处捕获帧,并逐一查看。

  • 循环: 第 0 帧和第 8 帧完全一致。
  • 移动: 第 0、1 和 2.2 帧各不相同。如果有两帧相同,说明部分效果未运行。
  • 适配: 没有文字跑出框外,在七个时间点都没有内容被裁切。
  • 静态: 在 4.4 秒处暂停。从这一单独帧即可理解效果要点。
  • 品牌: 屏幕上所有颜色和字体均来自 MOTION.md。

修复失败项,重新捕获,然后向用户展示 2.2 和 4.4 帧及其文件路径。

步骤 5:导出

现在将 effect.html 转换成可发布的视频和 GIF。使用本计算机上已有的工具。如果缺少任何必要工具,请先停止并告知需要安装什么。以 ?render 参数加载页面,对每一帧以 30 帧/秒(8 秒共 240 帧)调用 window.seek(),并以 [SIZE] 尺寸编码为 H.264 的 MP4 文件。然后制作一个无限循环的 GIF。向我展示三帧来自完成 GIF 的帧,以便我确认输出正确。

如果已安装 HyperFrames(npx skills add heygen-com/hyperframes),它可以一步完成上述操作。

我用惨痛教训学到的东西

  • “让它高级”意味着一个物体改变形状。 16 种效果中的每一种都是一个东西变成另一个东西:按钮变成播放器,条形变成线条,卡片变成窗口。从一个图片淡入到另一个图片每次看起来都很廉价。
  • 保持阶段才是人们真正在看的部分。 8 秒中有 4.4 秒是保持阶段。如果在此期间没有任何移动,循环会显得死气沉沉。每个配方都在这里保持一些小东西存活:进度条、光标、第二波光线。
  • 起始状态的残留影像能衬托变化。 在按钮或卡片开始的位置留下一个微弱的轮廓,让视线跟随移动。没有它,结束状态看起来像是凭空出现。
  • 错开一个节拍,不要同时发生。 行、条、字母和点各自比上一个晚一点点开始。所有东西一起移动看起来就像一个幻灯片过渡。
  • 第 0 帧会使用错误字体绘制。 嵌入的字体在有人使用之前不会加载,因此第一帧可能会用后备字体绘制。在第一次 seek(0) 之前明确加载每种字体。
  • 缩放它,而不是重绘它。 使用固定坐标绘制的效果在改变画布尺寸时会跑到一个角落。应将整个绘制内容缩放以填满帧。
  • 空白页面通常是由于名称重复声明。 在文件间复制辅助代码可能会重复颜色常量,导致整个脚本停止运行。每个名称只声明一次,如果页面为空,请将红色控制台错误信息粘贴回 Claude。
  • 八秒对于 Reel 剪辑来说太慢了。 放到 Instagram B-roll 中的完整循环未能通过动效检查。截取主动移动部分(大约 1.4 秒),并在旁白下使用保持模式。
  • 选择统一的时间单位并保持一致。 导出工具和页面必须就秒或毫秒达成一致。本包统一使用秒。
  • 在帧上标记杜撰的数字。 我在自己的演示板上杜撰了所有数据,因此每个效果都带有“示例”标签,直到使用真实数字。

交接

向用户提供 effect.html、MP4 和 GIF,以及三个经过检查的帧。然后用一行提供后续步骤:来自同一组的另一个效果,或者使用 reel-export 将其转换为带安全区域文字的竖版 Reel。

Individual skills in this repo

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

animated-chart

Make a looping animated chart for LinkedIn or a newsletter in code with Claude Code. Bars that become a line, a number that counts up, a before and after. Every value stays exactly as given. Use when someone says

apple-launch-film

Rebuild an Apple-style Mac launch film entirely in code with Claude Code. A thin menu bar, the black notch growing into widgets one scene at a time, full-screen gradient wallpapers and one short caption per scene. No screen recording, no After Effects. Use when someone says

brand-intake

The setup step every other skill in this pack reads. A short interview plus 3 to 5 reference frames becomes two files in your project, brand.md (who you are, what you sell, your assets) and MOTION.md (your colours, type, timing and motion rules), plus a rule in CLAUDE.md so Claude reads them before it animates anything. Use at the start of any motion project, or when someone says

launch-video

Make a 30-45 second product launch video in code with Claude Code, the kind SaaS companies post on launch day. One sentence split across scenes, real product screens with slow camera moves, a typed prompt, a proof beat and a clear call to action. Use when someone says

loop-cover

Turn a newsletter or blog cover into a seamless looping GIF at 896 x 640, 180 frames at 20fps. Only the one element you name moves, the loop is rotated so frame 1 shows the finished picture, and the seam is measured, not eyeballed. Use when someone says

milestone-reveal

Make a 12-second looping milestone clip in code with Claude Code. Thousands of tiny points drift like a night sky, pull together into your real number (followers, subscribers, revenue, customers), a line draws underneath and the label settles in. Premium, not a party. Use when someone says

model-showdown

Give the same motion brief to three AI models, keep each first try, render all three the same way and stack them into one comparison video with model names and logos. Makes a 16:9 side-by-side for a newsletter and a 1080 x 1920 stacked reel for Instagram and TikTok. Use when someone says

motion-brief-writer

Turns a rough idea for an animated graphic into a precise build brief for Claude Code, in your own brand. Asks for anything essential first (exact numbers, size, length, brand), keeps real results apart from sample data, and never invents a figure. Use when someone says

motion-prompt-writer

Write a complete 8-part Claude Motion prompt (The bar, Format, The one rule, Look, Motion, Never, Before you finish, The scene) for one short looping motion graphic, in your own brand. Takes your brand (a website screenshot, a logo, hex codes, or nothing for the Apple-style default) and one moment you want to show, in plain words. Use when someone says

newsletter-promo

Turn a newsletter edition into a 12-20 second promo clip for LinkedIn, Instagram or X that drives people to read and subscribe. Hook question, three proof frames from the edition, then the newsletter name and where to read it. Use when someone says

reel-export

Turn any horizontal or square motion video into a 1080 x 1920 Instagram Reel or TikTok that uploads cleanly. Headline and logos inside the safe zone, H.264, yuv420p, limited colour range, bt709, a silent audio track when there is no sound, and an ffprobe check before upload. Use when someone says

reference-to-motion

Turn references you admire into a scene-by-scene Claude Motion prompt for your own topic and brand. Takes a video for the moves (screenshots, frames or a contact sheet of a reel or ad) and, optionally, a look reference for the style (a website, a brand, a moodboard). Use when someone says

title-sequence-3d

Make a cinematic 3D title sequence (8-15 seconds) in code with Claude Code and Three.js. A camera moves through a lit scene, such as a rainy street at night with brand names as neon signs, then a big question or title lands. Use when someone wants a scroll-stopping opener, a film-style intro,

vox-explainer

Make a short Vox-style documentary explainer (30-60 seconds) entirely in code with Claude Code. Torn paper, halftone texture, bold condensed type, motion on twos. Use when someone says

相关技能