用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dylantarre/animation-principles --skill performance-optimization命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | performance-optimization |
| description | Use when animation runs slow, janky, or causes frame drops |
Diagnose and fix slow or janky animations using Disney's 12 principles.
Issue: Calculating every frame in real-time
Fix: Use pose-to-pose (keyframe) animation. Let the browser interpolate between states using CSS transitions or will-change.
Issue: Too many simultaneous animations Fix: Stagger animations. Offset start times by 50-100ms to reduce concurrent calculations.
Issue: Too many secondary effects
Fix: Remove non-essential secondary animations on low-power devices. Use prefers-reduced-motion query.
Issue: Animating expensive properties (width, height, top, left)
Fix: Only animate transform and opacity. These are GPU-accelerated and skip layout/paint.
Issue: Animating off-screen elements Fix: Only animate what's visible. Use Intersection Observer to pause off-screen animations.
transform instead of position properties - GPU layerwill-change sparingly - Hints to browserwill-change isn't overused/* Fast */
.element {
will-change: transform;
transition: transform 200ms ease-out;
}
.element:hover {
transform: translateY(-4px);
}
/* Slow - avoid */
.element:hover {
top: -4px; /* Triggers layout */
}