performance

Diagnose and optimize bundle size, Core Web Vitals, database queries, and caching layers.

1|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/NalinDalal/skillset --skill performance-nalindalal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/NalinDalal/skillset/tree/main/skills/devops/performance
Command: npx skills add https://github.com/NalinDalal/skillset --skill performance-nalindalal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow pages, bloated JavaScript bundles, N+1 database queries, and memory leaks degrade user experience and infrastructure costs, and this Skill provides concrete budgets, code patterns, and profiling workflows to find and fix them. ## Core Features & Use Cases - Frontend Optimization: Bundle analysis with vite-bundle-analyzer, route-level code splitting, tree shaking, lazy loading, virtual scrolling with react-virtuoso, and memoization patterns. - Caching & Database Performance: HTTP/edge caching with Cloudflare Workers, Redis query caching, TanStack Query configuration, SQL indexing strategies, N+1 elimination, and connection pooling with PgBouncer. - Core Web Vitals & Monitoring: LCP, INP, and CLS fixes, memory leak detection in React effects, Prometheus metrics, and alerting rules for latency and memory thresholds. - Use Case: A dashboard page loads in 6 seconds. Use this Skill to run bundle analysis, add route-level code splitting, index the slow task query, cache the project list in Redis, and verify LCP drops under 2.5s with Lighthouse. ## Quick Start Ask the agent to audit this page's performance and reduce the initial bundle size below 150KB gzipped.

Frequently Asked Questions about performance

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

FAQPage Schema
How do I reduce JavaScript bundle size in a Vite React app?▼

Run vite-bundle-analyzer on the build output to find large dependencies, then apply route-level code splitting with React.lazy, use named imports from lodash-es instead of namespace imports, and set sideEffects to false in package.json for better tree shaking.

How to fix N+1 queries with Prisma?▼

Replace per-record findMany calls inside loops with a single query using include to fetch related tasks and counts. For GraphQL resolvers, batch lookups with DataLoader so multiple parent IDs resolve in one database round trip.

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

Target LCP under 2.5 seconds, INP under 100 milliseconds, and CLS under 0.1, measured with Lighthouse and the web-vitals library. Preload hero images with fetchpriority high, defer non-critical work with useTransition, and reserve image dimensions to prevent layout shifts.

Why does my React app leak memory over time?▼

Leaks typically come from event listeners, intervals, or subscriptions created in useEffect without cleanup functions. Return a cleanup that removes listeners, clears timers, and unsubscribes, and verify with Chrome DevTools heap snapshot comparisons.

When should I use Redis caching versus TanStack Query caching?▼

TanStack Query caches API responses in the browser with staleTime and gcTime for client-side state. Redis caches expensive database queries server-side with a TTL, which is appropriate for shared data like active project lists queried by many users.