Borrowing it
Nothing to install: this file belongs to boshi-xixixi/TraeSkill. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/boshi-xixixi/TraeSkill/main/.trae/Skills/02_Designer_Motion/SKILL.mdgit clone --depth 1 https://github.com/boshi-xixixi/TraeSkillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/boshi-xixixi/traeskill/02_designer_motion)<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/02_designer_motion"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/02_designer_motion/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/02_designer_motion"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/02_designer_motion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00126 | $0.01718 |
| Opus 5.5 | $0.00050 | $0.00687 |
| Sonnet 5.5 | $0.00025 | $0.00344 |
| Haiku 4.5 | $0.00013 | $0.00172 |
Grade A, and why
designer-motion scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
动效设计与实现
动效不是装饰,是解释界面发生了什么。每加一个动画,先能回答"它在帮用户理解什么",答不上来就不要加。
一、决策顺序
按这个顺序做决定,顺序错了后面怎么调都别扭:
- 该不该动 —— 高频操作、键盘触发、数据刷新不要动
- 动给谁看 —— 告知状态变化 / 引导注意力 / 表达空间关系 / 提供操作反馈
- 用哪个工具 —— CSS / WAAPI / GSAP / Framer Motion
- 动哪些属性 —— 只动
transform和opacity - 多快、什么曲线 —— 见下方档位表
- 怎么被打断、怎么退出 —— 退出比进入快,且要能被中途接管
二、属性:只动合成层
| 属性 | 是否推荐 | 原因 |
|---|---|---|
transform、opacity |
✅ 首选 | 只走合成,不触发布局与重绘 |
filter、clip-path |
⚠️ 谨慎 | 开销较高,长列表里慎用 |
width/height/top/left/margin |
❌ 避免 | 每帧触发布局,必掉帧 |
box-shadow |
⚠️ 谨慎 | 用伪元素 + opacity 代替 |
background-color |
✅ 可用 | 只重绘,短时过渡可接受 |
will-change 只在动画开始前加、结束后移除,长期挂着会白白吃显存。
三、曲线与时长
曲线
- 进场(元素出现):
ease-out,起步快、收尾稳 - 退场(元素消失):
ease-in,起步慢、加速离开 - 位移和变形:不要用
linear,会显得机械 - 跟手/物理感:用弹簧,不要硬编码曲线
- 可用于接近 iOS 手感的缓动:
cubic-bezier(0.32, 0.72, 0, 1)
时长档位
| 场景 | 时长 |
|---|---|
| hover / 按压反馈 | 100–150ms |
| 小元素出现(图标、徽标) | 150–250ms |
| 弹层、下拉、抽屉 | 200–300ms |
| 页面级转场 | 300–500ms |
| 叙事型滚动动画 | 可更长,但必须可跳过 |
超过 400ms 的过渡,用户会开始觉得"卡"而不是"顺"。
四、编排
- 一组元素入场:每个元素间隔 30–80ms,且延迟不要完全等距,等距会显得机械
- 一个容器只做一次入场,不要让每个子块各自 fade-in
- 明显的主次:主元素先动,辅助元素跟随或不动
- 同时动的元素超过 3 个,要考虑减少
五、工具选择
| 需求 | 选择 |
|---|---|
| 简单的状态过渡(hover、展开、淡入) | CSS transition |
| 需要循环或关键帧 | CSS @keyframes |
| 需要 JS 控制播放/暂停/进度 | Web Animations API element.animate() |
| 复杂时间线、滚动绑定、SVG 变形 | GSAP + ScrollTrigger |
| React 内的进出场、布局动画、手势 | Framer Motion / Motion |
| 跟手拖拽、弹簧物理 | 优先用库(如 Vaul、Motion),不要手搓 |
原则:CSS 能做的不要上库,库能解决的不手搓。
六、可访问性与性能
必须处理 reduced motion
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
GSAP 场景用 gsap.matchMedia() 包一层:
const mm = gsap.matchMedia();
mm.add('(prefers-reduced-motion: no-preference)', () => {
// 动画代码
});
性能自查
- 用 DevTools Performance 录制,确认动画期间没有 Layout / Recalculate Style
- 掉帧时先看是不是动了非合成属性,其次看主线程是否被 JS 长任务占住
- 滚动联动动画优先用 CSS
animation-timeline: scroll()或IntersectionObserver,不要在scroll事件里同步改样式
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 142 lines · 126 tokens per session scan A 48814b8359b4
designer-motion is a skill published in the GitHub repository boshi-xixixi/TraeSkill (288 stars, last pushed 9d ago), licensed MIT. It adds 126 tokens to every session and 1,718 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.
designer-motion compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| designer-motionboshi-xixixi/TraeSkill | Skill | 288 | 9d ago | MIT | A | 126 | Claude Code |
| designRune-kit/rune | Skill | 96 | 2d ago | MIT | A | 67 | Claude Code |
| frontend-craftsentimony/skills | Skill | 8 | today | MIT | A | 99 | Claude Code |
| frontend-architectSarthib7/agentsmith | Skill | 11 | 1mo ago | none | A | 81 | Claude Code, Codex |
| frontend-design-guidelinesSarthib7/agentsmith | Skill | 11 | 1mo ago | none | B | 198 | Claude Code, Codex |
| design-taste-frontendxiehuan123/coding-coach | Skill | 6 | 3mo ago | none | A | 79 | Claude Code |
| ui-ux-pro-maxxiehuan123/coding-coach | Skill | 6 | 3mo ago | none | B | 238 | Claude Code |