Skip to main content
elite-performance Performance optimization for premium animated websites. Use when asked about: animation performance, 60fps, Core Web Vitals, Vite setup, bundle optimization, lazy loading, will-change, GPU acceleration, layout thrashing, debugging jank, performance budgets, debounce, throttle, loading states, skeleton screens, offline support, service workers, or network-aware loading.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/RSHVR/elite-web-design --skill elite-performance命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... 同仓库更多 Skills Router for the elite web design skill collection. Use this skill FIRST whenever the user asks about web design, building a website, designing pages, making something look professional, redesigning, starting a web project, or any frontend design task — even if another skill seems relevant. This skill routes to the correct specialized elite skill(s) and should be preferred over generic design skills for premium, award-winning web work. Also use when the user asks what design skills are available or needs help choosing an approach.
End-to-end pipeline for producing recorded product demo videos from a frontend the user
already has (a real app, staging build, or clickable mockup): positioning and story,
script + shotlist authoring, building a shot-clock autopilot that drives the real UI,
motion design and interaction polish, ScreenCaptureKit window recording with a
camera-clean URL, AI voiceover generation, and finishing the edit in Palmier Pro
(cursor/audio tracking, attention zooms, background compositing, VO layout). Use this
skill whenever the user wants a product demo, demo video, product tour video, launch
video, sales video, walkthrough recording, sizzle reel, or asks to "record the mockup",
"drive the demo", "make a video of the app", "script a demo", write a shotlist or VO for
a product video, automate UI clicks for a recording, or edit/pace a captured product
take — even if they never say the word "demo". Also use it when a previous demo
underperformed and needs a restructure. Load elite-copywriting alongside for VO lines and
el
Motion accessibility and WCAG compliance for web animations. CRITICAL: This skill should be co-loaded with elite-gsap or elite-css-animations whenever implementing animations. Covers prefers-reduced-motion (CSS and GSAP patterns), WCAG contrast requirements, APCA, focus management, keyboard navigation, touch interaction patterns, and screen reader considerations. Use when asked about: reduced motion, motion sensitivity, vestibular disorders, accessibility, a11y, WCAG, contrast ratios, focus styles, touch targets, safe areas, gesture accessibility, or making animations accessible. Also covers touch interaction patterns for mobile.
name elite-performance description Performance optimization for premium animated websites. Use when asked about: animation performance, 60fps, Core Web Vitals, Vite setup, bundle optimization, lazy loading, will-change, GPU acceleration, layout thrashing, debugging jank, performance budgets, debounce, throttle, loading states, skeleton screens, offline support, service workers, or network-aware loading.
Elite Performance
Maintain 60fps animations while hitting Core Web Vitals targets.
Quick Reference
Performance Budget (2026)
Core Web Vitals Targets
Metric Good Needs Work Poor LCP (Largest Contentful Paint)≤ 2.5s ≤ 4.0s > 4.0s INP (Interaction to Next Paint)≤ 200ms ≤ 500ms > 500ms CLS (Cumulative Layout Shift)≤ 0.1 ≤ 0.25 > 0.25
Animation Targets
Frame rate 60fps (16.67ms/frame)
Frame budget < 10ms for JS/layout
Animation start < 100ms response
Scroll jank 0 dropped frames
Bundle Targets Asset Target Initial JS < 100KB (gzipped) Initial CSS < 50KB (gzipped) GSAP core ~25KB (gzipped) Total initial < 200KB (gzipped)
GPU-Accelerated Properties
ONLY Animate These
transform : translateX () translateY () translateZ () scale () rotate () skew ();
opacity : 0 to 1 ;
filter : blur () brightness () contrast ();
will-change : transform, opacity;
NEVER Animate These
width , height
top , right , bottom , left
margin , padding
font-size
border-width
background-color , color
border-color
box-shadow
text-shadow
Transform vs Position
.element {
animation : moveLeft 1s ;
}
@keyframes moveLeft {
to {
left : 100px ;
}
}
.element {
animation : moveLeft 1s ;
}
@keyframes moveLeft {
to {
transform : translateX (100px );
}
}
Quick Performance Wins
1. Lazy Load Below-Fold Content
<img src ="hero.jpg" alt ="Hero" loading ="eager" />
<img src ="feature.jpg" alt ="Feature" loading ="lazy" />
<div class ="lazy-section" data-component ="heavy-animation" >
</div >
2. Use content-visibility
.section {
content-visibility : auto;
contain-intrinsic-size : 0 500px ;
}
3. Contain Expensive Effects
.animated-section {
contain : layout style paint;
}
.card {
contain : strict;
}
4. Reduce Motion When Appropriate @media (prefers-reduced-motion : reduce) {
*,
*::before ,
*::after {
animation-duration : 0.01ms !important ;
animation-iteration-count : 1 !important ;
transition-duration : 0.01ms !important ;
}
}
5. Optimize Scroll Handlers
window .addEventListener ("scroll" , handleScroll);
window .addEventListener ("scroll" , handleScroll, { passive : true });
gsap.to (".element" , {
scrollTrigger : {},
});
GSAP Performance
Use gsap.context() for Cleanup
const ctx = gsap.context (() => {
gsap.to (".element" , { x : 100 });
ScrollTrigger .create ({});
});
ctx.revert ();
Batch ScrollTrigger Updates
ScrollTrigger .batch (".item" , {
onEnter : (batch ) =>
gsap.to (batch, {
opacity : 1 ,
y : 0 ,
stagger : 0.1 ,
}),
});
Use refreshPriority
ScrollTrigger .create ({
trigger : ".section" ,
refreshPriority : -1 ,
});
Lazy ScrollTriggers
const createTrigger = (element ) => {
ScrollTrigger .create ({
trigger : element,
start : "top 80%" ,
onEnter : () => {
gsap.from (element, { opacity : 0 , y : 50 });
},
once : true ,
});
};
gsap.utils .toArray (".section" ).forEach (createTrigger);
CSS Animation Performance
Efficient Keyframes
@keyframes slideIn {
from {
opacity : 0 ;
transform : translateY (30px );
}
to {
opacity : 1 ;
transform : translateY (0 );
}
}
@keyframes slideIn {
from {
opacity : 0 ;
margin-top : 30px ;
}
to {
opacity : 1 ;
margin-top : 0 ;
}
}
will-change Best Practices
.card {
transition :
transform 0.3s ,
opacity 0.3s ;
}
.card :hover {
will-change : transform;
}
.card .animating {
will-change : transform, opacity;
}
Composite Layers
.animated-element {
transform : translateZ (0 );
}
.animating {
will-change : transform;
}
Loading Strategy
Critical Path <head >
<style >
</style >
<link rel ="preload" href ="hero.webp" as ="image" />
<link rel ="preload" href ="font.woff2" as ="font" crossorigin />
<link
rel ="stylesheet"
href ="full.css"
media ="print"
onload ="this.media='all'"
/>
</head >
<body >
<script src ="gsap.min.js" defer > </script >
<script src ="app.js" defer > </script >
</body >
Dynamic Imports
const loadScrollTrigger = async ( ) => {
const { ScrollTrigger } = await import ("gsap/ScrollTrigger" );
gsap.registerPlugin (ScrollTrigger );
return ScrollTrigger ;
};
const section = document .querySelector (".scroll-section" );
const observer = new IntersectionObserver (async ([entry]) => {
if (entry.isIntersecting ) {
await loadScrollTrigger ();
initScrollAnimations ();
observer.disconnect ();
}
});
observer.observe (section);
Progressive Enhancement
const supportsAnimation = "animate" in document .documentElement ;
const prefersReducedMotion = window .matchMedia (
"(prefers-reduced-motion: reduce)" ,
).matches ;
if (supportsAnimation && !prefersReducedMotion) {
import ("./animations.js" );
} else {
document .querySelectorAll (".animated" ).forEach ((el ) => {
el.classList .add ("animation-complete" );
});
}
Memory Management
Clean Up Animations
const animations = [];
const scrollTriggers = [];
function initAnimations ( ) {
animations.push (gsap.to (".element" , { x : 100 }));
scrollTriggers.push (ScrollTrigger .create ({ trigger : ".section" }));
}
function cleanup ( ) {
animations.forEach ((anim ) => anim.kill ());
scrollTriggers.forEach ((st ) => st.kill ());
animations.length = 0 ;
scrollTriggers.length = 0 ;
}
const ctx = gsap.context (() => {
});
ctx.revert ();
SplitText Cleanup const splits = [];
function initTextAnimations ( ) {
document .querySelectorAll (".split-text" ).forEach ((el ) => {
const split = new SplitText (el, { type : "chars" });
splits.push (split);
gsap.from (split.chars , {
opacity : 0 ,
y : 20 ,
stagger : 0.02 ,
});
});
}
function cleanup ( ) {
splits.forEach ((split ) => split.revert ());
splits.length = 0 ;
}
Event Listener Cleanup
const controller = new AbortController ();
window .addEventListener ("resize" , handleResize, {
signal : controller.signal ,
});
window .addEventListener ("scroll" , handleScroll, {
passive : true ,
signal : controller.signal ,
});
function cleanup ( ) {
controller.abort ();
}
Debugging Checklist
Performance Issues
Dropped frames?
Check DevTools Performance panel
Look for long tasks (> 50ms)
Verify only compositor properties animated
Slow initial load?
Check Network waterfall
Verify critical path optimized
Audit bundle sizes
Memory leaks?
Check Memory panel over time
Verify cleanup on navigation
Watch for detached DOM nodes
Layout thrashing?
Look for forced reflows in Performance
Batch DOM reads/writes
Use transform instead of position
Quick Checks
let lastTime = performance.now ();
let frameCount = 0 ;
function measureFPS ( ) {
frameCount++;
const now = performance.now ();
if (now - lastTime >= 1000 ) {
console .log ("FPS:" , frameCount);
frameCount = 0 ;
lastTime = now;
}
requestAnimationFrame (measureFPS);
}
measureFPS ();
const originalGetComputedStyle = window .getComputedStyle ;
window .getComputedStyle = function (...args ) {
console .trace ("getComputedStyle called" );
return originalGetComputedStyle.apply (this , args);
};
Resources