web-performance-optimization

Apply code splitting, lazy loading, caching, and Core Web Vitals monitoring to web apps.

204|30|Updated Nov 8, 2025
One-click install
npx skills add https://github.com/secondsky/claude-skills --skill web-performance-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-performance-optimization
Source: https://github.com/secondsky/claude-skills/tree/main/plugins/web-performance-optimization/skills/web-performance-optimization
Command: npx skills add https://github.com/secondsky/claude-skills --skill web-performance-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Improves page load times and Core Web Vitals by applying code-splitting, lazy loading, caching strategies, and performance monitoring.

Core Features & Use Cases

  • Code splitting (React)
  • Webpack optimization and caching
  • Image optimization and lazy loading
  • Service worker caching and performance monitoring

Quick Start

Implement lazy loading for heavy routes and split bundles to reduce initial load.

Frequently Asked Questions about web-performance-optimization

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

FAQPage Schema
How do I reduce initial page load times with code splitting?

Code splitting divides your bundle into smaller chunks loaded on demand, reducing initial load time. Route-based splitting in React and dynamic imports in bundlers like Webpack defer non-critical code until needed, lowering Time to Interactive.

What's the best way to optimize images and implement lazy loading?

Lazy loading defers offscreen image rendering until users scroll near them, cutting initial payload. Combine with image optimization—compression, modern formats, responsive sizing—to reduce file size and improve Core Web Vitals metrics like Largest Contentful Paint.

How do service workers improve caching and performance?

Service workers intercept network requests and serve cached assets, enabling offline functionality and faster repeat visits. They work across React and non-React apps to reduce server requests and stabilize Core Web Vitals scores.

Can I monitor Core Web Vitals metrics in production?

Yes. Instrument your app to collect and report Core Web Vitals—Largest Contentful Paint, First Input Delay, Cumulative Layout Shift—from real users. Continuous tracking reveals performance regressions and validates improvements from caching and code splitting.

Does Webpack caching work with code splitting?

Webpack caching paired with code splitting ensures split chunks are cached separately by content hash. This prevents users from re-downloading unchanged bundles, amplifying performance gains from splitting across repeat visits.

When should I apply lazy loading versus code splitting?

Use code splitting to reduce initial bundle size for all users; apply lazy loading to defer rendering of below-the-fold images and heavy UI components. Both techniques address different bottlenecks—bundle size and rendering time—and work together effectively.