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 artivilla
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/artivilla-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
- Instructions
- 149 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 ## Scripts See [scripts.md](./scripts.md) for: - `next/script` vs native script tags - Inline scripts need `id` - Loading strategies - Google Analytics with `@next/third-parties` ## Hydration Errors See [hydration-error.md](./hydration-error.md) for: - Common causes (browser APIs, dates, invalid HTML) - Debugging with error overlay
From artivilla/agents-config, MIT.
More from artivilla/agents-config
- 0.414score
paper-mcp
artivilla
Use the Paper MCP server to fetch paper metadata, sections, figures, citations, and full-text context, then translate that context into structured outputs…
SkillDFreshness: DClaude Code +9 - 0.414score
pr-trends
artivilla
Generate weekly and monthly pull request trend tables for a git repository, including created PRs, merged PRs, average days to merge, and lines changed.
SkillDFreshness: DClaude Code +9 - 0.409score
design-spec-rules
artivilla
Enforce design-to-code fidelity rules.
SkillDFreshness: DClaude Code +9 - 0.409score
interfaces-raunofreiberg
artivilla
Review UI code against Rauno Freiberg's interface guidelines.
SkillDFreshness: DClaude Code +9 - 0.409score
github
artivilla
Manage GitHub issues using gh CLI - create, list, view, update, close, and assign issues.
SkillDFreshness: DClaude Code +9 - 0.406score
mymind
artivilla
Use the local mymind CLI to initialize auth, refresh bookmark cache from access.mymind.com/cards, search bookmarks by text or regex, query tags, and shape…
SkillDFreshness: DClaude Code +9 - 0.403score
git-commit-message
artivilla
Auto-generates conventional commit messages from git diffs with tiered format enforcement.
SkillDFreshness: DClaude Code +9 - 0.390score
railway-docs
artivilla
This skill should be used when the user asks about Railway features, how Railway works, or shares a docs.railway.com URL.
SkillDFreshness: DClaude Code +9 - 0.390score
database
artivilla
This skill should be used when the user wants to add a database (Postgres, Redis, MySQL, MongoDB), says "add postgres", "add redis", "add database", "connect…
SkillDFreshness: DClaude Code +9 - 0.390score
deployment
artivilla
This skill should be used when the user wants to manage Railway deployments, view logs, or debug issues.
SkillDFreshness: DClaude Code +9 - 0.390score
central-station
artivilla
This skill should be used when the user asks about Central Station threads, community discussions, support questions, feature requests, or wants to search…
SkillDFreshness: DClaude Code +9 - 0.390score
projects
artivilla
This skill should be used when the user wants to list all projects, switch projects, rename a project, enable/disable PR deploys, make a project…
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 26, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/artivilla/agents-config
- 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.407score
next-best-practices
yamcodes
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization…
SkillAFreshness: A★ 147Claude 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.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 artivilla
- 0.414score
paper-mcp
artivilla
Use the Paper MCP server to fetch paper metadata, sections, figures, citations, and full-text context, then translate that context into structured outputs…
SkillDFreshness: DClaude Code +9 - 0.414score
pr-trends
artivilla
Generate weekly and monthly pull request trend tables for a git repository, including created PRs, merged PRs, average days to merge, and lines changed.
SkillDFreshness: DClaude Code +9 - 0.409score
design-spec-rules
artivilla
Enforce design-to-code fidelity rules.
SkillDFreshness: DClaude Code +9 - 0.409score
github
artivilla
Manage GitHub issues using gh CLI - create, list, view, update, close, and assign issues.
SkillDFreshness: DClaude Code +9 - 0.409score
interfaces-raunofreiberg
artivilla
Review UI code against Rauno Freiberg's interface guidelines.
SkillDFreshness: DClaude Code +9 - 0.406score
mymind
artivilla
Use the local mymind CLI to initialize auth, refresh bookmark cache from access.mymind.com/cards, search bookmarks by text or regex, query tags, and shape…
SkillDFreshness: DClaude Code +9
Cite this page
next-best-practices skill. Agent Mart. https://agentmart.dev/skills/artivilla-next-best-practices (last updated 2026-10-24)