performance-optimization

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

Updated Jun 23, 2026
One-click install
npx skills add https://github.com/jampissarandev/Expense-Tracker --skill performance-optimization-jampissarandev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/jampissarandev/Expense-Tracker/tree/main/.github/skills/performance-optimization
Command: npx skills add https://github.com/jampissarandev/Expense-Tracker --skill performance-optimization-jampissarandev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Slow page loads, sluggish interactions, and unoptimized backend queries degrade user experience, but optimizing without measurement wastes effort on the wrong things. This Skill provides a structured measure-identify-fix-verify workflow so you target the actual bottleneck instead of guessing. ## Core Features & Use Cases - Measurement-First Workflow: Establishes baselines with synthetic tools (Lighthouse, DevTools Performance tab) and real-user monitoring (web-vitals library, CrUX) before any optimization. - Bottleneck Diagnosis: Decision trees map symptoms (slow LCP, high CLS, poor INP, slow API responses) to likely causes like N+1 queries, render-blocking resources, or large bundles. - Anti-Pattern Fixes: Concrete code examples for N+1 queries, unbounded data fetching, unoptimized images, unnecessary React re-renders, large bundles, and missing caching. - Use Case: Your dashboard page loads in 6 seconds. Use this Skill to profile the network waterfall, discover an N+1 query pattern in the transactions endpoint, fix it with a single joined query, and verify the improvement against Core Web Vitals thresholds. ## Quick Start Profile my app's slow dashboard page and identify the performance bottleneck, then fix it and verify the improvement with before-and-after measurements.

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?

Measure first with Lighthouse or the web-vitals library, then target the specific bottleneck. For LCP, optimize hero images with responsive srcset and fetchpriority; for INP, reduce main-thread long tasks and unnecessary re-renders. Good thresholds are LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1.

How to fix N+1 query problems in backend APIs?

Replace per-record queries with a single query using joins or includes, such as fetching tasks with their owners in one findMany call. Detect N+1 patterns by checking database query logs for repeated similar queries per request.

When should I use React.memo and useMemo?

Use React.memo for expensive child components that re-render unnecessarily and useMemo for expensive computations tied to specific dependencies. Avoid applying them everywhere, since overuse adds complexity without measurable benefit.

Should I optimize performance before measuring?

No. Optimization without profiling data is premature and often adds complexity without improving what matters. Establish a baseline with synthetic tools and real-user monitoring, fix the proven bottleneck, then measure again to verify.

How do I enforce a performance budget in CI?

Set budgets such as JavaScript under 200KB gzipped and API p95 under 200ms, then enforce them with bundlesize checks and Lighthouse CI (lhci autorun) in your pipeline. This catches regressions before they reach production.