Next.js Performance Optimization with Core Web Vitals
Diagnosis and action plan to improve LCP, FID, and CLS in Next.js applications.
Identify performance bottlenecks and implement optimizations that improve Core Web Vitals to achieve green status on PageSpeed Insights.
At a glance
Access
Free prompt
Open to copy without upgrading.
Prompt objective
Identify performance bottlenecks and implement optimizations that improve Core Web Vitals to achieve green status on PageSpeed Insights.
Real use case
Rio Grande do Sul marketplace FeiraBrasil has LCP of 6.2s, CLS of 0.35, and FID of 380ms on mobile. Google Search Console shows that 73% of pages have 'poor' Core Web Vitals, hurting organic ranking and causing an estimated loss of R$ 85,000/month in sales.
Customize these fields first
Replace the placeholders with your own context before you run the prompt. That usually improves the first output more than adding more instructions later.
Prompt
Create a performance optimization plan for [PROJECT NAME], a Next.js [VERSION: 14/15] application with App Router hosted on [VERCEL/AWS/DOCKER].\\\\\\\\n\\\\\\\\n**Current Metrics:**\\\\\\\\n- LCP (Largest Contentful Paint): [VALUE]s (target: < 2.5s)\\\\\\\\n- FID (First Input Delay): [VALUE]ms (target: < 100ms)\\\\\\\\n- CLS (Cumulative Layout Shift): [VALUE] (target: < 0.1)\\\\\\\\n- TTFB: [VALUE]ms\\\\\\\\n- JS bundle size: [VALUE]KB\\\\\\\\n\\\\\\\\n**Diagnosis by Area:**\\\\\\\\n\\\\\\\\n1) **Rendering and Data Fetching:**\\\\\\\\n- SSR vs SSG vs ISR analysis by page type\\\\\\\\n- Server Components vs Client Components (where the boundary sits)\\\\\\\\n- Streaming and Suspense boundaries\\\\\\\\n- Parallel data fetching vs waterfalls\\\\\\\\n\\\\\\\\n2) **Bundle and JavaScript:**\\\\\\\\n- Bundle analysis with @next/bundle-analyzer\\\\\\\\n- Strategic code splitting and dynamic imports\\\\\\\\n- Tree shaking heavy libraries (lodash, moment, etc.)\\\\\\\\n- Lazy loading components below the fold\\\\\\\\n\\\\\\\\n3) **Images and Media:**\\\\\\\\n- Next/Image: sizes, priority, placeholder blur\\\\\\\\n- Modern formats (WebP, AVIF)\\\\\\\\n- Responsive images with srcSet\\\\\\\\n- Lazy loading with Intersection Observer\\\\\\\\n\\\\\\\\n4) **CSS and Layout Shift:**\\\\\\\\n- Font loading strategy (font-display, preload)\\\\\\\\n- Skeleton screens to prevent CLS\\\\\\\\n- Explicit dimensions on images and embeds\\\\\\\\n- Critical CSS inline\\\\\\\\n\\\\\\\\n5) **Caching and CDN:**\\\\\\\\n- Cache-Control headers by asset type\\\\\\\\n- ISR with on-demand revalidation\\\\\\\\n- Edge middleware for personalization\\\\\\\\n- Service Worker for static assets\\\\\\\\n\\\\\\\\nFor each optimization, estimate the expected impact on the metric and implementation complexity (high/medium/low). Prioritize in a 2-week sprint format.
Open directly in an AI — the text is pre-filled:
How to use this prompt
- 1Replace the key placeholders first: PROJECT NAME, VERSION: 14/15, VERCEL/AWS/DOCKER, VALUE.
- 2Replace any bracketed placeholders like [this] with your own context.
- 3Add extra background information when you want more tailored results.
- 4Combine multiple prompts in one conversation when you need a richer output.
- 5Save your best-performing prompts so they are easy to reuse later.
Next best step
Open the guide first, then branch only if you still need more.
A guide for technical builders choosing between prompts, coding workflows, and agent-based implementation.
If this prompt is close but not quite right, generate variants next. If the job is recurring, move into the course library after the guide.
Related prompts
View allScalable React Component Architecture with Design System
Defines component structure, design tokens, and conventions for a scalable React/Next.js design system.
Best for
Build a reusable, consistent component architecture that accelerates frontend development and ensures visual uniformity across the entire application.
WCAG 2.1 AA Accessibility Implementation in React Applications
Complete guide to making a React application accessible following WCAG 2.1 Level AA guidelines.
Best for
Ensure the application meets WCAG 2.1 AA accessibility requirements, complying with Brazil's Accessibility Law and expanding the audience reached.
Complex state management with Zustand and React Query
State architecture that separates server state and client state using Zustand + TanStack Query.
Best for
Define a clear state management strategy that eliminates unnecessary re-renders, simplifies code, and improves developer experience.
Design system creation with Storybook, Tailwind, and visual tests
Complete Storybook setup with interactive documentation, visual tests, and CI/CD integration.
Best for
Establish a component development and documentation environment with Storybook that serves as the single source of truth for the team's design system.
Explore other prompt categories
Move sideways into adjacent libraries when the current category is not the full answer.
Free browsing stays open. Premium prompts unlock the reusable workflow layer.
Use the guides and role paths to validate the job first. Upgrade when you want the full prompt text, editable premium prompts, and the surrounding course paths in one place.
Free access
- Browse guides, role paths, and category pages.
- Preview prompts before you decide to upgrade.
- Find the right starting point without friction.
Membership access
- Unlock premium prompts and the full copy text.
- See more workflow paths and course connections.
- Keep the reusable templates in one place.