IntermediateFrontendFree prompt

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

PROJECT NAMEVERSION: 14/15VERCEL/AWS/DOCKERVALUE

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

  1. 1Replace the key placeholders first: PROJECT NAME, VERSION: 14/15, VERCEL/AWS/DOCKER, VALUE.
  2. 2Replace any bracketed placeholders like [this] with your own context.
  3. 3Add extra background information when you want more tailored results.
  4. 4Combine multiple prompts in one conversation when you need a richer output.
  5. 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 all

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.
Chat on WhatsApp