nextjs-expert
Next.js App Router expertise with five skills, three commands, and auth and performance guidance.
- CCM score
- 67 of 100
- version
- 1.0.0
- GitHub stars
- 3.8K
Own this plugin? Claim it
What it does
- Adds 3 commands (
/nextjs-expert:scaffold,/nextjs-expert:add-auth,/nextjs-expert:optimize) and 5 skills covering App Router, Server Components, Route Handlers, Server Actions, and auth - Covers file conventions, dynamic and parallel routes, server versus client component boundaries, and HTTP method handlers with streaming responses
- Guides form handling with
useFormState, Zod validation, and revalidation, plus NextAuth.js v5 with middleware-based route protection - Designed for projects targeting Next.js 15 that want patterns checked against App Router conventions
Next.js development expertise with skills for App Router, Server Components, Route Handlers, Server Actions, and authentication patterns
Add marketplace
/plugin marketplace add davepoon/buildwithclaudeRun it inside Claude Code once, then install the plugin below.
Install
/plugin install nextjs-expert@buildwithclaudeRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceNext.js App Router Patterns
Overview
The App Router is Next.js's file-system based router built on React Server Components. It uses a app/ directory structure where folders define routes and special files control UI behavior.
Core File Conventions
Route Files
Each route segment is defined by a folder. Special files within folders control behavior:
| File | Purpose |
|---|---|
page.tsx | Unique UI for a route, makes route publicly accessible |
layout.tsx | Shared UI wrapper, preserves state across navigations |
loading.tsx | Loading UI using React Suspense |
error.tsx | Error boundary for route segment |
not-found.tsx | UI for 404 responses |
template.tsx | Like layout but re-renders on navigation |
default.tsx | Fallback for parallel routes |
Folder Conventions
| Pattern | Purpose | Example |
|---|---|---|
folder/ | Route segment | app/blog/ → /blog |
[folder]/ | Dynamic segment | app/blog/[slug]/ → /blog/:slug |
[...folder]/ | Catch-all segment | app/docs/[...slug]/ → /docs/* |
[[...folder]]/ | Optional catch-all | app/shop/[[...slug]]/ → /shop or /shop/* |
(folder)/ | Route group (no URL) | app/(marketing)/about/ → /about |
@folder/ | Named slot (parallel routes) | app/@modal/login/ |
_folder/ | Private folder (excluded) | app/_components/ |
Creating Routes
Basic Route Structure
To create a new route, add a folder with page.tsx:
app/
├── page.tsx # / (home)
├── about/
│ └── page.tsx # /about
└── blog/
├── page.tsx # /blog
└── [slug]/
└── page.tsx # /blog/:slug
Page Component
A page is a Server Component by default:
// app/about/page.tsx
export default function AboutPage() {
return (
<main>
<h1>About Us</h1>
<p>Welcome to our company.</p>
</main>
)
}
Dynamic Routes
Access route parameters via the params prop:
// app/blog/[slug]/page.tsx
interface PageProps {
params: Promise<{ slug: string }>
}
export default async function BlogPost({ params }: PageProps) {
const { slug } = await params
const post = await getPost(slug)
return <article>{post.content}</article>
}
Layouts
Root Layout (Required)
Every app needs a root layout with <html> and <body>:
// app/layout.tsx
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
Nested Layouts
Layouts wrap their children and preserve state:
// app/dashboard/layout.tsx
export default function DashboardLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<div className="flex">
<Sidebar />
<main className="flex-1">{children}</main>
</div>
)
}
Loading and Error States
Loading UI
Create instant loading states with Suspense:
// app/dashboard/loading.tsx
export default function Loading() {
return <div className="animate-pulse">Loading...</div>
}
Error Boundaries
Handle errors gracefully:
// app/dashboard/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>
)
}
Route Groups
Organize routes without affecting URL structure:
app/
├── (marketing)/
│ ├── layout.tsx # Marketing layout
│ ├── about/page.tsx # /about
│ └── contact/page.tsx # /contact
└── (shop)/
├── layout.tsx # Shop layout
└── products/page.tsx # /products
Metadata
Static Metadata
// app/about/page.tsx
import { Metadata } from 'next'
export const metadata: Metadata = {
title: 'About Us',
description: 'Learn more about our company',
}
Dynamic Metadata
// app/blog/[slug]/page.tsx
export async function generateMetadata({ params }: PageProps): Promise<Metadata> {
const { slug } = await params
const post = await getPost(slug)
return { title: post.title }
}
Key Patterns
- Colocation: Keep components, tests, and styles near routes
- Private folders: Use
_folderfor non-route files - Route groups: Use
(folder)to organize without URL impact - Parallel routes: Use
@slotfor complex layouts - Intercepting routes: Use
(.)patterns for modals
Resources
For detailed patterns, see:
references/routing-conventions.md- Complete file conventionsreferences/layouts-templates.md- Layout composition patternsreferences/loading-error-states.md- Suspense and error handlingexamples/dynamic-routes.md- Dynamic routing examplesexamples/parallel-routes.md- Parallel and intercepting routes
Readme
Next.js Expert Plugin
A comprehensive Claude Code plugin providing Next.js development expertise with skills for App Router, Server Components, Route Handlers, Server Actions, and authentication patterns.
Features
- 5 Skills covering core Next.js App Router concepts
- 3 Commands for common development tasks
- Progressive disclosure with references and examples
- Next.js 15 compatible patterns
Installation
Add to your Claude Code settings:
{
"plugins": [
"https://github.com/davepoon/buildwithclaude/tree/main/plugins/nextjs-expert"
]
}
Skills
app-router
File-based routing, layouts, metadata, and route organization for Next.js App Router.
Topics covered:
- File conventions (page.tsx, layout.tsx, loading.tsx, error.tsx)
- Dynamic routes and catch-all segments
- Parallel routes and intercepting routes
- Route groups and organization
server-components
React Server Components patterns and when to use server vs client components.
Topics covered:
- Server vs Client component decision guide
- 'use client' boundaries
- Composition patterns
- Data fetching in server components
route-handlers
API route handlers in the app directory.
Topics covered:
- HTTP method handlers (GET, POST, PUT, PATCH, DELETE)
- Request/response handling
- Streaming responses
- CORS and authentication
server-actions
Server Actions for form handling and mutations.
Topics covered:
- 'use server' directive
- Form handling with useFormState
- Validation with Zod
- Revalidation patterns
auth-patterns
Authentication patterns for Next.js applications.
Topics covered:
- NextAuth.js v5 setup
- Middleware-based route protection
- Session management
- Role-based access control
Commands
/nextjs-expert:scaffold
Scaffold Next.js components following best practices.
/nextjs-expert:scaffold
Scaffolds pages, components, API routes, and more following App Router conventions.
/nextjs-expert:add-auth
Add authentication to a Next.js application.
/nextjs-expert:add-auth
Sets up NextAuth.js with providers, middleware, and protected routes.
/nextjs-expert:optimize
Analyze and optimize Next.js application performance.
/nextjs-expert:optimize
Reviews component boundaries, data fetching, caching, and provides recommendations.
Directory Structure
nextjs-expert/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ ├── app-router/
│ │ ├── SKILL.md
│ │ ├── references/
│ │ │ ├── routing-conventions.md
│ │ │ ├── layouts-templates.md
│ │ │ └── loading-error-states.md
│ │ └── examples/
│ │ ├── dynamic-routes.md
│ │ └── parallel-routes.md
│ ├── server-components/
│ │ ├── SKILL.md
│ │ ├── references/
│ │ │ ├── server-vs-client.md
│ │ │ └── composition-patterns.md
│ │ └── examples/
│ │ └── data-fetching-patterns.md
│ ├── route-handlers/
│ │ ├── SKILL.md
│ │ ├── references/
│ │ │ ├── http-methods.md
│ │ │ └── streaming-responses.md
│ │ └── examples/
│ │ └── crud-api.md
│ ├── server-actions/
│ │ ├── SKILL.md
│ │ ├── references/
│ │ │ ├── form-handling.md
│ │ │ └── revalidation.md
│ │ └── examples/
│ │ └── mutation-patterns.md
│ └── auth-patterns/
│ ├── SKILL.md
│ ├── references/
│ │ ├── middleware-auth.md
│ │ └── session-management.md
│ └── examples/
│ └── nextauth-setup.md
├── commands/
│ ├── scaffold.md
│ ├── add-auth.md
│ └── optimize.md
└── README.md
Usage Examples
Building a new page
Ask Claude:
"Create a blog post page with dynamic routing"
Claude will use the app-router and server-components skills to generate:
app/blog/[slug]/page.tsxwith proper async params- Loading and error states
- Metadata generation
Adding authentication
Ask Claude:
"Add GitHub and Google authentication to my app"
Or use the command:
"/nextjs-expert:add-auth"
Claude will use the auth-patterns skill to set up:
- NextAuth.js configuration
- Middleware protection
- Login/logout components
Optimizing performance
Ask Claude:
"Review my app for performance issues"
Or use the command:
"/nextjs-expert:optimize"
Claude will analyze:
- Client/server component boundaries
- Data fetching patterns
- Caching strategies
- Bundle size
Contributing
Contributions welcome! Please follow the existing skill structure and include:
- SKILL.md with frontmatter and core content
- References for detailed documentation
- Examples with working code patterns
License
MIT
Details
- Marketplace
- davepoon/buildwithclaude
- Source
- plugins/nextjs-expert
- Author
- BuildWithClaude Community
- Category
- Development
- License
- MIT
- Keywords
- skills, nextjs, react, app-router, server-components, route-handlers, server-actions, authentication
- Listed since
- Apr 6, 2026
More from davepoon/buildwithclaude
All 257- ngx-json-renderv0.9.1
- nibblv0.1.0
- nimplyv1.0.1
- nogpuv0.2.3
- notfairv0.27.16
- obsidian-skillsv1.0.0
- originv0.6.1
- papiv0.7.85
- paywall-pricing-designv1.0.0
- personaxpand-social-media-skillsv0.1.2
- phaneslightv3.7.2
- pharonv0.1.2
- pinboardv0.6.0
- pinev0.1.1
- pixelboltv0.9.0
- popnowv1.1.0
- postv1.1.0
- postelv1.2.0
- pro-launchv1.0.0
- pro-motionv1.2.1
- production-fast-api-templatev0.1.0
- project-boundaryv1.8.0
- prompt-cache-trackerv0.1.2
- promptlikev0.6.2
Similar to nextjs-expert
More Frontend & UI CodenextjsPluginTheBushidoCollective/han201 starsAdvanced Next.js skills for App Router, Server Components, and data fetching.
nextjs-developerSkilljeffallan/claude-skills6.3K installsSenior-level Next.js 14+ App Router skill covering server components, server actions, caching, and SEO metadata.
nextjs-toolkitPluginarmanzeroeight/fastagent-plugins29 starsNext.js framework toolkit for rendering strategies (SSR/SSG/ISR), App Router patterns, and full-stack React development. Includes Next.js expert agent for strat
fuse-nextjsPluginfusengine/agents36 starsExpert Next.js 16 + React 19 with App Router, Server Components, Prisma 7, Better Auth, TanStack Form, Zustand, shadcn/ui
sitecore-content-sdk-nextjs-app-routerPluginChris1415/sitecore-skills-pocs14 starsContent SDK skills for Next.js App Router head apps, including Content SDK Atoms (BETA). Install with 'Sitecore Content SDK - Core'.
agents-development-architecturePlugindavepoon/buildwithclaude3.8K starsExpert agents for software architecture, backend development, and system design