Install Nextjs 15
Pick your agent. Every command is ready to paste.
npx skills add Gentleman-Programming/Gentleman-Skills --skill nextjs-15The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads nextjs-15 when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the nextjs-15 skill”. In Codex, type $nextjs-15.
App Router File Conventions
app/
├── layout.tsx # Root layout (required)
├── page.tsx # Home page (/)
├── loading.tsx # Loading UI (Suspense)
├── error.tsx # Error boundary
├── not-found.tsx # 404 page
├── (auth)/ # Route group (no URL impact)
│ ├── login/page.tsx # /login
│ └── signup/page.tsx # /signup
├── api/
│ └── route.ts # API handler
└── _components/ # Private folder (not routed)
Server Components (Default)
// No directive needed - async by default
export default async function Page() {
const data = await db.query();
return <Component data={data} />;
}
Server Actions
// app/actions.ts
"use server";
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
export async function createUser(formData: FormData) {
const name = formData.get("name") as string;
await db.users.create({ data: { name } });
revalidatePath("/users");
redirect("/users");
}
// Usage
<form action={createUser}>
<input name="name" required />
<button type="submit">Create</button>
</form>
Data Fetching
// Parallel
async function Page() {
const [users, posts] = await Promise.all([
getUsers(),
getPosts(),
]);
return <Dashboard users={users} posts={posts} />;
}
// Streaming with Suspense
<Suspense fallback={<Loading />}>
<SlowComponent />
</Suspense>
Route Handlers (API)
// app/api/users/route.ts
import { NextRequest, NextResponse } from "next/server";
export async function GET(request: NextRequest) {
const users = await db.users.findMany();
return NextResponse.json(users);
}
export async function POST(request: NextRequest) {
const body = await request.json();
const user = await db.users.create({ data: body });
return NextResponse.json(user, { status: 201 });
}
Middleware
// middleware.ts (root level)
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
export function middleware(request: NextRequest) {
const token = request.cookies.get("token");
if (!token && request.nextUrl.pathname.startsWith("/dashboard")) {
return NextResponse.redirect(new URL("/login", request.url));
}
return NextResponse.next();
}
export const config = {
matcher: ["/dashboard/:path*"],
};
Metadata
// Static
export const metadata = {
title: "My App",
description: "Description",
};
// Dynamic
export async function generateMetadata({ params }) {
const product = await getProduct(params.id);
return { title: product.name };
}
server-only Package
import "server-only";
// This will error if imported in client component
export async function getSecretData() {
return db.secrets.findMany();
}
Keywords
nextjs, next.js, app router, server components, server actions, streaming
Tips for Nextjs 15
- • Start a fresh session after installing so your agent picks up the new skill.
- • It is part of a pack with 24 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Nextjs 15
What does the Nextjs 15 skill do?
Next.js 15 App Router patterns. Trigger: When working with Next.js - routing, Server Actions, data fetching.
How do I install Nextjs 15?
Run "npx skills add Gentleman-Programming/Gentleman-Skills --skill nextjs-15" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Nextjs 15 work in Cursor and Codex?
Yes. Nextjs 15 uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Nextjs 15 free?
Nextjs 15 is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Nextjs 15?
Nextjs 15 is published by Gentleman-Programming in the Gentleman-Programming/Gentleman-Skills repository, together with 23 other skills.



