web-performance-optimization

Diagnose and optimize website performance including Core Web Vitals, bundle size, and caching.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill web-performance-optimization-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-performance-optimization
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/web-performance-optimization
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill web-performance-optimization-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow websites hurt user experience, SEO rankings, and conversion rates. This Skill provides a systematic workflow to measure, analyze, and fix performance issues like slow loading times, large JavaScript bundles, unoptimized images, and poor Core Web Vitals scores. ## Core Features & Use Cases - Core Web Vitals Optimization: Diagnose and fix LCP, FID, and CLS issues with concrete code patterns for images, scripts, and layout stability. - Bundle Size Reduction: Analyze JavaScript bundles, replace heavy dependencies, implement code splitting, and remove dead code. - Image & Caching Strategies: Convert images to WebP/AVIF, implement responsive and lazy-loaded images, and configure caching headers. - Use Case: Your Next.js site scores 62 on Lighthouse with a 4.2s LCP. Use this Skill to identify the oversized hero image and 850KB bundle, apply the provided optimization patterns, and verify improvement to a 94 score. ## Quick Start Audit my website's performance and give me a prioritized plan to improve my Core Web Vitals scores.

Frequently Asked Questions about web-performance-optimization

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

FAQPage Schema
How do I improve Core Web Vitals scores on my website?

Start by measuring LCP, FID, and CLS with Lighthouse, then fix the biggest issues first. Common fixes include optimizing hero images with modern formats, code splitting large JavaScript bundles, and setting explicit width and height on images to prevent layout shifts.

How to reduce JavaScript bundle size in Next.js?

Analyze your bundle with webpack-bundle-analyzer, replace heavy dependencies like moment with date-fns, import only needed lodash functions, and use next/dynamic for lazy loading components. Enabling tree shaking and removing dead code can cut bundle size by over 50 percent.

What image formats should I use for web performance?

Use AVIF for the best compression, WebP as a widely supported fallback, and optimized JPEG as a final fallback via the picture element. Combine this with responsive srcset images, explicit dimensions, and lazy loading for below-the-fold content.

Why is my website fast on desktop but slow on mobile?

Mobile devices have slower CPUs and networks, so JavaScript execution and large assets hurt more. Test with Chrome DevTools throttling or Lighthouse CPU slowdown, reduce main thread work, and optimize for 3G and 4G network conditions.

What causes high Cumulative Layout Shift and how do I fix it?

High CLS is usually caused by images without dimensions, dynamically injected content, or late-loading fonts. Fix it by always setting width and height attributes, using the CSS aspect-ratio property, and reserving space with skeleton loaders.