optimize

Diagnoses and fixes UI performance issues across loading, rendering, animations, and bundle size.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/ivaylo91/Shopping-Mobile-App --skill optimize-ivaylo91
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/ivaylo91/Shopping-Mobile-App/tree/main/.agents/skills/optimize
Command: npx skills add https://github.com/ivaylo91/Shopping-Mobile-App --skill optimize-ivaylo91

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 frontend performance problems instead of guessing at optimizations. ## Core Features & Use Cases - Performance Diagnosis: Measure Core Web Vitals (LCP, INP, CLS), bundle size, runtime frame rates, and network waterfalls before changing any code. - Targeted Fixes: Apply concrete techniques for images (WebP/AVIF, srcset, lazy loading), JavaScript (code splitting, tree shaking), CSS, fonts, rendering (layout thrashing, virtual scrolling), and animations (GPU-accelerated transforms). - Verification Workflow: Compare before/after Lighthouse scores and test on real devices and throttled connections to confirm improvements without regressions. - Use Case: A React app's dashboard feels sluggish on mobile. Use this Skill to identify a 2MB bundle and unoptimized hero images, then apply route-based code splitting and responsive images to cut LCP below 2.5 seconds. ## Quick Start Ask the assistant to analyze your page's performance and fix the biggest bottlenecks, for example: "Optimize my landing page, it loads slowly on mobile."

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 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.

Why are my CSS animations laggy and how do I fix them?

Animations are laggy when they animate layout properties like width, height, top, or left, forcing expensive reflows. Animate only transform and opacity, which are GPU-accelerated, and target 16ms per frame for smooth 60fps rendering.

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. Fix it by batching all reads first, then performing all writes together in a separate pass.

Should I lazy load all images on my page?

No, only lazy load below-the-fold images. Lazy loading above-the-fold content delays the Largest Contentful Paint and hurts perceived performance. Use responsive srcset images and modern formats like WebP or AVIF for hero images instead.