Token导航 LogoToken导航

Agent Skill · 研究检索

next-upgrade(Next.js 升级)

next-upgrade 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

next-upgrade 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 50,488。

总安装 612周安装 26GitHub Stars 25下载 214核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:next-upgrade(Next.js 升级)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/next-upgrade
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill next-upgrade
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill next-upgrade

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

next-upgrade 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于需要根据关键词或任务场景从仓库中提取线索的场景。通过 npx skills add 命令从 GitHub 安装,结合原始 README 核验具体用法。

安装前需确认权限范围和维护状态,注意是否触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/next-upgrade

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/oimiragieo/agent-studio --skill next-upgrade;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

next-upgrade 怎么安装?

在终端执行 npx skills add https://github.com/oimiragieo/agent-studio --skill next-upgrade。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

next-upgrade 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

next-upgrade 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

next-upgrade 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

next-upgrade 用的人多吗?

公开数据是累计安装 612 次,近一周安装 26 次,下载 214 次,GitHub 25 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

next-upgrade 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
next-upgrade

Next.js 升级 · 本页

61225需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Next.js Upgrade Workflow

Structured 9-step workflow for upgrading Next.js applications across major versions. Handles codemod automation, dependency updates, breaking change resolution, and validation.

When to Apply

Use this skill when:

  • Upgrading Next.js to a new major version (13, 14, 15, 16)
  • Running codemods to automate breaking change migrations
  • Resolving deprecation warnings in an existing Next.js project
  • Planning an incremental migration path for large codebases
  • Validating that an upgrade did not introduce regressions

9-Step Upgrade Workflow

Step 1: Detect Current Version

Identify the current Next.js version and target version.

# Check current version
cat package.json | grep '"next"'

# Check Node.js version (Next.js 15+ requires Node 18.18+, Next.js 16 requires Node 20+)
node --version

Version Requirements:

Next.jsMinimum Node.jsMinimum React
1316.1418.2.0
1418.1718.2.0
1518.1819.0.0
1620.019.0.0

Step 2: Create Upgrade Branch

git checkout -b upgrade/nextjs-{target-version}

Always upgrade on a dedicated branch. Never upgrade on main directly.

Step 3: Run Codemods

Use the official Next.js codemod CLI to automate breaking change migrations.

# Interactive mode (recommended) -- selects applicable codemods
npx @next/codemod@latest upgrade latest

# Or target a specific version
npx @next/codemod@latest upgrade 15
npx @next/codemod@latest upgrade 16

Key Codemods by Version:

Next.js 13 to 14
  • next-image-to-legacy-image -- Renames next/image imports to next/legacy/image
  • next-image-experimental -- Migrates from next/legacy/image to new next/image
  • metadata -- Moves Head metadata to Metadata API exports
Next.js 14 to 15
  • next-async-request-apis -- Converts synchronous dynamic APIs (cookies(), headers(), params, searchParams) to async
  • next-dynamic-ssr-false -- Replaces ssr: false with {loading} pattern for next/dynamic
  • next-og-import -- Moves OG image generation imports to next/og
Next.js 15 to 16
  • next-use-cache -- Converts unstable_cache to 'use cache' directive
  • next-cache-life -- Migrates cache revalidation to cacheLife() API
  • next-form -- Wraps <form> elements with next/form where applicable

Step 4: Update Dependencies

# Update Next.js and React together
npm install next@latest react@latest react-dom@latest

# For Next.js 15+, also update React types
npm install -D @types/react@latest @types/react-dom@latest

# Update eslint config
npm install -D eslint-config-next@latest

Peer Dependency Conflicts:

If you encounter peer dependency conflicts:

  1. Check which packages require older React/Next versions
  2. Update those packages first, or check for newer versions
  3. Use --legacy-peer-deps only as a last resort (document why)

Step 5: Update Configuration

Review and update next.config.js / next.config.ts:

// next.config.ts (Next.js 15+ recommends TypeScript config)
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
  // Next.js 15+: experimental features that graduated
  // Remove these from experimental:
  // - serverActions (now stable in 14+)
  // - appDir (now stable in 14+)
  // - ppr (now stable in 16+)

  // Next.js 16+: new cache configuration
  cacheComponents: true,  // Enable component-level caching
};

export default nextConfig;

Configuration Changes by Version:

VersionChange
14appDir removed from experimental (now default)
14serverActions removed from experimental (now stable)
15bundlePagesRouterDependencies now default true
15swcMinify removed (now always enabled)
16dynamicIO replaces several caching behaviors
16cacheComponents: true enables component caching

Step 6: Resolve Breaking Changes

After running codemods, manually resolve remaining breaking changes.

Common Breaking Changes (15 to 16):

  1. Async Request APIs: cookies(), headers(), params, searchParams are now async // Before (Next.js 14) export default function Page({params}: {params: {id: string}}) {const {id} = params;} // After (Next.js 15+) export default async function Page({params}: {params: Promise<{id: string}>}) {const {id} = await params;}
  2. Caching Default Changed: fetch() requests are no longer cached by default in Next.js 15+ // Before: cached by default fetch('https://api.example.com/data'); // After: explicitly opt-in to caching fetch('https://api.example.com/data', {cache: 'force-cache'}); // Or use 'use cache' directive in Next.js 16
  3. Route Handlers: GET route handlers are no longer cached by default // Next.js 15+: explicitly set caching export const dynamic = 'force-static';

Step 7: Run Tests

# Run existing test suite
npm test

# Run build to catch compile-time errors
npm run build

# Run dev server and check key pages manually
npm run dev

Validation Checklist:

  • Build completes without errors
  • All existing tests pass
  • Key user flows work in dev mode
  • No console warnings about deprecated APIs
  • Server-side rendering works correctly
  • Client-side navigation works correctly
  • API routes return expected responses
  • Middleware functions correctly
  • Static generation (SSG) pages build correctly

Step 8: Update TypeScript Types

# Regenerate TypeScript declarations
npm run build

# Fix any new type errors
npx tsc --noEmit

Common Type Fixes:

  • PageProps type changes (params/searchParams become Promise in 15+)
  • Metadata type updates (new fields added)
  • NextRequest/NextResponse API changes
  • Route handler parameter types

Step 9: Document and Commit

# Create detailed commit
git add -A
git commit -m "chore: upgrade Next.js from {old} to {new}

Breaking changes resolved:
- [list specific changes]

Codemods applied:
- [list codemods run]

Manual fixes:
- [list manual changes]"

Incremental Upgrade Path

For large version jumps (e.g., 13 to 16), upgrade incrementally:

Next.js 13 -> 14 -> 15 -> 16

Why incremental?

  • Codemods are version-specific and may not compose correctly across multiple versions
  • Easier to debug issues when changes are smaller
  • Each version has its own set of breaking changes to resolve
  • Tests can validate each intermediate step

For each version step:

  1. Run codemods for that version
  2. Update deps
  3. Fix breaking changes
  4. Run tests
  5. Commit checkpoint
  6. Proceed to next version

Troubleshooting

Build fails after upgrade

  1. Clear .next directory: rm -rf.next
  2. Clear node_modules: rm -rf node_modules && npm install
  3. Clear Next.js cache: rm -rf.next/cache

Module not found errors

  1. Check if package was renamed or merged
  2. Update imports per migration guide
  3. Check if package needs separate update

Hydration mismatches after upgrade

  1. Check for server/client rendering differences
  2. Ensure dynamic imports use correct options
  3. Verify date/locale handling is consistent

Middleware issues

  1. Middleware API changed in Next.js 13 (moved to root)
  2. NextResponse.rewrite() behavior changed in 15
  3. Check matcher configuration syntax

Iron Laws

  1. ALWAYS upgrade on a dedicated branch, never on main directly — upgrade branches can be rebased or reverted without disrupting production; direct main upgrades risk deploying half-migrated code.
  2. NEVER skip intermediate versions in a multi-version jump — Next.js codemods are version-specific and do not compose correctly across major versions; skipping steps leaves un-migrated breaking changes.
  3. ALWAYS run official codemods before making manual changes — codemods handle the bulk of mechanical migrations; manual-first approaches miss patterns and create divergence from the reference migration path.
  4. NEVER use --legacy-peer-deps without documenting the specific conflict and resolution plan — suppressing peer errors hides version conflicts that will cause runtime failures.
  5. ALWAYS validate with a full build plus test suite before merging — the dev server does not exercise SSG, edge runtime, or build optimizations that can fail silently post-upgrade.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Upgrading on the main branch directlyHalf-migrated code can reach production; rollback requires a revert commitAlways create upgrade/nextjs-{version} branch; merge only after full validation
Skipping intermediate versionsVersion-specific codemods are not composable; skipped breaking changes cause runtime failuresUpgrade one major version at a time: 13→14→15→16; commit a checkpoint at each step
Manual migration before running codemodsCreates divergence from codemod output; codemods cannot merge cleanly with manual editsRun codemods first; apply manual fixes only for patterns codemods could not handle
Using --legacy-peer-deps without documentationHidden version conflicts cause runtime failures not visible at install timeResolve conflicts explicitly; use the flag only with a documented justification
Validating only in dev modeDev server skips SSG, edge runtime, and build optimizations that can fail post-upgradeRun npm run build plus the full test suite; check SSR, SSG, and API routes explicitly

References

平台分布

Codex

33.28%
按下载量换算71

Claude

32.98%
按下载量换算71

Cursor

17.92%
按下载量换算38

Gemini CLI

9.74%
按下载量换算21

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills