core-web-vitals

Diagnose and optimize LCP, INP, and CLS metrics for web pages.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/Peterson-Benhame/agent-skills --skill core-web-vitals-peterson-benhame
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: core-web-vitals
Source: https://github.com/Peterson-Benhame/agent-skills/tree/main/packages/skills-catalog/skills/%28performance%29/core-web-vitals
Command: npx skills add https://github.com/Peterson-Benhame/agent-skills --skill core-web-vitals-peterson-benhame

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Web pages that fail Google's Core Web Vitals thresholds rank lower in search results and deliver poor user experiences, but diagnosing and fixing LCP, INP, and CLS issues requires specialized knowledge of rendering, networking, and JavaScript execution. ## Core Features & Use Cases - LCP Optimization: Fix slow server responses, render-blocking resources, and unoptimized hero images using preload hints, fetchpriority, critical CSS inlining, and SSR/SSG patterns. - INP Optimization: Reduce interaction latency by breaking up long tasks, deferring heavy event handler work, lazy-loading third-party scripts, and memoizing expensive React components. - CLS Optimization: Eliminate layout shifts by reserving space for images, ads, and embeds, configuring font-display strategies, and using transform-based animations. - Use Case: A Next.js site has a 4.2s LCP and failing Search Console report. Use this Skill to identify the LCP element, preload the hero image with fetchpriority="high", inline critical CSS, and bring LCP under 2.5s. ## Quick Start Analyze my page's Core Web Vitals and fix the LCP, INP, and CLS issues causing it to fail Google's thresholds.

Frequently Asked Questions about core-web-vitals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve LCP on my website?

Improve LCP by reducing server response time below 800ms with CDN or edge caching, preloading the LCP image with fetchpriority="high", inlining critical CSS under 14KB, and rendering content server-side instead of client-side.

How to fix CLS caused by images and ads?

Fix CLS by adding explicit width and height attributes or aspect-ratio CSS to all images, reserving min-height containers for ads and embeds, and using font-display: optional or matched font metrics to prevent text shifts.

What is a good INP score and how do I measure it?

A good INP score is 200ms or less, measured at the 75th percentile of page visits. Measure it with the web-vitals JavaScript library, Chrome DevTools Performance panel, or field data from the Chrome User Experience Report.

Does this work with Next.js and React applications?

Yes, the guidance includes framework-specific fixes for Next.js, React, Vue, and Nuxt. Examples include using next/image with priority for LCP, useTransition and React.memo for INP, and dynamic imports for heavy components.

Why is my INP slow even though my page loads fast?

Slow INP usually comes from long tasks blocking the main thread, heavy event handlers, or third-party scripts competing during interactions. Break work into chunks with yielding, defer non-critical work with requestIdleCallback, and lazy-load third-party widgets.

When should I not use this Core Web Vitals skill?

Do not use it for general web performance work beyond the three metrics, full Lighthouse audits, or Astro-specific optimization. Those scenarios are covered by separate dedicated skills referenced in the documentation.