Communitygithub.com

Next.js 업그레이드 프로토콜

공식 가이드와 codemod를 사용한 Next.js 버전 마이그레이션. package.json, next upgrade, migration guide, codemod 트리거를 통해 Next.js 프로젝트를 새로운 주요 버전으로 마이그레이션할 때 사용합니다.

Next.js 업그레이드 프로토콜란 무엇인가요?

이 스킬은 Next.js 프로젝트를 v14에서 v15 등 주요 버전으로 업그레이드하는 자동화된 절차를 제공합니다. package.json에서 next, react, react-dom 버전을 확인하고, 주요 버전 점프 시 증분 업그레이드(예: v13→v14→v15)를 수행합니다. 공식 Next.js 마이그레이션 가이드를 따르며, `npx @next/codemod@latest` 명령어를 통해 자동화된 코드 마이그레이션(codemod)을 실행합니다. 특히 v15에서는 `params`, `searchParams`, `cookies()`, `headers()`가 await되어야 하는 점, fetch 기본 캐싱 동작 변경(`no-store`), React 19로의 업그레이드 등 주요 변경 사항을 처리합니다. 각 증분 단계 후 `next dev`와 `next build`로 검증하며, codemod 실패 시 팀에 보고합니다. Pages Router에서 async page 함수 사용 금지 등 안티 패턴도 명시하여 안정적인 업그레이드를 보장합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/HoangNguyen0403/agent-skills-standard/nextjs-upgrade

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Next.js 업그레이드 프로토콜은(는) 무엇을 하나요?

Next.js 버전 업그레이드(예: v14 → v15)를 위한 자동화 및 수동 마이그레이션 단계입니다.

우선순위: P1 (운영)

구현 지침

  • 업그레이드 감지: 항상 **package.json**에서 next, react, react-dom 버전을 확인합니다.
  • 계획: 주요 버전 점프(v13에서 v15)의 경우 증분 업그레이드(v13 -> v14, 그 다음 v14 -> v15)를 수행합니다. 공식 Next.js 마이그레이션 가이드를 따릅니다.
  • 자동화된 Codemod: **npx @next/codemod@latest <transform> <path>**를 사용하여 구문 마이그레이션을 자동화합니다.
  • 주요 변경 사항(v15): next-async-request-api 변환에 응답하여 params, searchParams, cookies(), **headers()**가 await되도록 합니다.
  • React 버전 일치: **react**와 **react-dom**을 Next.js의 피어 의존성에 맞게 업그레이드합니다(예: Next.js 15의 경우 React 19).
  • 검증: 각 증분 단계 후 **next dev**와 **next build**를 실행합니다. 콘솔 오류에서 하이드레이션 경고를 확인합니다.
  • 보고: 모든 codemod 실패 또는 필요한 수동 수정 사항을 팀에 보고합니다.

3. 의존성 업데이트

Next.js 및 피어 의존성을 동기화하여 업그레이드합니다:

# npm 사용
npm install next@latest react@latest react-dom@latest

# Types 업데이트
npm install --save-dev @types/react@latest @types/react-dom@latest

4. 수동 검증 규칙

  1. 비동기 컨텍스트: cookies(), headers() 및 라우트 params의 모든 사용이 이제 await되었는지 확인합니다.
  2. 메타데이터: generateMetadata 타입이 새로운 비동기 params 시그니처와 일치하는지 확인합니다.
  3. 캐싱: v15 이상에서 fetch는 기본적으로 { cache: 'no-store' }입니다. 이전 동작이 필요하면 명시적으로 { cache: 'force-cache' }를 설정합니다.

5. 빌드 테스트

  • codemod 및 패키지 업데이트 직후 npm run build를 실행합니다.
  • --turbo 사용 시 "Hydration failed" 또는 "Turbopack" 호환성 오류가 있는지 확인합니다.

안티 패턴

  • 주요 버전 건너뛰기 금지: 한 번에 하나의 주요 버전씩 업그레이드합니다(13→14, 그 다음 14→15).
  • 수동 주요 변경 사항 수정 금지: 항상 먼저 npx @next/codemod@latest 변환을 실행합니다.
  • 업그레이드 후 캐싱 동작 가정 금지: v15는 기본적으로 no-store입니다. 모든 fetch 호출을 감사합니다.
  • Pages Router에서 비동기 페이지 함수 금지: export default async function Page()는 치명적입니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬