optimize

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

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/WeWake1/BSOMS --skill optimize-wewake1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/WeWake1/BSOMS/tree/main/.agents/skills/optimize
Command: npx skills add https://github.com/WeWake1/BSOMS --skill optimize-wewake1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow load times, janky animations, and bloated bundles degrade user experience, but teams often optimize blindly without knowing which bottleneck actually matters. This Skill provides a systematic workflow to measure, diagnose, and fix frontend performance issues. ## 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. - Targeted Optimization Strategies: Apply 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(), list virtualization, and route-based code splitting. - Use Case: A Next.js dashboard feels sluggish on mobile. Use this Skill to measure LCP and INP, discover an oversized hero image and an unmemoized chart component, then apply responsive images and React.memo to hit Core Web Vitals targets. ## Quick Start Ask the AI to analyze the performance of your product page and optimize its load time, animations, and bundle size.

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 on my website?▼

Improve Core Web Vitals by optimizing LCP with compressed hero images 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 React?▼

Reduce bundle size with route-based and component-based code splitting, tree shaking unused exports, removing unused dependencies, and lazy loading heavy components via dynamic imports like lazy(() => import('./HeavyChart')).

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

Layout thrashing happens when JavaScript alternates DOM reads and writes, 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 reflows and drops frames.

When should I not use lazy loading for images?▼

Never lazy load above-the-fold content like hero images, since it delays LCP and hurts Core Web Vitals. Reserve lazy loading for below-fold images and use responsive srcset with modern formats like WebP or AVIF.