Next Best Practices
vercel-labs/openreview
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Next.js 15+ App Router development patterns including Server Components, Client Components, data fetching, layouts, and server actions.
$ npx skills add blencorp/claude-code-kit --skill nextjs -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install blencorp/claude-code-kit nextjs --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/blencorp/claude-code-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli/kits/nextjs/skills/nextjs .claude/skills/nextjs && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "nextjs" agent skill from https://github.com/blencorp/claude-code-kit/tree/main/cli/kits/nextjs/skills/nextjs into .claude/skills/nextjs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nextjs", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/blencorp/claude-code-kit/tree/main/cli/kits/nextjs/skills/nextjsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add blencorp/claude-code-kit --skill nextjs -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install blencorp/claude-code-kit nextjs --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/blencorp/claude-code-kit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/cli/kits/nextjs/skills/nextjs .agents/skills/nextjs && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "nextjs" agent skill from https://github.com/blencorp/claude-code-kit/tree/main/cli/kits/nextjs/skills/nextjs into .agents/skills/nextjs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nextjs", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add blencorp/claude-code-kit --skill nextjs -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install blencorp/claude-code-kit nextjs --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/blencorp/claude-code-kit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/cli/kits/nextjs/skills/nextjs .cursor/skills/nextjs && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "nextjs" agent skill from https://github.com/blencorp/claude-code-kit/tree/main/cli/kits/nextjs/skills/nextjs into .cursor/skills/nextjs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nextjs", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/blencorp/claude-code-kit.git --path cli/kits/nextjs/skills/nextjs--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add blencorp/claude-code-kit --skill nextjs -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install blencorp/claude-code-kit nextjs --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/blencorp/claude-code-kit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/cli/kits/nextjs/skills/nextjs .gemini/skills/nextjs && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "nextjs" agent skill from https://github.com/blencorp/claude-code-kit/tree/main/cli/kits/nextjs/skills/nextjs into .gemini/skills/nextjs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nextjs", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install blencorp/claude-code-kit nextjsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add blencorp/claude-code-kit --skill nextjs -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/blencorp/claude-code-kit.git skills-src && mkdir -p .github/skills && cp -r skills-src/cli/kits/nextjs/skills/nextjs .github/skills/nextjs && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "nextjs" agent skill from https://github.com/blencorp/claude-code-kit/tree/main/cli/kits/nextjs/skills/nextjs into .github/skills/nextjs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nextjs", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add blencorp/claude-code-kit --skill nextjs -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install blencorp/claude-code-kit nextjs --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/blencorp/claude-code-kit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/cli/kits/nextjs/skills/nextjs .opencode/skills/nextjs && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "nextjs" agent skill from https://github.com/blencorp/claude-code-kit/tree/main/cli/kits/nextjs/skills/nextjs into .opencode/skills/nextjs/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nextjs", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
nextjsNext.js 15+ App Router development patterns including Server Components, Client Components, data fetching, layouts, and server actions.
Nextjs is an agent skill from blencorp/claude-code-kit. Next.js 15+ App Router development patterns including Server Components, Client Components, data fetching, layouts, and server actions. Use when creating pages, routes, layouts, components, API route handlers, server actions, loading states, error boundaries, or working with Next.js navigation and metadata.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `resources/data-fetching.md`, `resources/performance.md` and `resources/routing.md`).
It sits in Development, covering Error handling. It works with Next.js. The repository describes itself as: Claude Code infrastructure with auto-activating skills and framework-specific kits. Install complete Claude Code infrastructure in 30 seconds with automatic framework detection… The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d1b17ed. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Nextjs loads about 2.6k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 197 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from blencorp/claude-code-kit at commit d1b17ed, republished under its MIT licence (© blencorp). 197 words, ~2,612 tokens.
.claude/skills/nextjs/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Development patterns for Next.js 15+ using the App Router, Server Components, and modern data fetching.
app/
├── layout.tsx # Root layout (required)
├── page.tsx # Home page
├── loading.tsx # Loading UI
├── error.tsx # Error boundary
├── not-found.tsx # 404 page
├── posts/
│ ├── layout.tsx # Posts layout
│ ├── page.tsx # /posts
│ ├── [id]/
│ │ └── page.tsx # /posts/123
│ └── new/
│ └── page.tsx # /posts/new
└── api/
└── posts/
└── route.ts # API route handler// app/posts/page.tsx
import { getPosts } from '@/lib/api';
export const metadata = {
title: 'Posts',
description: 'Browse all blog posts'
};
export default async function PostsPage() {
const posts = await getPosts();
return (
<div>
<h1>Posts</h1>
<ul>
{posts.map(post => (
<li key={post.id}>
<a href={`/posts/${post.id}`}>{post.title}</a>
</li>
))}
</ul>
</div>
);
}// app/posts/[id]/page.tsx
import { getPost } from '@/lib/api';
import { notFound } from 'next/navigation';
interface PageProps {
params: Promise<{ id: string }>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}
export async function generateMetadata({ params }: PageProps) {
const { id } = await params;
const post = await getPost(id);
return {
title: post.title,
description: post.excerpt
};
}
export default async function PostPage({ params }: PageProps) {
const { id } = await params;
const post = await getPost(id);
if (!post) {
notFound();
}
return (
<article>
<h1>{post.title}</h1>
<div dangerouslySetInnerHTML={{ __html: post.content }} />
</article>
);
}Use for:
// app/posts/page.tsx (Server Component by default)
import { db } from '@/lib/db';
export default async function PostsPage() {
// Direct database access
const posts = await db.post.findMany();
return <PostList posts={posts} />;
}Use for:
// components/SearchBar.tsx
'use client'; // Required directive
import { useState } from 'react';
import { useRouter } from 'next/navigation';
export function SearchBar() {
const [query, setQuery] = useState('');
const router = useRouter();
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
router.push(`/search?q=${query}`);
};
return (
<form onSubmit={handleSubmit}>
<input
value={query}
onChange={e => setQuery(e.target.value)}
placeholder="Search posts..."
/>
<button type="submit">Search</button>
</form>
);
}// app/posts/page.tsx (Server Component)
import { getPosts } from '@/lib/api';
import { SearchBar } from '@/components/SearchBar'; // Client Component
export default async function PostsPage() {
const posts = await getPosts();
return (
<div>
<SearchBar /> {/* Client Component for interactivity */}
<PostList posts={posts} /> {/* Can be Server Component */}
</div>
);
}// Server Component with async/await
export default async function PostsPage() {
const posts = await fetch('https://api.example.com/posts', {
next: { revalidate: 3600 } // Cache for 1 hour
}).then(res => res.json());
return <PostList posts={posts} />;
}export default async function DashboardPage() {
// Fetch in parallel
const [user, posts, stats] = await Promise.all([
getUser(),
getPosts(),
getStats()
]);
return (
<div>
<UserProfile user={user} />
<PostList posts={posts} />
<Stats data={stats} />
</div>
);
}import { Suspense } from 'react';
export default function PostsPage() {
return (
<div>
<h1>Posts</h1>
<Suspense fallback={<PostsSkeleton />}>
<Posts />
</Suspense>
</div>
);
}
async function Posts() {
const posts = await getPosts(); // Slow data fetch
return <PostList posts={posts} />;
}// app/layout.tsx
import './globals.css';
export const metadata = {
title: {
default: 'My Blog',
template: '%s | My Blog'
}
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
<header>
<nav>{/* Navigation */}</nav>
</header>
<main>{children}</main>
<footer>{/* Footer */}</footer>
</body>
</html>
);
}// app/posts/layout.tsx
export default function PostsLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<div>
<aside>
<PostsSidebar />
</aside>
<div>{children}</div>
</div>
);
}// app/api/posts/route.ts
import { NextRequest, NextResponse } from 'next/server';
export async function GET(request: NextRequest) {
const posts = await getPosts();
return NextResponse.json({ posts });
}
export async function POST(request: NextRequest) {
const body = await request.json();
const post = await createPost(body);
return NextResponse.json({ post }, { status: 201 });
}// app/api/posts/[id]/route.ts
export async function GET(
request: NextRequest,
{ params }: { params: { id: string } }
) {
const post = await getPost(params.id);
if (!post) {
return NextResponse.json(
{ error: 'Post not found' },
{ status: 404 }
);
}
return NextResponse.json({ post });
}// app/actions/posts.ts
'use server';
import { revalidatePath } from 'next/cache';
import { redirect } from 'next/navigation';
export async function createPost(formData: FormData) {
const title = formData.get('title') as string;
const content = formData.get('content') as string;
const post = await db.post.create({
data: { title, content }
});
revalidatePath('/posts');
redirect(`/posts/${post.id}`);
}import { createPost } from '@/app/actions/posts';
export default function NewPostPage() {
return (
<form action={createPost}>
<input name="title" required />
<textarea name="content" required />
<button type="submit">Create Post</button>
</form>
);
}import Link from 'next/link';
export function PostCard({ post }: { post: Post }) {
return (
<Link href={`/posts/${post.id}`} prefetch={true}>
<h2>{post.title}</h2>
<p>{post.excerpt}</p>
</Link>
);
}'use client';
import { useRouter } from 'next/navigation';
export function PostActions({ postId }: { postId: string }) {
const router = useRouter();
const handleDelete = async () => {
await deletePost(postId);
router.push('/posts');
router.refresh(); // Refresh server components
};
return <button onClick={handleDelete}>Delete</button>;
}'use client';
import { usePathname, useSearchParams } from 'next/navigation';
const pathname = usePathname(); // /posts/123
const searchParams = useSearchParams(); // ?q=hello
const query = searchParams.get('q');// Static metadata
export const metadata = {
title: 'All Posts',
description: 'Browse our collection of blog posts'
};
// Dynamic metadata
export async function generateMetadata({ params }: PageProps) {
const { id } = await params;
const post = await getPost(id);
return {
title: post.title,
description: post.excerpt
};
}// app/posts/error.tsx
'use client';
export default function Error({ error, reset }: { error: Error; reset: () => void }) {
return (
<div>
<h2>Something went wrong!</h2>
<button onClick={() => reset()}>Try again</button>
</div>
);
}
// app/posts/[id]/not-found.tsx
export default function NotFound() {
return <div>Post Not Found</div>;
}// Generate static pages at build time
export async function generateStaticParams() {
const posts = await getPosts();
return posts.map((post) => ({ id: post.id }));
}
// Revalidate every hour (ISR)
export const revalidate = 3600;
export default async function PostPage({
params
}: {
params: Promise<{ id: string }>
}) {
const { id } = await params;
const post = await getPost(id);
return <Post data={post} />;
}For detailed information, see:
© blencorp, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files in cli/kits/nextjs/skills/nextjs of blencorp/claude-code-kit.
Open the folder on GitHubat commit d1b17ed
Nextjs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Nextjs this skillblencorp/claude-code-kit | 106 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Next Best Practicesvercel-labs/openreview | 1.7k | 18 repos | ~1k | Automated safety check: Pass | None | |
| App Routerdavepoon/buildwithclaude | 3.6k | 1 repos | ~1.3k | Automated safety check: Pass | MIT | |
| Nextjs App RouterHoangNguyen0403/agent-skills-standard | 570 | — | ~993 | Automated safety check: Pass | MIT | |
| Nextjs Data Fetchinggiuseppe-trisciuoglio/developer-kit | 355 | — | ~2.2k | Automated safety check: Notes | MIT | |
| Nextjs ExpertLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.8k | Automated safety check: Pass | MIT |
vercel-labs/openreview
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
davepoon/buildwithclaude
This skill should be used when the user asks to "create a Next.js route", "add a page", "set up layouts", "implement loading states", "add error boundaries", "organize routes", "create dynamic…
HoangNguyen0403/agent-skills-standard
Configure file-system routing with nested layouts, route groups, parallel routes, and error boundaries in Next.js App Router.
giuseppe-trisciuoglio/developer-kit
Provides Next.js App Router data fetching patterns including SWR and React Query integration, parallel data fetching, Incremental Static Regeneration (ISR), revalidation strategies, and error…
LeoYeAI/openclaw-master-skills
A skill your agent uses when building Next.js 14/15 applications with the App Router.
nopol10/nekocap
A skill your agent uses when working on Next.js routing/middleware, error handling, Sentry/logging, user-facing notifications, performance-sensitive paths (Octopus subtitle renderer, large lists…
blencorp/claude-code-kit
Material-UI v7 component library patterns including sx prop styling, theme integration, responsive design, and MUI-specific hooks.
blencorp/claude-code-kit
Express.js framework patterns including routing, middleware, request/response handling, and Express-specific APIs.
blencorp/claude-code-kit
Core Node.js backend patterns for TypeScript applications including async/await error handling, middleware concepts, configuration management, testing strategies, and layered architecture principles.
blencorp/claude-code-kit
Prisma ORM patterns including Prisma Client usage, queries, mutations, relations, transactions, and schema management.
blencorp/claude-code-kit
Core React 19 patterns including hooks, Suspense, lazy loading, component structure, TypeScript best practices, and performance optimization.
blencorp/claude-code-kit
shadcn/ui component library patterns with Radix UI primitives and Tailwind CSS.
Works with
Categories
Next.js 15+ App Router development patterns including Server Components, Client Components, data fetching, layouts, and server actions. Nextjs is an agent skill from blencorp/claude-code-kit.js 15+ App Router development patterns including Server Components, Client Components, data fetching, layouts, and server actions.
Nextjs fits situations like: API route handlers; error boundaries; working with Next.js navigation and metadata.
Run `npx skills add blencorp/claude-code-kit --skill nextjs -a claude-code`. Or copy the skill folder (cli/kits/nextjs/skills/nextjs in blencorp/claude-code-kit) into .claude/skills/nextjs in your project. Claude Code loads it when a task matches its description.
Run `npx skills add blencorp/claude-code-kit --skill nextjs -a codex`. Or copy the skill folder (cli/kits/nextjs/skills/nextjs in blencorp/claude-code-kit) into .agents/skills/nextjs in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add blencorp/claude-code-kit --skill nextjs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nextjs, .gemini/skills/nextjs, .github/skills/nextjs and .opencode/skills/nextjs in your project.
SKILL.md names no scripts, command-line tools or credentials: Nextjs is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Nextjs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Nextjs: Next Best Practices (vercel-labs/openreview, 1.7k stars), App Router (davepoon/buildwithclaude, 3.6k stars), Nextjs App Router (HoangNguyen0403/agent-skills-standard, 570 stars) and Nextjs Data Fetching (giuseppe-trisciuoglio/developer-kit, 355 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
blencorp (a GitHub organization) maintains it in blencorp/claude-code-kit, which has 106 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on November 28, 2025.
Source: blencorp/claude-code-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.