Skip to content

web-performance

Use when diagnosing or fixing Core Web Vitals issues, optimizing LCP/INP/CLS, auditing third-party scripts, or implementing performance budgets. Also use when correlating performance with search rankings or conversion rates.

ModelSource
sonnetpack: performance
Full Reference

Systematic CWV diagnosis and fix workflow. Pull field data first, compare against lab, identify the failing metric and specific element, then apply targeted fixes in priority order. Not a checklist run-through — a root cause investigation.

INP replaced FID as a Core Web Vital in March 2024. Do not reference FID for CWV assessment.

Called by: seo-audit Phase 4.5 when CWV thresholds fail.

MetricGoodNeeds ImprovementPoor
LCP< 2.5s2.5s – 4s> 4s
INP< 200ms200ms – 500ms> 500ms
CLS< 0.10.1 – 0.25> 0.25
ItemValue
CrUX evaluationP75 of real user data — 75% of visits must meet “good”
Google ranking signalMobile field data (PHONE form factor) — always check mobile
Lab toolLighthouse — simulated throttled Moto G4 on 4G
Field toolCrUX via crux-api — 28-day rolling P75
CrUX lag after deploy28 days for full window to reflect fix
scheduler.yield() supportChrome 129+ — always feature-detect with fallback
fetchpriority="high" supportChrome 102+, Safari 17.2+, Firefox 132+
View Transitions APIBaseline Newly Available — adds ~70ms LCP on mobile
Speculation Rules APIChromium-only (Chrome, Edge, Opera)
I want to…File
Pull field vs lab data, understand the diagnosis decision treereference/diagnosis.md
Fix LCP — hero image, TTFB, preload, font loading, Speculation Rulesreference/lcp-fixes.md
Fix INP — long tasks, Web Workers, event delegation, layout thrashingreference/inp-fixes.md
Fix CLS — image dimensions, aspect-ratio, font fallback metrics, animationsreference/cls-fixes.md
Audit third-party scripts, implement facade pattern, optimize GTMreference/third-party-scripts.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.


┏━ ⚡ web-performance ━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Diagnose and fix Core Web Vitals — LCP, INP, CLS ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛