web-quality-core-web-vitals

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

Updated May 26, 2026
One-click install
npx skills add https://github.com/avel123111/triplanio --skill web-quality-core-web-vitals-avel123111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-quality-core-web-vitals
Source: https://github.com/avel123111/triplanio/tree/main/.claude/skills/web-quality-core-web-vitals
Command: npx skills add https://github.com/avel123111/triplanio --skill web-quality-core-web-vitals-avel123111

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 frustrate users with slow loading, laggy interactions, and shifting layouts. This Skill provides targeted diagnosis and fixes for the three metrics that determine page experience quality. ## Core Features & Use Cases - LCP Optimization: Fix slow server response, render-blocking resources, and unoptimized hero images using preload hints, fetchpriority, critical CSS, and the Speculation Rules API. - INP Optimization: Break up long tasks with scheduler.yield(), prioritize visual feedback in event handlers, and defer heavy work with requestIdleCallback. - CLS Optimization: Eliminate layout shifts by reserving space for images, ads, and embeds, matching web font metrics, and animating with transform instead of layout properties. - Use Case: A React app has a poor INP score because a click handler runs heavy computation synchronously. The Skill shows how to yield to the scheduler after rendering immediate visual feedback, then defer analytics to idle time. ## Quick Start Ask the assistant to analyze your page's Core Web Vitals and fix the LCP, INP, or CLS issues it finds.

Frequently Asked Questions about web-quality-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 TTFB below 800ms with CDN or edge caching, preloading the LCP image with fetchpriority="high", inlining critical CSS under 14KB, and ensuring the LCP element renders in the initial HTML rather than via client-side JavaScript.

How to fix high INP caused by long JavaScript tasks?

Fix high INP by breaking long tasks into chunks and yielding with scheduler.yield() so the browser can handle pending input. In event handlers, render visual feedback first, yield, then run heavy computation, and defer analytics with requestIdleCallback.

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

CLS is caused by images without dimensions, ads or embeds without reserved space, dynamically injected content, and web font swaps. Prevent shifts by setting width/height or aspect-ratio, using min-height containers, and animating with transform instead of layout properties.

Does the Speculation Rules API work in all browsers?

The Speculation Rules API for prerendering works only in Chromium browsers; Safari and Firefox ignore it, making it a progressive enhancement. Gate side effects like analytics on the prerenderingchange event since they fire when prerendering starts.

How do I identify which element is causing my LCP or CLS problems?

Use PerformanceObserver with the largest-contentful-paint entry type to log the LCP element and its render time, and the layout-shift entry type to log shifted nodes with their previous and current rects. For field data, use the web-vitals attribution build.