Which snippet should I use?
Start from the symptom you see, not from the snippet name. Each table lists the snippet to run first and what to run next depending on what it shows. The same decision trees drive the agent skills, so an agent follows the same path.
If you are not sure where to start, run LCP, CLS and INP. They tell you which of the sections below applies.
Core Web Vitals are failing
| Symptom | Start with | Then |
|---|---|---|
| Largest Contentful Paint is slow | LCP | LCP subparts to find the slow phase, then LCP trail to see how the candidate changes |
| The LCP element is an image | LCP | Image element audit, LCP image entropy and priority hints audit |
| The LCP element is a video | LCP video candidate | Video element audit |
| Layout shifts during load | CLS | Layout shifts during loading and interaction, Find above-the-fold lazy-loaded images and Fonts preloaded, loaded and used above the fold |
| Slow interactions | INP | Interactions, then Input latency breakdown |
The page loads slowly
Navigation is not instant
| Symptom | Start with | Then |
|---|---|---|
| Back and forward reload the page | Back-forward cache | Fix the reasons it lists |
| The page redirects before it renders | Client-side redirect detection | TTFB |
| Next pages should feel instant | Speculation rules inspector | Prefetch resource validation |
The page feels janky or frozen
| Symptom | Start with | Then |
|---|---|---|
| Choppy scrolling | Scroll performance | Long animation frames |
| The page freezes | Long tasks | Long animation frames, then Long animation frames script attribution to name the scripts |
| Each interaction repeats expensive layout work | Forced synchronous layout | DOM size and depth |
| Content moves when the user clicks | Layout shifts during loading and interaction | Interactions |
| Animations stutter | Long animation frames | Long animation frames helpers |
Images, video and SVG are heavy
| Symptom | Start with | Then |
|---|---|---|
| Images are too big or blurry | Oversized images | Image element audit |
| Above-the-fold images are lazy-loaded | Find above-the-fold lazy-loaded images | Priority hints audit |
| Offscreen images load eagerly | Find non-lazy-loaded images outside of the viewport | Image element audit |
Images combine loading="lazy" with fetchpriority="high" | Find images with lazy and fetchpriority | Priority hints audit |
| Videos are slow to start | Video element audit | LCP video candidate |
| SVG files are large | SVG embedded bitmap analysis | Optimize the file, for example with SVGO |
Some users have slow connections
| Symptom | Start with | Then |
|---|---|---|
| Users on mobile or slow networks struggle | Network bandwidth and connection quality | Oversized images and Compression audit |
Running the snippets
Paste any snippet into the DevTools console, or save it as a DevTools snippet, as described in How to use. To run them from a terminal or in CI, use the CLI. To read the result of a snippet as a report, paste its returned object in the visualizer.