performance-and-web-vitals

Solid

Audit UI performance with Lighthouse and fix Core Web Vitals — LCP, CLS, INP. Fast UI is good UX. Use when optimising page load, fixing layout shift, reducing input delay, improving Lighthouse scores, or reviewing images, fonts, and render-blocking resources.

Web & Frontend 31 stars 5 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
50
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Performance and Web Vitals ## Run a Lighthouse Audit ```bash # CLI audit — outputs JSON and HTML report npx lighthouse https://example.com --output html --output-path ./lighthouse-report.html # Headless, useful in CI npx lighthouse https://example.com --chrome-flags="--headless" --output json --output-path ./report.json # Audit specific categories only npx lighthouse https://example.com --only-categories=performance,accessibility,seo ``` Or open Chrome DevTools → Lighthouse tab → Analyse page load. **Target scores:** | Category | Target | |---|---| | Performance | ≥ 90 | | Accessibility | 100 | | Best Practices | ≥ 95 | | SEO | ≥ 95 | --- ## Core Web Vitals ### LCP — Largest Contentful Paint *How fast does the main content appear?* **Target: ≤ 2.5s** LCP measures when the largest visible element (hero image, heading, video poster) renders. It is the user's perception of "did the page load?" **Common causes and fixes:** | Cause | Fix | |---|---| | Unoptimised hero image | Use WebP/AVIF, correct size, `fetchpriority="high"` | | Image not preloaded | `<link rel="preload" as="image" href="hero.webp">` | | Render-blocking CSS/JS | Defer non-critical JS, inline critical CSS | | Slow server response | CDN, caching headers, edge delivery | | Web font blocking render | `font-display: swap` or `optional` | ```html <!-- Preload LCP image --> <link rel="preload" as="image" href="hero.webp" fetchpriority="high"> <!-- LCP image: no lazy loading --> <img src="hero.webp" alt...

Details

Author
dembrandt
Repository
dembrandt/dembrandt-skills
Created
3 months ago
Last Updated
yesterday
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category