performance-optimization
Optimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.
Author
Category
Development ToolsInstall
Download and extract to your skills directory
Copy command and send to AI Agent for auto-install:
Performance Optimization
Skill Overview
The performance optimization skill helps developers measure before optimizing, using a systematic approach to identify and resolve genuine performance bottlenecks in the frontend, backend, and database queries, while avoiding the complexity caused by premature optimization.
Applicable Scenarios
Core Features
Frequently Asked Questions
When should performance optimization be performed?
Optimization should only be performed when there is evidence of a performance problem. Common triggers include performance requirements specified in the documentation, users or monitoring reports indicating slow behavior, Core Web Vitals scores falling below their thresholds, suspected regressions introduced by a recent change, or the development of features that process large amounts of data or handle high traffic. Avoid the mindset of “optimize first and ask questions later”—optimization without measurement data often increases complexity without improving the metrics that actually matter.
How can you identify the true performance bottleneck?
Choose a measurement starting point based on the symptoms: for slow initial loads, inspect the network waterfall (DNS, TCP, TLS, server wait time), bundle size, and render-blocking resources; for sluggish interactions, analyze long main-thread tasks (>50ms), component re-renders, and layout shifts; for slow pages after navigation, measure API response times and client-side rendering duration; for slow backend APIs, analyze database query logs, indexes, connection pools, and caching strategies. Use the Chrome DevTools Performance panel, Lighthouse, and the Web Vitals library to collect real data.
How should the results be validated after performance optimization?
Every performance-related change requires specific before-and-after data. Validation checks should include: whether the core Web Vitals metrics meet the “good” thresholds, whether the bundle size has not increased significantly, whether the new code contains no N+1 queries, whether the performance budget passes in CI, and whether existing tests still pass (ensuring the optimization has not broken functionality). For optimizations that affect user experience, also combine the results with real user monitoring (RUM) data to confirm that the improvement takes effect in real-world environments.