一键导入
next-best-practices
Next.js v16 best practices - proxy.ts, file conventions, RSC boundaries, Cache Components, async APIs, route handlers, image/font optimization
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Next.js v16 best practices - proxy.ts, file conventions, RSC boundaries, Cache Components, async APIs, route handlers, image/font optimization
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | next-best-practices |
| description | Next.js v16 best practices - proxy.ts, file conventions, RSC boundaries, Cache Components, async APIs, route handlers, image/font optimization |
| user-invocable | false |
Apply these rules when writing or reviewing Next.js 16+ code.
Target: Next.js 16+, App Router, Node.js 20.9+, TypeScript 5+.
middleware.ts. Runs on Node.js runtime. Use export function proxy(request: NextRequest) and export const config = { matcher }. Same redirect/rewrite/headers/cookies APIs. Migration: npx @next/codemod@canary middleware-to-proxy .next build --webpack, next dev --webpackcacheComponents: true and "use cache" directive; PPR-readyparams, searchParams, cookies(), headers() are async; use awaitrevalidateTag(tag, profile) requires second arg; updateTag() in Server Actions for read-your-writes; refresh() for uncached dataSee file-conventions.md for:
Detect invalid React Server Component patterns.
See rsc-boundaries.md for:
Next.js 15+ async API changes.
See async-patterns.md for:
params and searchParamscookies() and headers()See runtime-selection.md for:
See directives.md for:
'use client', 'use server' (React)'use cache' (Next.js)See functions.md for:
useRouter, usePathname, useSearchParams, useParamscookies, headers, draftMode, aftergenerateStaticParams, generateMetadataSee error-handling.md for:
error.tsx, global-error.tsx, not-found.tsxredirect, permanentRedirect, notFoundforbidden, unauthorized (auth errors)unstable_rethrow for catch blocksSee data-patterns.md for:
Promise.all, Suspense, preload)See route-handlers.md for:
route.ts basicspage.tsxSee metadata.md for:
generateMetadata functionnext/ogSee image.md for:
next/image over <img>sizes attributeSee font.md for:
next/font setupSee bundling.md for:
See scripts.md for:
next/script vs native script tagsid@next/third-partiesSee hydration-error.md for:
See suspense-boundaries.md for:
useSearchParams and usePathnameSee parallel-routes.md for:
@slot and (.) interceptorsdefault.tsx for fallbacksrouter.back()See self-hosting.md for:
output: 'standalone' for DockerSee debug-tricks.md for:
--debug-build-pathsHelps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.
Deploying Expo apps to iOS App Store, Android Play Store, web hosting, and API routes
Build and distribute Expo development clients locally or via TestFlight
Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling
Guidelines for upgrading Expo SDK versions and fixing dependency issues
Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.