1实现原理 · 为什么它能做到
本质是「技法选择 + 交付契约 + 验证回路」三段式提示词:先逼用户/模型在三种揭示技法里只选一种,再限定输出形态,最后用可截图冻结的回路验收。
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.
技法层给了一张六行映射表(stroke draw-on / mask wipe / build-on / morph / idle loop / wordmark),每行绑定「适用对象 + 机制」,让选择有依据而不是凭感觉。
| Stroke draw-on | Line marks, monograms, signatures | `stroke-dashoffset` 1→0 |
web 路线的关键技术点是 pathLength 归一化:把任意几何的路径长度归一到 1,于是同一个 dasharray/dashoffset 值对所有笔画都成立。
`pathLength="1"` normalizes every path to length 1, so one `stroke-dasharray`/`offset` value works regardless of geometry. Stagger multiple strokes with `animation-delay`.
音画同步被做成硬约束而非建议:logo 的落定帧必须压在音频重音上,先定音频再定揭示时长。
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.
交付路线按目标分三档并各自给出实现栈:web 内联 SVG+CSS/GSAP、产品/App 用 Lottie(Bodymovin 导出,dotlottie-web/lottie-web 播放)、视频用 Remotion 或 After Effects(2x 预渲染)。
- **Video intro/outro**: Remotion (React) or After Effects render to ProRes/H.264. Pre-render at 2x for crispness.
验证回路的核心是「冻结帧」:输出 HTML 必须内置 ?t=N seek harness(暂停动画并把时间设到 N),从而任意时刻都能被确定性截图。
Include the freeze harness below, matched to the technique, so any moment can be screenshotted deterministically.
验收用截图 + 迭代闭环,而不是自我声明:开 ?t=0 / 中点 / 结束三个冻结帧截图,检查保真与瑕疵,不合格就改参数重截同一时刻。
**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.
仓库为「交付即验证」提供共享脚本工具箱(根级 scripts/),本 skill 明确引用其中两支:seek-shot.sh(冻结并截图)与 contact-sheet.sh(拼成一张对比图)。
> **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`.
与姊妹 skill 有明确路由:web/SVG/Lottie 用本 skill 的 standalone-HTML 回路,视频 sting 则改走 remotion-video 的渲染回路。
**For web/SVG/Lottie delivery use this standalone-HTML loop; for a video logo sting, render via the remotion-video verify loop instead.**
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| 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 引流链接(文档内,非运行时调用) |
4风险提醒 风险提醒:橙色 · 评估后使用
- 验证回路依赖远程包与浏览器下载(供应链面) — `npx -y playwright screenshot` 免确认安装 playwright 并首次下载 Chromium;版本不受本仓库锁定。企业环境若无 npm 出网或需要锁定二进制来源,这条回路会失败或引入未审计二进制。可改用手工截图或其他本地浏览器工具完成同样的三帧检查。
- 交付 HTML 可能引入第三方 CDN — reference 的 Lottie 示例直接从 cdn.jsdelivr.net 以 ESM 引入 @lottiefiles/dotlottie-web;若直接照抄到生产页面,等于运行时依赖第三方 CDN 的可用性与完整性(应改为本地打包,SKILL.md 另一示例即用本地 /logo.lottie)。
- scripts/ 路径依赖仓库根工作目录 — SKILL.md 称 'Packaged helper (`scripts/`)',实际脚本在仓库根 motion-design/scripts/,skill 目录内没有;按单 skill 粒度安装后照抄 `scripts/seek-shot.sh` 可能找不到文件。同仓库 after-effects 的 .jsx 却放在 skill 内,路径语义不统一。
- 文档措辞与示例不齐(GSAP CDN) — SKILL.md 提到 'one CDN GSAP <script>',但 reference 全篇用 `import gsap from "gsap"`,未给任何 GSAP CDN URL;照文档字面执行会缺一个可用的引入方式。
- 品牌素材与法务层面无约束 — skill 会生成/改写品牌标识的动画,但没有任何关于标志使用许可、clearspace 具体数值来源或商标规范的核查步骤——「on-brand」靠用户自己保证。
- 文档含商业引流 — reference 末尾与仓库 README 含 iart.ai 的 UTM 链接,属产品化 skills 集合的转化位;不影响功能,但阅读时应知悉定位。
5第二遍独立确认
- [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'),两端互指一致。
6结论
bd1880e7aef3cfb7…3c129f769d