logo-animation
This skill should be used when the user asks to "animate our logo", "make a logo intro/stinger", "build a brand reveal", "create an app splash animation", "loop a loader logo", "draw on our SVG mark", "morph an icon into the wordmark", or "sync the logo to a sound-logo". Covers web (SVG/Lottie), video, and app-splash delivery.
1How It Works & Mechanism
Essentially a three-stage prompt pattern: "Technique Selection + Delivery Contract + Verification Loop". It forces the user/model to pick exactly one of three reveal techniques, constrains the output format, and verifies results via a screenshot-freezable feedback loop.
Pick ONE technique per logo — draw OR build OR morph — not all at once. Reveals run 0.8–2.5s. Never distort brand geometry; scale and fade are safe, skew and squash usually are not. Respect clearspace (keep the mark's minimum margin clear of motion debris). Always provide a `prefers-reduced-motion` path that shows the final mark with no motion.
The technique layer provides a six-row mapping table (stroke draw-on / mask wipe / build-on / morph / idle loop / wordmark), binding each row to "target element + mechanism" so choices are grounded in logic rather than intuition.
| Stroke draw-on | Line marks, monograms, signatures | `stroke-dashoffset` 1→0 |
The key technical element of the web track is pathLength normalization: normalizing the path length of arbitrary geometries to 1 so the same dasharray/dashoffset values work across all strokes.
`pathLength="1"` normalizes every path to length 1, so one `stroke-dasharray`/`offset` value works regardless of geometry. Stagger multiple strokes with `animation-delay`.
Audiovisual sync is treated as a hard constraint rather than a suggestion: the logo's settle frame must hit the audio accent exactly, determining audio timing before reveal duration.
When audio exists, the brand's final settle frame must land exactly on the sonic accent (the "ding"/whoosh peak). Decide the audio first, find the peak timecode, then time the reveal so the mark snaps to full opacity/scale on that frame.
Delivery paths are divided into three tiers based on target, each with its own implementation stack: Web inline SVG+CSS/GSAP, Product/App using Lottie (exported via Bodymovin, played via dotlottie-web/lottie-web), and Video using Remotion or After Effects (2x pre-render).
- **Video intro/outro**: Remotion (React) or After Effects render to ProRes/H.264. Pre-render at 2x for crispness.
The core of the verification loop is the "frozen frame": output HTML must include a built-in ?t=N seek harness (pausing animation and seeking time to N) so any timestamp can be deterministically captured via screenshots.
Include the freeze harness below, matched to the technique, so any moment can be screenshotted deterministically.
Acceptance relies on screenshot-based iterative loops rather than self-declaration: capture ?t=0, midpoint, and end freeze-frame screenshots to inspect fidelity and artifacts, tweaking parameters and re-capturing the same timestamps if failing.
**Iterate:** if any check fails (e.g. a half-drawn stroke at `?t=<dur>` or distorted geometry mid-reveal), fix the stroke-dashoffset/duration/easing, re-render the **same** `?t=N`, and re-screenshot to confirm the fix — loop until every frame is clean.
The repository provides a shared script toolbox (root scripts/) for "deliver-and-verify", explicitly referencing two scripts: seek-shot.sh (freeze and screenshot) and contact-sheet.sh (tile into a comparison sheet).
> **Packaged helper** (`scripts/`): `scripts/seek-shot.sh anim.html 0 1.5 3` freezes the `?t=N` harness and screenshots each moment; `scripts/contact-sheet.sh sheet.png frame-*.png` tiles them for one-glance review. See `scripts/README.md`.
Features explicit routing alongside sibling skills: web/SVG/Lottie uses this skill's standalone-HTML loop, while video stings route to remotion-video's rendering loop.
**For web/SVG/Lottie delivery use this standalone-HTML loop; for a video logo sting, render via the remotion-video verify loop instead.**
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | npx + Playwright(截图冻结帧;首次会下载 Chromium) |
| cli | ffmpeg(contact-sheet.sh 横向拼接截图) |
| package | gsap(build-on 时间线与 MorphSVG 变形) |
| package | @lottiefiles/dotlottie-web(Lottie 交付与 reduced-motion 守卫) |
| package | lottie-web(经典 SVG 渲染器替代方案,矢量 logo 最锐利) |
| package | flubber(无 GSAP 时的路径插值回退) |
| network | iart.ai 引流链接(文档内,非运行时调用) |
4Recommended Governance & Evidence
- scripts/: Executing local scripts or commands: npx -y playwright screenshot … (seek-shot.sh / inline commands in SKILL.md): pulls from npm on first run
- 网络端点: Declaring external network access: The skill scripts themselves do not call business APIs; network surface comes from toolchains: npx pulling Playwright/npm packages and Chromium binaries (registry)
- 本地工作目录: File read/write and artifact output: frame-<t>.png (seek-shot.sh outputs screenshots in current directory)
5Second-Pass Verification
- [ok] 「单一技法 + 0.8–2.5s + clearspace」是否只是口号 — Core principle 段给出五条硬约束,且末尾 checklist 第 5 条把「Reveal ≤2.5s;if audio present, the settle lands on the sound-logo peak」列为完成条件;logo-patterns 亦含 timing tables 与 clearspace 规则。约束有落地位置。
- [ok] 冻结 harness(?t=N)在四种技法下是否都有写法 — SKILL.md 的 harness 代码块内按技法给分支注释:CSS(animationDelay/playState)、GSAP(tl.pause(); tl.seek(T))、SMIL(pauseAnimations/setCurrentTime)、Lottie(setFrame(round(T*fps))),并统一设 window.__ready = true。与 references 的技法清单一致。
- [discrepancy] scripts/ 位置语义(首遍称为 Packaged helper) — SKILL.md 写 'Packaged helper (`scripts/`)',但该 scripts/ 是**仓库根**目录(motion-design/scripts/),并非 skill 目录内(skills/logo-animation/ 下无 scripts/)。同仓库 after-effects 反而自带 skills/after-effects/scripts/*.jsx。因此若按单 skill 粒度安装(如 skills add 只取某 skill 目录),`scripts/seek-shot.sh` 的相对路径可能解析不到;用户在仓库根工作时路径成立。此非安全项,但会影响「照抄命令能否跑通」。
- [discrepancy] 「one CDN GSAP <script>」与实际示例是否一致 — SKILL.md 第 102 行写交付可用 inline SVG + reveal(CSS 或 one CDN GSAP `<script>`),但 references/logo-patterns.md 中 GSAP 相关示例全部是 ES import(`import gsap from "gsap"`),全文没有任何 GSAP 的 CDN URL;文件里唯一的 CDN 地址是 dotlottie 的 jsdelivr ESM。属文档措辞与示例不齐(不影响功能,照 import 写法走需要打包器或在浏览器用 importmap)。
- [ok] 外部依赖是否有遗漏(隐藏网络调用) — 对所有 skills/ 目录 grep cdn./unpkg/esm./http(s):// 仅命中 logo-patterns.md:161 的 jsdelivr 与两处 iart.ai UTM 链接;npx 命令仅出现在 scripts/seek-shot.sh 与 SKILL.md 的 playwright 示例行。无其他端点。
- [ok] 安全面:凭证/环境变量/任意代码执行 — 脚本仅有 set -euo pipefail、路径拼接与两个外部命令(npx/ffmpeg),无 env/API_KEY/secret 读取,无 eval/exec,无 shell 表达式求值用户输入;SKILL.md 无任何凭证指令。第一遍判定的「无凭证读取」成立。
- [ok] reduced-motion 是否真的三条路都有落地 — SKILL.md:CSS 示例含 @media (prefers-reduced-motion: reduce) 关动画并给终态;Lottie 示例 reduce 时 setFrame(totalFrames-1);logo-patterns 第 7 节列出 CSS/SVG、Lottie、Video(poster 图)、JS gate(matchMedia 分支)四类回退。checklist 第 4 条亦要求「static end-frame fallback shipped」。
- [ok] 与 remotion-video 的路由声明 — SKILL.md 第 100 行明确视频 logo sting 走 remotion-video 的 verify loop;remotion-video 侧的 SKILL.md 亦把自己定义为 heavy tier 的对应物('this is the heavy-tier counterpart to a web scene's ?t=N'),两端互指一致。
6Verdict & Scenarios
bd1880e7aef3cfb7…