performance-optimization

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

2|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/NAMEWTA/learning-open-code --skill performance-optimization-namewta
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/NAMEWTA/learning-open-code/tree/main/translator/open-ai-skills/addyosmani-agent-skills/skills/performance-optimization
Command: npx skills add https://github.com/NAMEWTA/learning-open-code --skill performance-optimization-namewta

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Slow page loads, poor Core Web Vitals scores, and sluggish APIs hurt user experience, but optimizing without measurement wastes effort on the wrong things. This Skill enforces a measure-first workflow so you fix real bottlenecks instead of guessing. ## Core Features & Use Cases - Measure-Identify-Fix-Verify-Guard Workflow: A structured five-step process that starts with baseline measurement (Lighthouse, DevTools, web-vitals RUM, APM) and ends with regression monitoring. - Core Web Vitals Targets: Concrete thresholds for LCP, INP, and CLS, plus symptom-to-cause decision trees for slow loads, janky interactions, and slow APIs. - Anti-Pattern Fixes with Code: Ready-to-apply fixes for N+1 queries, unbounded data fetching, unoptimized images, unnecessary React re-renders, oversized bundles, and missing caching. - Use Case: Your app's Lighthouse score dropped after a release. Use this Skill to profile the regression, identify an N+1 query and an unoptimized hero image, apply the fixes, and verify LCP returns under 2.5 seconds. ## Quick Start Ask the agent to profile the current page's performance, identify the top bottleneck affecting Core Web Vitals, and propose a measured fix.

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

Start by measuring with Lighthouse and the web-vitals library to establish baselines for LCP, INP, and CLS. Then identify the specific bottleneck using the symptom decision tree, apply a targeted fix such as image optimization or code splitting, and re-measure to verify improvement.

How to fix N+1 database queries in a backend API?▼

Replace per-record queries with a single query using join or include clauses, such as Prisma's include option. Check your database query logs to find endpoints issuing one query per row, then batch the related data fetching into one query.

What is a good performance budget for a web app?▼

The recommended budgets are under 200KB gzipped JavaScript for initial load, under 50KB CSS, under 200KB per above-the-fold image, API responses under 200ms at p95, and a Lighthouse performance score of at least 90. Enforce these in CI with bundlesize and Lighthouse CI.

When should I use React.memo and useMemo?▼

Use React.memo for expensive child components that re-render unnecessarily and useMemo for costly computations. Avoid applying them everywhere, since overuse adds complexity without benefit; profile first to confirm a re-rendering problem exists.

When should I not optimize performance?▼

Do not optimize without evidence of a performance problem. Premature optimization adds complexity that costs more than the performance it gains; always profile first and only fix bottlenecks that measurements prove matter.