performance-optimization

Optimize Next.js sites to improve Lighthouse performance scores.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/ikastner/skills-larockette --skill performance-optimization-ikastner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/ikastner/skills-larockette/tree/main/40-qa-performance/performance-optimization
Command: npx skills add https://github.com/ikastner/skills-larockette --skill performance-optimization-ikastner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimise the site to achieve a Lighthouse Performance score above 90 across pages by improving images, fonts, code splitting, cache headers, and bundle analysis.

Core Features & Use Cases

  • Image optimization: convert images to WebP/AVIF, apply proper dimensions, and leverage lazy loading to improve LCP
  • Font loading: self-hosted fonts with font-display: swap and Next.js optimizations
  • Code splitting and bundle analysis: dynamic imports to reduce JS payload and enable performance monitoring
  • Use cases: marketing sites, e-commerce dashboards, and content-heavy applications needing fast rendering

Quick Start

Apply the performance optimisations to a Next.js site and run Lighthouse to verify the score.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I improve my Next.js site to hit a Lighthouse performance score above 90?

To achieve a Lighthouse performance score above 90 on a Next.js site, you need to optimize images, apply font loading strategies, implement code splitting, set cache headers, and analyze your bundle. These optimizations reduce payload and improve Largest Contentful Paint.

What is the best way to optimize images for Lighthouse in Next.js?

Image optimization for Lighthouse involves converting images to WebP or AVIF formats, applying proper dimensions, and leveraging lazy loading. This reduces file size and improves LCP, directly boosting your Next.js site's performance score.

How do I reduce JavaScript payload and improve bundle analysis in Next.js?

Reducing JavaScript payload in Next.js requires using dynamic imports for code splitting. Combined with bundle analysis, this enables performance monitoring and ensures only necessary code loads on each route.

Does self-hosting fonts with font-display swap improve web vitals?

Self-hosting fonts with font-display: swap improves web vitals by preventing layout shifts and reducing font loading delays. Applying Next.js font optimizations ensures text renders quickly without blocking visual stability.

Can I apply these performance optimization patterns to e-commerce dashboards and content-heavy applications?

These performance optimization patterns apply directly to e-commerce dashboards, marketing sites, and content-heavy applications. They ensure fast rendering by optimizing images, fonts, JavaScript, CSS, rendering strategy, and caching across routes.

Why does my Next.js site have a low Lighthouse score despite using dynamic imports?

A low Lighthouse score despite dynamic imports may indicate unoptimized images, render-blocking fonts, or missing cache headers. Achieving a score above 90 requires applying comprehensive optimization across images, fonts, CSS, and caching.