next-patterns
Installation
SKILL.md
Next.js Patterns
Comprehensive Next.js reference. Auto-loaded when working with Next.js code.
Best Practices
See references/best-practices.md for:
- File conventions and route segments
- RSC boundaries and async patterns
- Runtime selection and directives
- Error handling, data patterns, route handlers
- Metadata, image/font optimization, bundling
- Hydration errors, Suspense boundaries
- Parallel and intercepting routes
- Self-hosting and debug tricks
Detailed sub-references in references/:
file-conventions.md,rsc-boundaries.md,async-patterns.mdruntime-selection.md,directives.md,functions.mderror-handling.md,data-patterns.md,route-handlers.mdmetadata.md,image.md,font.md,bundling.md,scripts.mdhydration-error.md,suspense-boundaries.mdparallel-routes.md,self-hosting.md,debug-tricks.md
Cache Components (Next.js 16+)
See references/cache-components.md for:
- PPR (Partial Prerendering) setup
use cachedirective (file/component/function level)- Cache profiles:
cacheLife()with built-in and custom lifetimes - Cache invalidation:
cacheTag(),updateTag(),revalidateTag() - Runtime data constraints and
use cache: private - Cache key generation
- Migration from previous versions
Upgrading
See references/upgrade.md for:
- Version detection and upgrade path planning
- Running codemods (
npx @next/codemod@latest) - Dependency updates and breaking changes
- TypeScript type updates