agentsclimarketplace

Core web vitals

Skill thisisAhsanIqbal/nextjs-seo-audit/skills/core-web-vitals

AI Agent Skills for SEO auditing , 11 SKILL.md files that teach Cursor, Claude Code, Copilot & more to perform comprehensive SEO audits. Zero dependencies.

Install
npx -y skills add thisisAhsanIqbal/nextjs-seo-audit --skill core-web-vitals

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Audits HTML patterns that affect Core Web Vitals (LCP, CLS, INP). Checks for layout shift causes, largest contentful paint blockers, and interaction responsiveness issues. Use when optimising page performance or fixing Google PageSpeed Insights warnings.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.8 KB, as published. Nobody here has run it

Core Web Vitals

Audit HTML for patterns that negatively impact Core Web Vitals — the performance metrics Google uses as a ranking signal.

Overview

MetricFull nameGood thresholdWhat it measures
LCPLargest Contentful Paint≤ 2.5sLoading — time until the largest visible element renders
CLSCumulative Layout Shift≤ 0.1Visual stability — unexpected layout movement
INPInteraction to Next Paint≤ 200msResponsiveness — delay between user input and visual update

1. LCP (Largest Contentful Paint) checks

Identify the likely LCP element and check for blockers:

Identify LCP candidate

The LCP element is typically the largest visible element above the fold:

  • Hero image (<img> near top of <body>)
  • Hero background image (CSS background-image)
  • Large heading (<h1>) with significant text
  • Video poster image

LCP blockers to flag

CheckStatus
Hero/banner <img> missing fetchpriority="high"⚠️ WARN "Add fetchpriority=high to LCP image"
Hero image uses loading="lazy"❌ FAIL "Never lazy-load the LCP element"
LCP image not preloaded (<link rel="preload" as="image">)⚠️ WARN "Preload LCP image for faster rendering"
Render-blocking CSS in <head> (stylesheets without media attribute)⚠️ WARN
Render-blocking JS in <head> (scripts without async/defer)⚠️ WARN
LCP image served in legacy format (JPG/PNG instead of WebP/AVIF)⚠️ WARN
No render-blocking resources✅ PASS

Font loading

CheckStatus
Custom fonts without <link rel="preload" as="font">⚠️ WARN "Preload critical fonts"
No font-display: swap or font-display: optional in @font-face⚠️ WARN "Add font-display to prevent invisible text"
Fonts preloaded properly✅ PASS

2. CLS (Cumulative Layout Shift) checks

Identify HTML patterns that cause layout shift:

CheckStatus
<img> without width and height attributes❌ FAIL "Missing dimensions cause layout shift"
<video> or <iframe> without width/height⚠️ WARN
Ads/embeds without reserved space (no explicit dimensions)⚠️ WARN "Reserve space for dynamic content"
Web fonts causing FOIT (Flash of Invisible Text) — no font-display⚠️ WARN
Content injected above existing content (banners, cookie notices without reserved space)⚠️ WARN
All images have dimensions✅ PASS "No layout shift from images"

CSS animation checks

CheckStatus
Animations using top, left, width, height (trigger layout)⚠️ WARN "Use transform instead for animations"
Animations using transform and opacity only✅ PASS "GPU-accelerated, no layout shift"

3. INP (Interaction to Next Paint) checks

Identify patterns that block the main thread:

CheckStatus
<script> tags without async or defer⚠️ WARN "Blocks main thread during parsing"
Inline <script> with heavy computation (> 50 lines)⚠️ WARN "Move heavy JS to async external file"
Event handlers in HTML attributes (onclick, onchange, etc.)⚠️ WARN "Use addEventListener instead for better performance"
Third-party scripts loaded synchronously⚠️ WARN "Load third-party scripts with async"
All scripts properly deferred/async✅ PASS

Third-party impact

Count third-party scripts (different domain):

  • 0–3 → ✅ PASS
  • 4–8 → ⚠️ WARN "Consider reducing third-party scripts"
  • 9+ → ❌ FAIL "Excessive third-party scripts severely impact INP"

4. General performance patterns

CheckStatus
<link rel="preconnect"> for third-party origins✅ PASS if present, ⚠️ WARN if missing with 3rd-party resources
<link rel="dns-prefetch"> for third-party origins✅ PASS if present
<link rel="preload"> for critical resources✅ PASS if present
Excessive DOM size (> 1500 elements)⚠️ WARN "Large DOM slows rendering"
<meta name="viewport"> with width=device-widthRequired for mobile CWV (see mobile-optimization for full viewport checks)

Reporting format

Core Web Vitals Audit
─────────────────────
LCP Risk Factors:  X issues found
CLS Risk Factors:  Y issues found
INP Risk Factors:  Z issues found

Overall CWV Risk:  LOW / MEDIUM / HIGH
  • 0 issues → LOW risk
  • 1–3 issues → MEDIUM risk
  • 4+ issues → HIGH risk

Edge cases

  • This skill audits HTML patterns that correlate with CWV issues — actual CWV scores require real-browser measurement (Lighthouse, CrUX data)
  • Next.js automatically handles image optimization, code splitting, and font loading — check for Next.js-specific patterns before flagging generic issues
  • Inline <style> for critical CSS is intentional and should NOT be flagged as a CLS risk — distinguish from injected layout-shifting styles
  • <script type="module"> is inherently deferred — do not flag as render-blocking
  • Third-party scripts loaded inside <iframe> do not block the main thread — exclude from INP third-party count
  • AMP pages have their own performance model — flag CWV patterns but note that AMP runtime handles many optimizations automatically

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.