optimize

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

Updated Dec 18, 2025
One-click install
npx skills add https://github.com/l0lxl0lw/dotfiles --skill optimize-l0lxl0lw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/l0lxl0lw/dotfiles/tree/main/ai/shared/skills/impeccable/optimize
Command: npx skills add https://github.com/l0lxl0lw/dotfiles --skill optimize-l0lxl0lw

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 - Measurement-first diagnosis: Assess Core Web Vitals (LCP, FID/INP, CLS), bundle size, runtime frame rates, and network waterfalls before changing any code. - Targeted optimization playbooks: Concrete techniques for images (WebP/AVIF, srcset, lazy loading), JavaScript (code splitting, tree shaking), CSS, fonts, rendering (avoiding layout thrashing), and GPU-accelerated animations. - Framework-specific guidance: React patterns like memo, useMemo, useCallback, and list virtualization, plus framework-agnostic re-render reduction. - Use Case: A product page scores poorly on Lighthouse with a 5s LCP. Use this Skill to identify the oversized hero image and render-blocking scripts, apply responsive images and critical CSS, then verify the improvement with before/after metrics. ## Quick Start Ask the AI to optimize the performance of your product landing page, focusing on load time and animation smoothness.

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 critical CSS, reducing INP by breaking up long JavaScript tasks, and fixing CLS by setting explicit dimensions on images and embeds. Measure with Lighthouse before and after each change.

How to reduce JavaScript bundle size in a React app?

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

What is layout thrashing and how do I avoid it?

Layout thrashing happens when JavaScript alternates between reading layout properties and writing styles, forcing repeated reflows. Avoid it by batching all DOM reads first, then performing all writes together in a separate 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 lazy load images?

Never lazy load above-the-fold content like hero images, since it delays the Largest Contentful Paint and hurts perceived speed. Reserve lazy loading for below-fold images and use loading="lazy" with proper srcset sizing.

Why does my optimization not improve real user experience?

Testing only on desktop Chrome with fast connections hides real bottlenecks. Test on low-end Android devices with throttled 3G networks and use real user monitoring to confirm improvements for actual users.