How to fix Core Web Vitals failures with Claude doing the heavy lifting
When to use: PageSpeed dropped, LCP regressed past 2.5s, business is asking why.
Prerequisites
- Skill installed — git clone https://github.com/addyosmani/agent-skills ~/.claude/skills/addyosmani-agent-skills
- URL or repo to audit — Public URL or local dev server
Flow
-
DiagnoseUse the perf skill on https://mysite.com. Pull a CrUX report, run a Lighthouse trace, and identify the top 3 LCP and INP culprits.✓ Copied→ Ranked list of culprits with file refs, not generic 'optimize images' advice
-
FixFor the top LCP culprit, apply the fix. For images, prefer fetchpriority + AVIF/WebP fallback. Show diff and rationale.✓ Copied→ Code change + before/after expected metric impact
-
VerifyRe-run Lighthouse locally. Compare to previous run.✓ Copied→ Numbers improved; if not, hypothesis was wrong — back to step 1
Outcome: Measurable LCP/INP improvements with a paper trail.
Pitfalls
- Claude over-eagerly reaches for a heavy framework rewrite — Skill includes a 'minimum viable change' rule — paste it back if the agent drifts