performance-optimization

Diagnose and fix application performance bottlenecks using a measure-first optimization workflow.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/ByronWilliamsCPA/plugin --skill performance-optimization-byronwilliamscpa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/ByronWilliamsCPA/plugin/tree/main/plugins/wff-code/skills/performance-optimization
Command: npx skills add https://github.com/ByronWilliamsCPA/plugin --skill performance-optimization-byronwilliamscpa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often optimize code based on guesses, adding complexity without improving what users actually experience. This Skill enforces a measure-first discipline: profile, identify the real bottleneck, fix it, verify with numbers, and guard against regressions. ## Core Features & Use Cases - Structured Optimization Workflow: A five-step loop (Measure, Identify, Fix, Verify, Guard) with symptom-to-cause decision trees for frontend and backend issues. - Core Web Vitals Guidance: Threshold tables for LCP, INP, and CLS plus instrumentation examples using the web-vitals library and Lighthouse CI. - Anti-Pattern Fixes with Code: Concrete before/after examples for N+1 queries, unbounded fetching, unoptimized images, unnecessary React re-renders, large bundles, and missing caching. - Use Case: Your API's p95 latency exceeds 200ms. Use this Skill to profile database queries, find an N+1 pattern in the task listing endpoint, replace it with a single joined query, and verify the improvement with before/after measurements. ## Quick Start Ask the AI to profile the slow endpoint or page, identify the actual bottleneck from measurements, and apply the appropriate fix from the anti-pattern catalog.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I fix slow page load times in a web application?▼

Measure first with Lighthouse or the DevTools Performance tab to establish a baseline, then check the Network waterfall for large bundles, slow TTFB, or render-blocking resources. Apply targeted fixes like code splitting, image optimization, or caching, then measure again to confirm improvement.

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

Check the database query log for repeated single-record lookups inside loops, which indicates an N+1 pattern. Replace per-item queries with a single query using a join or include, such as fetching tasks with their owners in one findMany call.

What are good Core Web Vitals thresholds for LCP, INP, and CLS?▼

LCP should be at or under 2.5 seconds, INP at or under 200 milliseconds, and CLS at or under 0.1 to qualify as Good. Values up to 4.0s, 500ms, and 0.25 respectively fall into Needs Improvement, and anything beyond is Poor.

Does this performance guidance apply to Python backends?▼

Yes, the measure-first discipline is language-agnostic. For Python services, profile with cProfile or py-spy and inspect database queries before changing code, rather than applying the TypeScript-specific import and bundling advice.

When should I not optimize application performance?▼

Do not optimize before you have evidence of a problem from profiling or monitoring data. Premature optimization adds complexity that costs more than the performance it gains, so only fix what measurements prove matters.