cumulative-layout-shift
Installation
SKILL.md
Minimize cumulative layout shift
Layout shifts cause accidental clicks, reading disruption, and user frustration—a good CLS score ensures content stays where users expect it.
Quick Reference
- CLS measures visual stability—target score below 0.1
- Always set width/height on images and embeds
- Reserve space for ads, banners, and dynamic content
- Use transform animations instead of layout-changing properties
Check
Measure CLS using Lighthouse or PageSpeed Insights. Verify score is below 0.1 for good visual stability.
Fix
Reserve space for images/embeds with dimensions, use font-display strategies, and avoid injecting content above existing content.