pedronauck avatar

Next Best Practices

This is a comprehensive reference for writing Next.js code that covers everything from RSC boundaries and async API patterns to image optimization and hydration debugging. It's especially useful for catching Next.js 15+ breaking changes like async params and the middleware rename in v16. The skill includes specific gotchas like GET route handlers conflicting with page.tsx, useSearchParams causing CSR bailouts without Suspense, and when to reach for Edge runtime over Node.js. It's organized into focused sections you can scan quickly when you hit an error or need to verify you're following current conventions. Not user-invocable, so Claude will reference it automatically when you're working on Next.js projects.

skills.sh installs
394
GitHub stars
652
last updated
Aug 21, 2026

Install

$ npx -y skills add pedronauck/skills --skill next-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Files

Next.js Best Practices

Apply these rules when writing or reviewing Next.js code.

File Conventions

See file-conventions.md for:

  • Project structure and special files
  • Route segments (dynamic, catch-all, groups)
  • Parallel and intercepting routes
  • Middleware rename in v16 (middleware → proxy)

RSC Boundaries

Detect invalid React Server Component patterns.

See rsc-boundaries.md for:

  • Async client component detection (invalid)
  • Non-serializable props detection
  • Server Action exceptions

Async Patterns

Next.js 15+ async API changes.

See async-patterns.md for:

  • Async params and searchParams
  • Async cookies() and headers()
  • Migration codemod

Runtime Selection

See runtime-selection.md for:

  • Default to Node.js runtime
  • When Edge runtime is appropriate

Directives

See directives.md for:

  • 'use client', 'use server' (React)
  • 'use cache' (Next.js)

Functions

Sponsors

Details

Repository
github.com/pedronauck/skills
Categories
Frontend Development, Debugging
First seen
Jun 3, 2026

More from pedronauck/skills

All 70
1auth0 avataracul-screen-generatorauth0/agent-skillsUse when building or customizing Auth0 Universal Login screens with full UI control — creating branded login, signup, or MFA screens using the ACUL React or Van393skills.sh installs
2secondsky avatarjest-generatorsecondsky/claude-skillsGenerate Jest unit tests for JavaScript/TypeScript with mocking, coverage. Use for JS/TS modules, React components, test generation, or encountering missing cov391skills.sh installs
3community-access avatarmobile-accessibilitycommunity-access/accessibility-agentsMobile accessibility specialist for React Native, Expo, iOS (SwiftUI/UIKit), and Android (Jetpack Compose/Views). Audits accessibilityLabel, accessibilityRole, 384skills.sh installs
4hairyf avataruniapphairyf/skillsuni-app 跨平台应用开发框架。适用于使用 Vue 语法开发 App、H5、各端小程序时的能力与用法。381skills.sh installs
5maxnorm avatarmagento-xml-specialistmaxnorm/magento2-agent-skillsCreates XML configurations for Magento 2 including layout XML, dependency injection, system configuration, and module definition. Use when working with XML conf380skills.sh installs
6galaxy-dawn avatarwebapp-testinggalaxy-dawn/claude-scholarToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing br375skills.sh installs