Nextjs optimization

From HoangNguyen0403/agent-skills-standard · View interactive version

Nextjs optimization is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Optimize images, fonts, scripts, and metadata for Next.js performance and Core Web Vitals. Use when configuring next/image for LCP, next/font for zero layout shift, next/script loading strategies, or generateMetadata for SEO.

How to use this skill

Skill file

Optimization

**Priority: P1 (HIGH)**

Core optimization primitives provided by Next.js. Monitor First, Optimize Later.

Monitoring (Core Web Vitals)

Images

Always use next/image to prevent CLS and enable automatic optimization:

See implementation examples

Fonts

Use next/font for zero layout shift — self-hosts fonts and adds font-display: swap:

See implementation examples

Metadata (SEO)

See implementation examples

Scripts

Use next/script with appropriate loading strategies:

Bundle & Components

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.