optimize

Diagnose and fix web performance issues across loading, rendering, animations, and bundle size.

1|Updated Oct 20, 2024
One-click install
npx skills add https://github.com/SteveChandler/quiver --skill optimize-stevechandler
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/SteveChandler/quiver/tree/main/.agents/skills/optimize
Command: npx skills add https://github.com/SteveChandler/quiver --skill optimize-stevechandler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow load times, janky animations, and bloated bundles degrade user experience and hurt Core Web Vitals scores. This Skill provides a systematic workflow to measure, diagnose, and fix interface performance problems instead of guessing at optimizations. ## Core Features & Use Cases - Performance Assessment: Measure Core Web Vitals (LCP, FID/INP, CLS), bundle size, runtime frame rates, and network waterfalls before changing any code. - Loading Optimization: Apply image optimization (WebP/AVIF, srcset, lazy loading), code splitting, tree shaking, font subsetting, and critical CSS strategies. - Rendering & Animation Fixes: Eliminate layout thrashing, use GPU-accelerated transform/opacity animations, virtualize long lists, and reduce re-renders with React memoization patterns. - Use Case: A Next.js page has a 5-second LCP and poor Lighthouse score. Use this Skill to identify the oversized hero image and un-split JavaScript bundle, then apply responsive images and route-based code splitting to bring LCP under 2.5 seconds. ## Quick Start Analyze this page's performance bottlenecks and optimize its Core Web Vitals, bundle size, and rendering speed.

Frequently Asked Questions about optimize

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 optimizing LCP with hero image compression and preloading, reducing INP by breaking up long JavaScript tasks, and fixing CLS by setting explicit image dimensions and aspect-ratio. Measure with Lighthouse before and after each change.

How to reduce JavaScript bundle size in a React app?▼

Reduce bundle size with route-based and component-based code splitting, tree shaking unused code, removing unused dependencies, and lazy loading heavy components via dynamic imports. Use webpack-bundle-analyzer to identify the largest contributors first.

What is layout thrashing and how do I fix it?▼

Layout thrashing occurs when JavaScript alternates between reading layout properties and writing styles, forcing repeated reflows. Fix it by batching all reads first, then all writes, so the browser performs a single layout pass.

Which CSS properties are safe to animate for 60fps?▼

Animate only transform and opacity, which are GPU-accelerated and skip layout and paint. Animating width, height, top, or left triggers expensive layout recalculations and causes jank.

When should I not use lazy loading for images?▼

Do not lazy load above-the-fold images, especially the LCP element, since it delays the largest contentful paint. Reserve lazy loading for below-fold images and always set dimensions to prevent layout shift.