optimize

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

Updated May 4, 2026
One-click install
npx skills add https://github.com/Gito125/gideon_portfolio --skill optimize-gito125
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/Gito125/gideon_portfolio/tree/main/.github/skills/optimize
Command: npx skills add https://github.com/Gito125/gideon_portfolio --skill optimize-gito125

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Web interfaces often suffer from slow load times, janky animations, and bloated bundles that degrade user experience. This Skill provides a systematic methodology to measure, diagnose, and fix performance bottlenecks instead of guessing at optimizations. ## Core Features & Use Cases - Performance Diagnosis: Measures Core Web Vitals (LCP, INP, CLS), bundle size, frame rate, and network waterfalls before making any changes. - Targeted Fixes: Covers image optimization (WebP/AVIF, srcset, lazy loading), JavaScript bundle reduction (code splitting, tree shaking), layout thrashing prevention, GPU-accelerated animations, and React-specific patterns like memoization and list virtualization. - Verification Workflow: Compares before/after Lighthouse scores and tests on real devices with throttled connections to confirm improvements. - Use Case: A Next.js portfolio site feels sluggish on mobile. Use this Skill to identify that unoptimized hero images and render-blocking JavaScript are the culprits, then apply responsive images, font subsetting, and route-based code splitting to bring LCP under 2.5 seconds. ## Quick Start Ask the AI to diagnose why your page feels slow and fix the biggest performance bottlenecks in your project.

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 hero images and preloading critical resources for LCP, breaking up long JavaScript tasks for INP, and setting explicit dimensions or aspect-ratio on images and embeds for CLS. 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, dynamic imports for heavy components, tree shaking to remove unused code, and removing unused dependencies. Use a 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, which trigger expensive reflows. Animate only transform and opacity, which are GPU-accelerated, and use requestAnimationFrame for JavaScript-driven animations.

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

Should I lazy load all images on my page?▼

No, never lazy load above-the-fold images like heroes, since that delays LCP and hurts perceived speed. Apply lazy loading only to below-fold images, and use responsive srcset with modern formats like WebP or AVIF for all images.