next-best-practices
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
Skill by yamcodes
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/yamcodes-next-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill 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
- License
- MIT
- Metadata
- origin: https://github.com/vercel-labs/next-skills · internal: true · original_author: Vercel Labs
- Instructions
- 167 lines in SKILL.md · view on GitHub
Files (20)
- SKILL.md
- async-patterns.md
- bundling.md
- data-patterns.md
- debug-tricks.md
- directives.md
- error-handling.md
- file-conventions.md
- font.md
- functions.md
- hydration-error.md
- image.md
- metadata.md
- parallel-routes.md
- route-handlers.md
- rsc-boundaries.md
- runtime-selection.md
- scripts.md
- self-hosting.md
- suspense-boundaries.md
SKILL.md (first lines)
# Next.js Best Practices Apply these rules when writing or reviewing Next.js code. ## File Conventions See [file-conventions.md](./file-conventions.md) for: - Project structure and special files - Route segments (dynamic, catch-all, groups) - Parallel and intercepting routes - Middleware rename in v16 (middleware → proxy) ## RSC Boundaries Detect invalid React Server Component patterns. See [rsc-boundaries.md](./rsc-boundaries.md) for: - Async client component detection (invalid) - Non-serializable props detection - Server Action exceptions ## Async Patterns Next.js 15+ async API changes. See [async-patterns.md](./async-patterns.md) for: - Async `params` and `searchParams` - Async `cookies()` and `headers()` - Migration codemod ## Runtime Selection See [runtime-selection.md](./runtime-selection.md) for: - Default to Node.js runtime - When Edge runtime is appropriate ## Directives See [directives.md](./directives.md) for: - `'use client'`, `'use server'` (React) - `'use cache'` (Next.js) ## Functions See [functions.md](./functions.md) for: - Navigation hooks: `useRouter`, `usePathname`, `useSearchParams`, `useParams` - Server functions: `cookies`, `headers`, `draftMode`, `after` - Generate functions: `generateStaticParams`, `generateMetadata` ## Error Handling See [error-handling.md](./error-handling.md) for: - `error.tsx`, `global-error.tsx`, `not-found.tsx` - `redirect`, `permanentRedirect`, `notFound` - `forbidden`, `unauthorized` (auth errors) - `unstable_rethrow` for catch blocks ## Data Patterns See [data-patterns.md](./data-patterns.md) for: - Server Components vs Server Actions vs Route Handlers - Avoiding data waterfalls (`Promise.all`, Suspense, preload) - Client component data fetching ## Route Handlers See [route-handlers.md](./route-handlers.md) for: - `route.ts` basics - GET handler conflicts with `page.tsx` - Environment behavior (no React DOM) - When to use vs Server Actions ## Metadata & OG Images See [metadata.md](./metadata.md) for: - Static and dynamic metadata - `generateMetadata` function - OG image generation with `next/og` - File-based metadata conventions ## Image Optimization See [image.md](./image.md) for: - Always use `next/image` over `<img>` - Remote images configuration - Responsive `sizes` attribute - Blur placeholders - Priority loading for LCP ## Font Optimization See [font.md](./font.md) for: - `next/font` setup - Google Fonts, local fonts - Tailwind CSS integration - Preloading subsets ## Bundling See [bundling.md](./bundling.md) for: - Server-incompatible packages - CSS imports (not link tags) - Polyfills (already included) - ESM/CommonJS issues - Bundle analysis
From yamcodes/arkenv, MIT.
More from yamcodes/arkenv
- 0.789score
docs-writer
Yam Borodetsky
Always use this skill when the task involves writing, reviewing, or editing files in the `/docs` directory or any `.md` files in the repository.
SkillAFreshness: A★ 147Claude Code +9 - 0.789score
pnpm
Anthony Fu
Node.js package manager with strict dependency resolution.
SkillAFreshness: A★ 147Claude Code +9 - 0.789score
nuxt
Yam C Borodetsky
Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing.
SkillAFreshness: A★ 147Claude Code +9 - 0.789score
bulletproof-react
Yam Borodetsky
Bulletproof React architecture patterns for scalable, maintainable applications.
SkillAFreshness: A★ 147Claude Code +9 - 0.789score
the-voice
Yam Borodetsky
Rewrite ArkEnv docs and site copy in the product voice: Turbo-shaped what/why/how, not skinny command lists and not marketing hype, then cut chatbot tells…
SkillAFreshness: A★ 147Claude Code +9 - 0.789score
create-skill
yamcodes
Create new skills, modify and improve existing skills, and measure skill performance.
SkillAFreshness: A★ 147Claude Code +9 - 0.786score
gh-cli
yamcodes
Use for GitHub-related tasks such as managing issues, pull requests, actions runs, and repository configuration using the GitHub CLI (gh).
SkillAFreshness: A★ 147Claude Code +9 - 0.784score
changeset
Yam C Borodetsky
Creates changesets for semantic versioning.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
code-review
yamcodes
Fetch, analyze, and address code reviews and comments on GitHub, or perform a code review on changes in the workspace.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
modularize
yamcodes
Automatically refactor, split, and compress codebase files when they exceed size or complexity boundaries.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
groom-issue
yamcodes
Groom a poorly written issue by grilling the user to clarify requirements, updating the issue on GitHub via the gh cli, and utilizing the triage skill to…
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
forward-port
yamcodes
Manually forward-ports merged dev (v0) changes to the v1 branch, adapting code to v1's package layout and changeset names.
SkillAFreshness: A★ 147Claude Code +9
Signals
- Stars
- 147
- Forks
- 6
- Open issues
- 6
- Last commit (this folder)
- May 30, 2026 (5 months ago)
- Last release
- Sep 25, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/yamcodes/arkenv
- Website
- arkenv.js.org
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.693score
next-best-practices
pedronauck
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillCFreshness: C★ 641Claude Code +9 - 0.332score
next-best-practices
jralvarenga
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillCFreshness: C★ 23Claude Code +9 - 0.296score
next-best-practices
dmvthrowers
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillCFreshness: C★ 1Claude Code +9 - 0.295score
next-best-practices
cagdotin
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillDFreshness: D★ 38Claude Code +9 - 0.293score
next-best-practices
WannaCry081
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillCFreshness: C★ 1Claude Code +9 - 0.244score
next-best-practices
ollieb89
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillDFreshness: DClaude Code +9 - 0.244score
next-best-practices
artivilla
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillDFreshness: DClaude Code +9 - 0.241score
next-best-practices
tusosos
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillDFreshness: DClaude Code +9 - 0.235score
next-best-practices
pvlppv
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillDFreshness: DClaude Code +9
More from yamcodes
- 0.789score
create-skill
yamcodes
Create new skills, modify and improve existing skills, and measure skill performance.
SkillAFreshness: A★ 147Claude Code +9 - 0.786score
gh-cli
yamcodes
Use for GitHub-related tasks such as managing issues, pull requests, actions runs, and repository configuration using the GitHub CLI (gh).
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
code-review
yamcodes
Fetch, analyze, and address code reviews and comments on GitHub, or perform a code review on changes in the workspace.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
forward-port
yamcodes
Manually forward-ports merged dev (v0) changes to the v1 branch, adapting code to v1's package layout and changeset names.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
arkenv
yamcodes
Answer questions about ArkEnv and help implement environment variable validation.
SkillAFreshness: A★ 147Claude Code +9 - 0.783score
groom-issue
yamcodes
Groom a poorly written issue by grilling the user to clarify requirements, updating the issue on GitHub via the gh cli, and utilizing the triage skill to…
SkillAFreshness: A★ 147Claude Code +9
Cite this page
next-best-practices skill. Agent Mart. https://agentmart.dev/skills/yamcodes-next-best-practices (last updated 2026-10-24)