Communitygithub.com

Next.js アップグレードプロトコル

公式ガイドと codemod を使用した Next.js バージョン移行ツール。Next.js プロジェクトを新しいメジャーバージョンに移行する際に使用します。

Next.js アップグレードプロトコル とは?

このスキルは、Next.js のメジャーバージョンアップグレード(例:v14 → v15)を自動化・半自動化するためのプロトコルを提供します。`package.json` から next、react、react-dom のバージョンを検出し、公式の移行ガイドに従った段階的アップグレードを推奨します。`npx @next/codemod@latest` コマンドを活用して構文移行を自動化し、特に v15 で導入された非同期 API(params、searchParams、cookies()、headers())への対応を徹底します。アップグレード後は `next dev` と `next build` による検証を行い、エラーや警告を報告します。メジャーバージョンのスキップや手動による破壊的変更の修正を禁止し、キャッシュ動作の変更(v15 では `fetch` デフォルトが `no-store`)にも注意を促します。

対応~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 のバージョン整合性: Next.js のピア依存関係に合わせて react と react-dom をアップグレードします(例:Next.js 15 では React 19)。
  • 検証: 各段階的アップグレードの後に next dev と next build を実行します。コンソールエラー でハイドレーション警告がないか確認します。
  • 報告: すべての codemod の失敗 や手動修正が必要な箇所をチームに報告します。

3. 依存関係の更新

Next.js とピア依存関係を同期してアップグレードします:

# npm を使用
npm install next@latest react@latest react-dom@latest

# 型定義の更新
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」の互換性エラーがないか確認します。

アンチパターン

  • メジャーバージョンのスキップ禁止: 一度に 1 メジャーバージョンずつアップグレードします(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

関連スキル