cumulative-layout-shift
What it does
This skill looks for page elements that move during loading, such as images or ads that push text down. It is for web builders who want a stable, predictable page.
When to use it
- ✓When visitors complain that buttons move just before they click.
- ✓When a page's text jumps down after images or ads appear.
- ✓When you want a better score on Google's page speed checks.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/cumulative-layout-shift/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Why does the text on my page jump around while it loads?”
5 new skills a week. 1 minute to read.
How it works
The agent checks how the page reserves space for images, embeds and other content. It then suggests setting sizes in advance so nothing shifts later.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
Explain
Explain how CLS measures visual stability and why unexpected layout shifts frustrate users and cause accidental clicks.
Code Review
Review the routes, assets, and loading behavior that affect Minimize cumulative layout shift. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/cumulative-layout-shift
FAQ
What is a layout shift?
It is when content moves after it has already appeared on screen. This can make visitors click the wrong thing.
How is the problem measured?
The skill suggests Lighthouse or PageSpeed Insights, and aims for a score below 0.1.
Does this skill also fix slow loading?
It focuses on movement during loading rather than overall speed.
Details
Original description by the author
Use when auditing slow page loads, heavy assets, or rendering delays related to Minimize cumulative layout shift. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2804
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.