agentsclimarketplace

Performance

Skill lennney/gate-all-skills/skills/website/performance

Frontend/Next.js Claude Code Skills — curated + custom

Install
npx -y skills add lennney/gate-all-skills --skill performance

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Next.js performance optimization — Core Web Vitals, ISR/SSG strategy, bundle analysis, image optimization, and runtime performance patterns. Use when diagnosing slow pages, optimizing Core Web Vitals, or reviewing production performance.

SKILL.md

3.8 KB, 869 tokens by cl100k_base, as published. Nobody here has run it

Next.js Performance

Systematic approach to optimizing Next.js applications.

Performance Dimensions

1. Rendering Strategy

Pick the right strategy per route:

StrategyUse CaseTrade-off
Static (SSG)Public content, blog, docsFastest, no server load, stale on update
ISRContent that changes periodicallyRevalidate on demand or by time
Dynamic (SSR)User-specific, auth-gatedAlways fresh, server cost per request
StreamingRoutes with slow data dependenciesFaster TTFB, progressive rendering

Rule of thumb: Static by default, dynamic by necessity.

2. Bundle Optimization

# Analyze bundle
ANALYZE=true npm run build

# Check individual package size
npx cost-of-modules

Key areas:

  • Dynamic imports for heavy components (next/dynamic)
  • Tree-shake unused imports
  • Avoid barrel exports (index.ts re-exports hurt tree-shaking)
  • Use react-compiler where possible
import dynamic from 'next/dynamic'
const HeavyChart = dynamic(() => import('./heavy-chart'), {
  loading: () => <ChartSkeleton />
})

3. Image Optimization

Use next/image everywhere:

import Image from 'next/image'

// ✅ Good: automatic optimization, lazy loading, correct sizing
<Image
  src="/hero.jpg"
  alt="Hero"
  width={1200}
  height={600}
  priority          // Use for above-the-fold images
  sizes="100vw"     // Responsive: fills viewport width
/>

Rules:

  • Always provide width and height (prevents layout shift)
  • Use priority for LCP images (hero, main banner)
  • Use sizes for responsive images
  • Host images on a CDN (or use remote patterns)

4. Font Optimization

// app/layout.tsx
import { Inter } from 'next/font/google'

const inter = Inter({
  subsets: ['latin'],
  display: 'swap',  // Prevent FOIT
})
  • Always use next/font (self-hosts, eliminates external requests)
  • Use display: 'swap' for better perceived performance

5. Core Web Vitals Checklist

MetricTargetCommon Fixes
LCP≤ 2.5sOptimize hero image (priority), reduce TTFB, preload key resources
FID / INP≤ 200msBreak up long tasks, lazy load below-fold, avoid heavy JS on main thread
CLS≤ 0.1Set dimensions on images/videos, avoid layout shifts from dynamic content

6. Route Segment Optimization

// Good: colocate data fetching with the segment that needs it
app/
  blog/
    page.tsx              // fetch blog list
    [slug]/
      page.tsx            // fetch single post
      loading.tsx         // segment-level loading state
  • Each segment can have its own loading.tsx (streaming boundary)
  • Long page + slow section → extract into page.tsx with <Suspense>

Measurement

# Local Lighthouse
npx @next/codemod@latest optimize

# Production monitoring
# Vercel Analytics / Speed Insights — enable in dashboard

Checklist

  • Correct rendering strategy per route (static > ISR > dynamic > streaming)
  • Hero image has priority and explicit dimensions
  • No layout shift from dynamic content (set height/width placeholders)
  • Heavy components lazy-loaded with next/dynamic
  • Font uses next/font with display: 'swap'
  • No barrel exports in component directories
  • Loading states with loading.tsx or Suspense boundaries
  • Vercel Speed Insights enabled for production monitoring

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,970. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.