performance-optimization

Diagnose and fix frontend and backend performance bottlenecks using measurement-driven profiling workflows.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill performance-optimization-duccuong159
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/DucCuong159/Realtime-chatapp/tree/main/.agent/skills/performance-optimization
Command: npx skills add https://github.com/DucCuong159/Realtime-chatapp --skill performance-optimization-duccuong159

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Slow load times, sluggish interactions, and unoptimized backend queries degrade user experience, but optimizing without measurement wastes effort on the wrong things. This Skill enforces a measure-first workflow that identifies real bottlenecks in Core Web Vitals, database queries, bundle size, and rendering before applying targeted fixes. ## Core Features & Use Cases - Measurement-First Workflow: Guides profiling with Lighthouse, Chrome DevTools, web-vitals RUM data, and backend timing before any optimization begins. - Anti-Pattern Fixes: Provides concrete code fixes for N+1 queries, unbounded data fetching, missing image optimization, unnecessary React re-renders, large bundles, and missing caching. - Performance Budgets & CI Enforcement: Defines budgets for bundle size, API latency, and Lighthouse scores with bundlesize and Lighthouse CI enforcement. - Use Case: Your React app's product page has a 5-second LCP. Use this Skill to profile the network waterfall, identify an unoptimized hero image and render-blocking scripts, apply responsive image markup with fetchpriority, and verify the improvement against Core Web Vitals thresholds. ## Quick Start Use the performance-optimization skill to profile my app's slow page load and fix the identified bottlenecks.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I improve Core Web Vitals scores like LCP and INP?

Improve Core Web Vitals by first measuring with Lighthouse and the web-vitals library, then targeting the specific bottleneck. For LCP, optimize hero images with responsive srcset and fetchpriority; for INP, reduce main-thread long tasks and unnecessary re-renders.

How to fix N+1 query problems in a backend API?

Fix N+1 queries by replacing per-record lookups with a single query using joins or ORM include statements. Detect them by logging database queries per request and watching for repeated identical query patterns.

Should I use React.memo and useMemo everywhere to speed up React?

No, overusing React.memo and useMemo adds complexity and overhead without benefit. Apply them only after profiling shows wasted re-renders or expensive computations, such as stabilizing object props or memoizing costly derived values.

What is a good performance budget for a web application?

A typical budget is under 200KB gzipped initial JavaScript, under 50KB CSS, API p95 responses under 200ms, and a Lighthouse performance score of 90 or above. Enforce budgets in CI with bundlesize and Lighthouse CI.

When should I not optimize performance?

Avoid optimizing without profiling evidence of an actual problem. Premature optimization adds complexity that costs more than the performance gained; measure first, fix the proven bottleneck, then verify with before-and-after numbers.