performance-optimization

Diagnose and fix frontend, backend, and database performance bottlenecks through measurement-driven optimization.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/nntoan/ultra-omp --skill performance-optimization-nntoan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/nntoan/ultra-omp/tree/main/packages/proflow/skills/performance-optimization
Command: npx skills add https://github.com/nntoan/ultra-omp --skill performance-optimization-nntoan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Slow applications, regressions, and wasted optimization effort happen when teams guess at bottlenecks instead of measuring. This Skill enforces a measure-identify-fix-verify-guard workflow so every performance change is justified by data and reverted if it does not beat the baseline. ## Core Features & Use Cases - Measurement-First Workflow: Establish baselines with synthetic tools (Lighthouse, DevTools) and real-user monitoring (web-vitals, CrUX) before changing any code. - Anti-Pattern Fixes: Concrete remedies for N+1 queries, unbounded fetching, connection pool exhaustion, missing image optimization, unnecessary React re-renders, large bundles, and missing caching. - Regression Guarding: Set performance budgets, enforce them in CI with bundlesize and Lighthouse CI, and log every attempt so failed ideas are not retried. - Use Case: Your API's p95 latency spikes after a release. Use this Skill to profile query plans with EXPLAIN ANALYZE, identify a missing composite index, verify the fix against the baseline, and add a CI budget to prevent recurrence. ## Quick Start Ask the AI to profile the slow endpoint or page, identify the actual bottleneck with measurements, and propose a fix with before-and-after numbers.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I fix N+1 queries in my backend API?▼

N+1 queries are fixed by replacing per-record lookups with a single query using joins or ORM includes, such as findMany with an include clause. Confirm the fix by checking the database query log before and after the change.

How to improve Core Web Vitals scores like LCP and INP?▼

Improve LCP by optimizing hero images with responsive srcset, fetchpriority, and correct dimensions; improve INP by reducing main-thread long tasks and unnecessary re-renders. Measure with the web-vitals library and Lighthouse, targeting LCP under 2.5s and INP under 200ms.

When should I add a database index for a slow query?▼

Add an index only after running EXPLAIN ANALYZE shows a sequential scan or stale statistics on the filtered columns. Index for the query shape with equality columns first, and skip indexing for low-selectivity filters, leading wildcards, or write-heavy tables.

Why is my connection pool exhausted and should I increase its size?▼

Pool exhaustion shows as all endpoints slowing at once while the database sits idle. Raising the pool size just moves the queue; instead find what holds connections, and use a proxy like pgbouncer for serverless or autoscaling environments.

When should I not optimize application performance?▼

Do not optimize without profiling evidence of an actual bottleneck. Premature optimization adds complexity that costs more than it gains, and changes that measure as neutral should be reverted rather than kept.

How do I prevent performance regressions in CI?▼

Set explicit budgets for bundle size, API p95 latency, and Lighthouse scores, then enforce them with bundlesize and Lighthouse CI in the pipeline. Complement synthetic gates with real-user monitoring alerts on p75 metric movement.