web-performance-optimization

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

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill web-performance-optimization-duccuong159
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-performance-optimization
Source: https://github.com/DucCuong159/Realtime-chatapp/tree/main/.agent/skills/web-performance-optimization
Command: npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill web-performance-optimization-duccuong159

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, diagnose, and fix performance issues such as slow loading, large JavaScript bundles, unoptimized images, and poor Core Web Vitals scores. ## Core Features & Use Cases - Core Web Vitals Optimization: Measure and improve LCP, FID, and CLS with concrete fixes like image dimension attributes, preloading, and skeleton loaders. - Bundle Size Reduction: Analyze bundles with webpack-bundle-analyzer, replace heavy dependencies (moment.js to date-fns), implement code splitting, and remove dead code via tree shaking. - Image & Caching Strategy: Convert images to WebP/AVIF with sharp, implement responsive images and lazy loading, and configure cache headers and CDN delivery. - Use Case: Your Lighthouse score is 62 with a 4.2s LCP. Use this Skill to identify the 2.5MB hero image and 850KB bundle as root causes, then apply step-by-step fixes to reach a score above 90. ## Quick Start Audit my website's performance and give me a prioritized optimization plan to improve Core Web Vitals and reduce bundle size.

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?

Improve Core Web Vitals by first measuring LCP, FID, and CLS with Lighthouse, then fixing the largest issues. Compress and preload hero images for LCP, code-split JavaScript for FID, and set explicit image dimensions to eliminate CLS layout shifts.

How to reduce JavaScript bundle size in webpack?

Reduce bundle size by analyzing composition with webpack-bundle-analyzer, replacing heavy dependencies like moment.js with date-fns, importing only needed lodash functions, enabling tree shaking, and implementing route-based code splitting with dynamic imports.

Should I use WebP or AVIF for image optimization?

AVIF offers the best compression and should be served first, with WebP as a broader-support fallback and JPEG as the final fallback. Use the picture element with multiple source tags so browsers pick the best supported format.

Why does my website have high Cumulative Layout Shift?

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

When should I lazy load images and components?

Lazy load images and components that appear below the fold or behind user interaction, using the native loading="lazy" attribute or dynamic imports. Keep above-the-fold hero images eager with fetchpriority="high" to protect LCP.