en un clic
next-best-practices
// Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
// Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Integrates Sanity Live with Next.js Cache Components in next-sanity v13+ apps. Sets up sanityFetch, <SanityLive>, Visual Editing, Presentation Tool, draft mode handling, and the three-layer (Page/Dynamic/Cached) component pattern with explicit perspective/stega prop-drilling. Use when configuring or migrating a Next.js app to cacheComponents with Sanity, when adding sanityFetch, when wiring <SanityLive>/<VisualEditing>, or when refactoring components that hardcode perspective/stega.
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup.
Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces, or managing dependencies with catalogs, patches, or overrides.
| name | next-best-practices |
| description | Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling |
| user-invocable | false |
Apply these rules when writing or reviewing Next.js code.
See 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-paths