core-web-vitals

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

Updated Aug 8, 2026
One-click install
npx skills add https://github.com/wolfstar-project/code-zero --skill core-web-vitals-wolfstar-project
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: core-web-vitals
Source: https://github.com/wolfstar-project/code-zero/tree/main/.agents/skills/core-web-vitals
Command: npx skills add https://github.com/wolfstar-project/code-zero --skill core-web-vitals-wolfstar-project

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 and frustrate users with slow loading, laggy interactions, and shifting layouts. This Skill provides targeted diagnosis and concrete code-level fixes for each of the three metrics. ## Core Features & Use Cases - LCP Optimization: Fix slow server response, render-blocking resources, unoptimized hero images, and client-side rendering delays using preloading, fetchpriority, critical CSS, and SSR/SSG patterns. - INP Optimization: Break up long tasks with scheduler.yield(), prioritize visual feedback in event handlers, defer third-party scripts, and reduce framework re-renders. - CLS Optimization: Reserve space for images, ads, and embeds with dimensions and aspect-ratio, prevent font-swap shifts, and use transform-based animations. - Use Case: A Next.js site scores poorly in Search Console. Use this Skill to identify the LCP element, preload it with fetchpriority="high", memoize expensive React components to fix INP, and add aspect-ratio to images to eliminate CLS. ## Quick Start Analyze my page's Core Web Vitals and give me concrete fixes to improve LCP, INP, and CLS scores.

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 via client-side JavaScript.

How to fix INP issues caused by long tasks?▼

Fix INP by breaking long tasks into chunks and yielding to the main thread with scheduler.yield(), providing immediate visual feedback in event handlers before heavy work, and deferring non-urgent work with requestIdleCallback.

What causes CLS and how do I prevent layout shifts?▼

CLS is caused by images without dimensions, ads and embeds without reserved space, dynamically injected content, and web font swaps. Prevent it by setting width/height or aspect-ratio, using min-height containers, and font-display: optional.

Does this work with Next.js and React frameworks?▼

Yes, the Skill includes framework-specific guidance for Next.js, React, Vue, and Nuxt. Examples include using next/image with priority for LCP, useTransition and React.memo for INP, and NuxtImg with preload for Nuxt.

How do I measure Core Web Vitals with real user data?▼

Measure field data using the web-vitals library's onLCP, onINP, and onCLS callbacks sent to your analytics, the Chrome User Experience Report, or Search Console's Core Web Vitals report. Lab testing uses Lighthouse, WebPageTest, or Chrome DevTools.