Skip to content

Guide · Agent skill

How to use the Cumulative Layout Shift Audit agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains how to install and use the cumulative-layout-shift skill, a set of instructions that lets an AI agent audit a web page for cumulative layout shift (CLS), the measure of how much content moves around while a page loads. It is written for readers who have never used agent skills. By the end you will know what the skill tells the agent to check, how to add it to your setup, and how to ask for an audit in plain language.

Cumulative Layout Shift Auditthedaviddias/Front-End-Checklist · MIT

Quick start

  1. 1Download the ZIP. Get the cumulative-layout-shift skill ZIP from this page.
  2. 2Unzip into the skills folder. Extract it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project.
  3. 3Or upload in the Claude apps. Go to Settings → Capabilities → Skills and upload the skill there.
  4. 4Measure CLS. Run Lighthouse or PageSpeed Insights on the page and note the CLS score.
  5. 5Ask for an audit. Describe the problem in plain language, such as a page that jumps while loading.
  6. 6Review the changes. Check each proposed edit yourself, apply it, then measure CLS again to confirm the score is below 0.1.

What the skill makes the agent do

Once installed, the skill gives the agent a checklist for finding and reducing cumulative layout shift. CLS measures visual stability: layout shifts cause accidental clicks, reading disruption, and user frustration, so a good score means content stays where users expect it.

The skill points the agent at common causes. These include images and embeds without set width and height, ads, banners and other dynamic content that push existing content down, and late-loading fonts or injected content. The guidance aims for a CLS score below 0.1.

  • Check: measure CLS with Lighthouse or PageSpeed Insights and confirm the score is below 0.1.
  • Fix: reserve space for images and embeds using dimensions, use font-display strategies, and avoid injecting content above existing content.
  • Explain: describe how CLS works and why unexpected shifts frustrate users.
  • Code review: flag exact files, requests or rendering steps that add layout cost, and describe how the issue was measured.

Install the skill from the ZIP download

Download the ZIP for this skill from our page, then unzip it. The skill folder contains SKILL.md and a references/rule.md file with more detailed examples.

For a personal setup, unzip it into ~/.claude/skills/. To limit it to one project, unzip it into the .claude/skills/ folder inside that project instead.

If you use the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

~/.claude/skills/

Trigger the skill with a natural request

You do not need a special command. Describe what you want in ordinary language and mention page loading, layout stability or CLS. The skill's description covers auditing slow page loads, heavy assets and rendering delays related to minimizing cumulative layout shift, so requests about those topics are the ones it is designed for.

The skill also asks the agent to verify the real bottleneck in DevTools, Lighthouse or field data before recommending changes. Give the agent your measurements if you have them, since this makes the advice more specific.

  • "Audit this page for cumulative layout shift and tell me what's causing it."
  • "My product page jumps when the images load. Find out why and suggest fixes."
  • "Review this layout for things that could shift after load, like ads or late fonts."
  • "Here is my Lighthouse report. Explain the CLS result and what to change first."

What you need before you start

The skill needs a way to measure CLS: Lighthouse, PageSpeed Insights or Chrome DevTools. It also needs access to the page source or the files being reviewed, because the agent's suggestions depend on the actual markup and CSS.

The skill runs no scripts and uses no network access, according to its listing. It works from the instructions and the files you give it.

  • Lighthouse, PageSpeed Insights or Chrome DevTools to measure CLS
  • Access to the page source or files under review

Safety notes: review changes before you ship them

The skill recommends changes, but the agent's edits to real code should be checked by a person before release. Do not expect automatic fixes to be applied safely without review.

The skill is for web pages only. It does not apply to non-web projects, because the guidance covers browser page rendering only. For deep framework-specific code, the skill refers to an external reference file whose detailed examples are not summarised in the skill itself.

  • Review every edit the agent proposes to real files.
  • Re-measure CLS after changes to confirm the score improved.
  • Use the skill for browser-rendered pages only.

Tips for better results

Measure first. Run Lighthouse or PageSpeed Insights, or check field data, before asking for changes. The skill is built to confirm the bottleneck before recommending fixes.

Give the agent concrete files. Pointing it at the template, stylesheet or component that renders the shifting element gives more useful findings than a general question.

Set image and embed dimensions. The skill's quick reference says to always set width and height on images and embeds, or reserve space with CSS aspect-ratio, as shown in the reference examples.

What people use it for

  • Checking a product page where images load late and push the text down.
  • Reviewing a landing page for banners or ads that insert content above the fold.
  • Finding fonts or dynamically injected content that cause text to move after load.
  • Preparing a page for release with a structured stability check.
  • Interpreting a Lighthouse or PageSpeed Insights CLS result and deciding what to change first.

Frequently asked questions

How do I install the cumulative-layout-shift agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. You can also upload it in the Claude apps under Settings → Capabilities → Skills.

Is the cumulative layout shift skill free?

The skill is published under the MIT licence. Check the repository's licence file for the full terms.

What does the skill require?

It needs Lighthouse, PageSpeed Insights or Chrome DevTools to measure CLS, and access to the page source or files you want reviewed. It runs no scripts and uses no network access.

Can the skill fix my layout shifts automatically?

Not safely without review. The skill recommends changes, but a person should check the agent's edits to real code before release.

What is a good CLS score?

The skill aims for a CLS score below 0.1, which the reference rates as good visual stability.

Does this skill work for non-web projects or frameworks?

It covers browser page rendering only, so it does not suit non-web projects. For detailed framework-specific examples, it points to references/rule.md, which is not summarised in the skill itself.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits front-end developers who want a structured stability check before release, site owners investigating a jumpy page, and teams already reading Lighthouse or PageSpeed Insights results. It is a poor fit for non-web work, for anyone expecting automatic fixes to be applied without review, or for readers who need deep framework-specific code beyond what the skill summarises.

Download the skill