Core Web Vitals are three field metrics — LCP (loading), CLS (visual stability), INP (responsiveness, "good" at 2.5 s / 0.1 / 200 ms) — plus TTFB as an upstream diagnostic. This is a review lens for attributing a failing vital to a specific element, shift, or task and prescribing the narrowest fix; it is not a metrics tutorial (web.dev owns that).
Checklist (lead with the trap)
- Name the real LCP element before you optimize anything. LCP is whatever the largest in-viewport paint is on that load — often an
<img>, but it can be a text block, a<video>poster, or a CSSbackground-image. Read it from a trace /PerformanceObserver/ DevTools, not from "the hero looks big." A preload orfetchpriority="high"aimed at the wrong element wastes bandwidth and can demote the true LCP resource. - The LCP resource must be discoverable early and never lazy. It belongs in the initial HTML
src/srcsetso the preload scanner finds it; late-discovered ones (CSSbackground-image, script-loaded) need<link rel="preload">— and preloaded images still default to low priority, so pair withfetchpriority="high".loading="lazy"on the LCP element is always a bug. - Unblock the critical path and TTFB before micro-tuning. Render-blocking CSS/synchronous
<script>in<head>and a slow TTFB (aim under 800 ms) can make good LCP unreachable regardless of image work — check them and non-streaming SSR before blaming the asset. - Attribute every layout shift to a source — don't just quote the CLS number. Each shift traces to something concrete — an unreserved media/iframe/embed/ad box, a web-font swap with mismatched fallback metrics (FOUT reflow), a consent banner or toast injected above existing content, or an animation of layout properties. Fix the source, not the aggregate.
- Reserve space and animate on the compositor. Give media and late/async content an explicit box (
width/heightoraspect-ratio), tame font swap withfont-display: optionalfor body text or a metric-matched fallback viasize-adjust, and animatetransform/opacity— never layout properties. - INP: break up long tasks and shrink handler work. INP (over 200 ms is poor; it replaced FID) has three phases — input delay, processing, presentation. A long task (>50 ms) overlapping the interaction inflates whichever phase it lands on. Do the minimum in
click/keydown/pointerdownhandlers, defer non-urgent work, and yield withscheduler.yield()/scheduler.postTask()so the browser can paint feedback first — feature-detect each method (globalThis.scheduler?.yield,?.postTask): Safari does not ship the Scheduler API, so keep asetTimeout(0)/requestIdleCallbackchunking fallback. WatchsetIntervaland third-party timers that steal the main thread. - INP: budget hydration and render bursts. A large hydration pass or one big render/state update is a long task that inflates input delay exactly when users first interact (the main thread is busiest at startup). Attribute it with Long Animation Frames (
blockingDuration) rather than guessing which script is at fault.
Quick probes
rg only surfaces candidates — attribution needs a trace: Lighthouse / PageSpeed Insights (lab + CrUX field), the DevTools Performance panel (LCP marker + Layout Shifts track), and the web-vitals library with Long Animation Frames in the field.
rg -n 'loading=.?lazy|data-src|data-srcset|lazyload' src/ app/ public/ 2>/dev/null # LCP image deferred / JS-loaded?
rg -n 'fetchpriority|rel=.?preload' src/ app/ 2>/dev/null # is the LCP resource prioritized at all?
rg -n '<img|<iframe|<video' src/ app/ 2>/dev/null | rg -v 'width|height|aspect-ratio' # media with no reserved box -> CLS
rg -n 'font-display|size-adjust|@font-face' src/ app/ 2>/dev/null # FOUT reflow risk on swap
rg -n 'transition:|animation:|animate\(' src/ app/ 2>/dev/null | rg 'top|left|right|bottom|width|height|margin' # layout-animating -> CLS/jank
rg -n 'addEventListener\(.?.?(click|input|keydown|pointerdown)|onClick=|onInput=' src/ app/ 2>/dev/null # heavy interaction handlers -> INP
rg -n 'setInterval\(|scheduler\.yield|scheduler\.postTask|requestIdleCallback' src/ app/ 2>/dev/null # long-task / yielding signals
Boundary with sibling skills
- This skill: whole-page LCP/CLS/INP/TTFB budgeting — which element is LCP, whether it is discoverable + prioritized + unblocked, per-shift CLS attribution, main-thread/long-task/INP work.
- responsive-image-contracts —
srcset/sizes/fetchpriority/<picture>mechanics; it owns image-load priority for the LCP<img>, this skill owns whether that image is even the LCP element and the whole-page budget. - ssr-hydration-mismatch — hydration correctness and SSR streaming mechanics; this skill owns hydration cost as an INP/long-task source, that skill owns the mismatch itself.
- css-transition-animation-contracts — animation lifecycle and jank mechanics; this skill flags layout-property animation only as a CLS/INP source.
- client-error-observability-contracts — RUM/field capture wiring (
web-vitals, error payloads); this skill consumes field data, that skill owns the capture contract.
PR-worthiness gate
Count a Core Web Vitals finding only when all hold:
- There is evidence the metric is actually failing — field/CrUX data or a lab trace — not a hunch that code "looks slow."
- The finding is attributed to a specific element, shift, or task, not to the aggregate score.
- The fix is narrow: one preload/
fetchpriority/de-lazy on the true LCP element, one reserved-box/aspect-ratio/font-display, or one handler split/yield.
Reject weak findings:
- A hero image with
fetchpriority="high"and no lazy attribute is a positive control, not a defect. loading="lazy"on below-the-fold images is correct and expected.- A CLS number with no attributable source is not yet a finding — get the trace first.
- INP micro-tuning with no field signal is speculative; measure before prescribing.
Output shape
- Vital: LCP | CLS | INP | TTFB.
- Attribution: the actual LCP element / shifting element / blocking task, with file/line plus trace evidence.
- Symptom: late-discovered or lazy LCP, render-blocking or slow TTFB, unreserved box, FOUT reflow, injected banner, long task/heavy handler, hydration burst.
- Fix: smallest change — preload +
fetchpriority, de-lazy,aspect-ratio,font-display, reserve a box, split/yield the task. - Verification: re-measure (Lighthouse, DevTools trace, or field
web-vitals) and confirm the target metric moved.
Sources
- LCP metric and Optimize LCP (preload scanner, never lazy-load the LCP image) — https://web.dev/articles/lcp , https://web.dev/articles/optimize-lcp
- Fetch Priority API (preload keeps low priority without it) — https://web.dev/articles/fetch-priority
- CLS metric and Optimize CLS (reserve space, late-injected content) — https://web.dev/articles/cls , https://web.dev/articles/optimize-cls
- Best practices for fonts (
font-display: optional,size-adjust) — https://web.dev/articles/font-best-practices - INP metric (200 ms threshold, replaced FID, three phases) — https://web.dev/articles/inp
- Optimize INP, long tasks, and input delay (yield, third-party timers) — https://web.dev/articles/optimize-inp , https://web.dev/articles/optimize-long-tasks , https://web.dev/articles/optimize-input-delay
- TTFB and Optimize TTFB (under 800 ms, streaming SSR) — https://web.dev/articles/ttfb , https://web.dev/articles/optimize-ttfb
- Find slow interactions in the field (Long Animation Frames,
blockingDuration) — https://web.dev/articles/find-slow-interactions-in-the-field - MDN — Scheduler:
yield()method (feature detection) — https://developer.mozilla.org/en-US/docs/Web/API/Scheduler/yield