performance-opt

Identify and fix web performance bottlenecks across Next.js and React stacks.

21|2|Updated Nov 5, 2023
One-click install
npx skills add https://github.com/sgcarstrends/sgcarstrends --skill performance-opt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-opt
Source: https://github.com/sgcarstrends/sgcarstrends/tree/main/.claude/skills/performance-opt
Command: npx skills add https://github.com/sgcarstrends/sgcarstrends --skill performance-opt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps identify and fix performance bottlenecks across the platform, including bundle size, render performance, and API latency.

Core Features & Use Cases

  • Bundle analysis and code-splitting guidance.
  • Rendering optimizations with memoization and dynamic imports.
  • API performance improvements and query optimization.

Quick Start

Run a bundle analysis and implement a dynamic import to lazy-load a heavy component.

Frequently Asked Questions about performance-opt

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

FAQPage Schema
How do I identify performance bottlenecks in my React app?

Performance bottlenecks in React apps stem from bundle size, render inefficiency, and API latency. Measure using Core Web Vitals (LCP, FID, CLS), run bundle analysis with Lighthouse, profile React re-renders, and check API response times to pinpoint the slowest components.

What's the best way to reduce bundle size in a Next.js application?

Reduce bundle size through code splitting, dynamic imports for lazy-loaded components, tree shaking to eliminate dead code, and dependency optimization. Analyze your bundle with Lighthouse to identify large modules, then split heavy components into separate chunks loaded only when needed.

How do I optimize React render performance with memoization?

Optimize rendering with React.memo to skip re-renders of unchanged components, useMemo to cache expensive computations, and useCallback to stabilize function references. Combine these with virtualization for large lists and debouncing for frequent updates to maintain a responsive UI.

Can I measure and enforce performance benchmarks like Core Web Vitals?

Yes, Core Web Vitals—LCP, FID, CLS, plus FCP, TTFB, TTI—are measurable benchmarks for web performance. Track these metrics during development and pre-deployment to enforce performance standards and catch regressions before they reach production.

Does performance optimization apply to database query efficiency?

Yes, database query efficiency is part of overall performance optimization. Slow queries inflate API response times, which directly impact user experience. Analyze query performance alongside bundle size and rendering to address all layers of application latency.

What performance techniques work with both React and Next.js stacks?

Memoization (useMemo, useCallback, React.memo), code splitting, dynamic imports, bundle analysis, and virtualization work across React and Next.js. Both stacks support tree shaking, dependency optimization, and pre-deployment performance measurement for Lighthouse metrics and Core Web Vitals.