From aj-geddes-useful-ai-prompts-4
Optimizes web performance using code splitting, lazy loading, caching, compression, and monitoring to improve Core Web Vitals and user experience.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:web-performance-optimizationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Implement performance optimization strategies including lazy loading, code splitting, caching, compression, and monitoring to improve Core Web Vitals and user experience.
Minimal working example:
// utils/lazyLoad.ts
import React from 'react';
export const lazyLoad = (importStatement: Promise<any>) => {
return React.lazy(() =>
importStatement.then(module => ({
default: module.default
}))
);
};
// routes.tsx
import { lazyLoad } from './utils/lazyLoad';
export const routes = [
{
path: '/',
component: () => import('./pages/Home'),
lazy: lazyLoad(import('./pages/Home'))
},
{
path: '/dashboard',
lazy: lazyLoad(import('./pages/Dashboard'))
},
{
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Code Splitting and Lazy Loading (React) | Code Splitting and Lazy Loading (React) |
| Image Optimization | Image Optimization |
| HTTP Caching and Service Workers | HTTP Caching and Service Workers |
| Gzip Compression and Asset Optimization | Gzip Compression and Asset Optimization |
| Performance Monitoring | Performance Monitoring |
npx claudepluginhub aj-geddes/useful-ai-promptsOptimizes web app performance using React code splitting, webpack bundles, image optimization, service workers, caching, and Core Web Vitals monitoring for faster loads and better metrics.
Guides web performance optimization with bundle analysis, code splitting, image optimization, caching headers, and virtual lists.
Optimizes website and web application performance including Core Web Vitals, bundle size, caching, and runtime performance. Use for slow loading, performance audits, and SEO improvements.