optimize-ui

Diagnose and fix UI performance bottlenecks across loading, rendering, and animation.

3|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/langgenius/due-date-hq-jwl --skill optimize-ui-langgenius
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-ui
Source: https://github.com/langgenius/due-date-hq-jwl/tree/main/.claude/skills/optimize-ui
Command: npx skills add https://github.com/langgenius/due-date-hq-jwl --skill optimize-ui-langgenius

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Interfaces that feel slow, janky, or heavy frustrate users, but teams often optimize the wrong thing. This Skill guides you to measure first, identify the actual bottleneck (load time, rendering, animation, or bundle size), fix it, and verify the improvement with real metrics. ## Core Features & Use Cases - Bottleneck Diagnosis: Measure Core Web Vitals (LCP, INP, CLS), bundle size, frame rate, 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, layout thrashing, GPU-accelerated animation, and React re-render reduction. - Verification Workflow: Compare before/after Lighthouse scores, test on low-end devices and throttled 3G connections, and confirm no functional regressions. - Use Case: A React dashboard feels sluggish on mobile. Use this Skill to profile it, discover a 2MB unoptimized hero image and layout thrashing in a scroll handler, apply responsive images and batched DOM writes, then confirm LCP drops below 2.5s. ## Quick Start Ask the AI to diagnose why your page feels slow and fix the biggest performance bottleneck, measuring before and after.

Frequently Asked Questions about optimize-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve Core Web Vitals on my website?

Measure LCP, INP, and CLS first with Lighthouse or Chrome DevTools, then target the failing metric. Optimize hero images and preload critical resources for LCP, break up long JavaScript tasks for INP, and set explicit image dimensions or aspect-ratio to fix CLS.

How to reduce JavaScript bundle size in a React app?

Use route-based and component-based code splitting with dynamic imports, enable tree shaking, and remove unused dependencies. Lazy load heavy components like charts with React.lazy so they only download when needed.

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

Janky animations usually animate layout-driving properties like width, height, top, or left, forcing expensive reflows. Animate transform and opacity instead, which run on the GPU, and use requestAnimationFrame for JavaScript-driven motion.

What is layout thrashing and how do I avoid it?

Layout thrashing happens when JavaScript alternates between reading layout properties (like offsetHeight) and writing styles, forcing repeated reflows. Batch all reads first, then perform all writes together to minimize layout recalculation.

Should I lazy load all images on my page?

No. Lazy load only below-the-fold images using loading="lazy". Lazy loading above-the-fold content delays your Largest Contentful Paint and hurts perceived performance, so hero images should load eagerly with proper sizing and modern formats like WebP.