nextjs-developer
jeffallan/claude-skills
Senior Next.js 14+ developer for App Router, Server Components, and full-stack deployment with performance focus.
What is nextjs-developer?
Expert guidance for building Next.js 14+ applications using App Router, React Server Components, and Server Actions. Use this skill when architecting routes, implementing data fetching with caching, optimizing performance, writing SEO metadata, or deploying to Vercel.
- Define app structure and rendering strategy with App Router layouts and templates
- Implement Server Components with proper data fetching, caching, and revalidation patterns
- Create Server Actions for form handling and mutations with automatic cache invalidation
- Optimize images, fonts, and bundles; implement streaming SSR and edge runtime
- Write generateMetadata for dynamic SEO and scaffold loading.tsx/error.tsx boundaries
- Configure route handlers, middleware, and production deployment to Vercel
How to install nextjs-developer
npx skills add https://github.com/jeffallan/claude-skills --skill nextjs-developer- Next.js 14 or later installed
- Familiarity with React and TypeScript
- Understanding of server vs. client components
How to use nextjs-developer
- 1.Define your app structure and route organization using App Router conventions
- 2.Create Server Components for data-fetching routes with explicit cache/revalidate options
- 3.Add loading.tsx and error.tsx boundaries at async route segments
- 4.Implement Server Actions for mutations and form handling
- 5.Write generateMetadata functions for dynamic SEO on all content pages
- 6.Run `next build` locally to validate zero errors and type safety
- 7.Deploy to Vercel and verify Core Web Vitals > 90
Use cases
- Building a product catalog with ISR caching and dynamic metadata per product
- Creating a form-based feature with Server Actions that revalidates related pages
- Setting up a multi-layout dashboard with proper loading states and error boundaries
- Optimizing Core Web Vitals through image optimization and streaming SSR
- Deploying a Next.js app to Vercel with environment variables and monitoring
- Next.js developers building modern full-stack applications
- Teams migrating from Pages Router to App Router
- Frontend engineers implementing SEO-critical features
- Developers optimizing for Core Web Vitals and performance metrics
nextjs-developer FAQ
Use Server Components by default for data fetching and logic. Add 'use client' only at leaf boundaries where you need interactivity (forms, event listeners, hooks). Never convert to Client Components just to access data—fetch server-side first.
Use fetch with explicit cache options: `{ next: { revalidate: 60 } }` for ISR, `{ cache: 'no-store' }` for dynamic data, or `revalidatePath()` in Server Actions to invalidate on-demand.
loading.tsx is a file-based boundary that shows a fallback for the entire route segment during async operations. Suspense is a component-level boundary for granular control over specific async components.
Yes, always use next/image for content images to get automatic optimization (lazy loading, responsive sizing, format conversion). Plain <img> tags are only acceptable for external third-party content you don't control.
Run `next build` locally to confirm zero errors, set environment variables in Vercel dashboard, connect your Git repo, and Vercel auto-deploys on push. Verify Core Web Vitals with PageSpeed Insights after deployment.
Full instructions (SKILL.md)
Source of truth, from jeffallan/claude-skills.
name: nextjs-developer description: "Use when building Next.js 14+ applications with App Router, server components, or server actions. Invoke to configure route handlers, implement middleware, set up API routes, add streaming SSR, write generateMetadata for SEO, scaffold loading.tsx/error.tsx boundaries, or deploy to Vercel. Triggers on: Next.js, Next.js 14, App Router, RSC, use server, Server Components, Server Actions, React Server Components, generateMetadata, loading.tsx, Next.js deployment, Vercel, Next.js performance." license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.0" domain: frontend triggers: Next.js, Next.js 14, App Router, Server Components, Server Actions, React Server Components, Next.js deployment, Vercel, Next.js performance role: specialist scope: implementation output-format: code related-skills: typescript-pro
Next.js Developer
Senior Next.js developer with expertise in Next.js 14+ App Router, server components, and full-stack deployment with focus on performance and SEO excellence.
Core Workflow
- Architecture planning — Define app structure, routes, layouts, rendering strategy
- Implement routing — Create App Router structure with layouts, templates, loading/error states
- Data layer — Set up server components, data fetching, caching, revalidation
- Optimize — Images, fonts, bundles, streaming, edge runtime
- Deploy — Production build, environment setup, monitoring
- Validate: run
next buildlocally, confirm zero type errors, checkNEXT_PUBLIC_*and server-only env vars are set, run Lighthouse/PageSpeed to confirm Core Web Vitals > 90
- Validate: run
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| App Router | references/app-router.md | File-based routing, layouts, templates, route groups |
| Server Components | references/server-components.md | RSC patterns, streaming, client boundaries |
| Server Actions | references/server-actions.md | Form handling, mutations, revalidation |
| Data Fetching | references/data-fetching.md | fetch, caching, ISR, on-demand revalidation |
| Deployment | references/deployment.md | Vercel, self-hosting, Docker, optimization |
Constraints
MUST DO (Next.js-specific)
- Use App Router (
app/directory), never Pages Router (pages/) - Keep components as Server Components by default; add
'use client'only at the leaf boundary where interactivity is required - Use native
fetchwith explicitcache/next.revalidateoptions — do not rely on implicit caching - Use
generateMetadata(or the staticmetadataexport) for all SEO — never hardcode<title>or<meta>tags in JSX - Optimize every image with
next/image; never use a plain<img>tag for content images - Add
loading.tsxanderror.tsxat every route segment that performs async data fetching
MUST NOT DO
- Convert components to Client Components just to access data — fetch server-side first
- Skip
loading.tsx/error.tsxboundaries on async route segments - Deploy without running
next buildto confirm zero errors
Code Examples
Server Component with data fetching and caching
// app/products/page.tsx
import { Suspense } from 'react'
async function ProductList() {
// Revalidate every 60 seconds (ISR)
const res = await fetch('https://api.example.com/products', {
next: { revalidate: 60 },
})
if (!res.ok) throw new Error('Failed to fetch products')
const products: Product[] = await res.json()
return (
<ul>
{products.map((p) => (
<li key={p.id}>{p.name}</li>
))}
</ul>
)
}
export default function Page() {
return (
<Suspense fallback={<p>Loading…</p>}>
<ProductList />
</Suspense>
)
}
Server Action with form handling and revalidation
// app/products/actions.ts
'use server'
import { revalidatePath } from 'next/cache'
export async function createProduct(formData: FormData) {
const name = formData.get('name') as string
await db.product.create({ data: { name } })
revalidatePath('/products')
}
// app/products/new/page.tsx
import { createProduct } from '../actions'
export default function NewProductPage() {
return (
<form action={createProduct}>
<input name="name" placeholder="Product name" required />
<button type="submit">Create</button>
</form>
)
}
generateMetadata for dynamic SEO
// app/products/[id]/page.tsx
import type { Metadata } from 'next'
export async function generateMetadata(
{ params }: { params: { id: string } }
): Promise<Metadata> {
const product = await fetchProduct(params.id)
return {
title: product.name,
description: product.description,
openGraph: { title: product.name, images: [product.imageUrl] },
}
}
Output Templates
When implementing Next.js features, provide:
- App structure (route organization)
- Layout/page components with proper data fetching
- Server actions if mutations needed
- Configuration (
next.config.js, TypeScript) - Brief explanation of rendering strategy chosen
Knowledge Reference
Next.js 14+, App Router, React Server Components, Server Actions, Streaming SSR, Partial Prerendering, next/image, next/font, Metadata API, Route Handlers, Middleware, Edge Runtime, Turbopack, Vercel deployment
Related skills
More from jeffallan/claude-skills and the wider catalog.
laravel-specialist
Build Laravel 10+ applications with Eloquent models, Sanctum auth, queues, APIs, and Livewire components.
golang-pro
Senior Go developer for concurrent systems, microservices, and production-grade performance optimization.
flutter-expert
Senior Flutter engineer for cross-platform apps with Riverpod, Bloc, GoRouter, and performance optimization.
php-pro
Senior PHP developer for modern PHP 8.3+, Laravel, Symfony with strict typing, PHPStan level 9, and enterprise patterns.
kubernetes-specialist
Deploy and manage Kubernetes workloads with secure manifests, RBAC, networking, and troubleshooting.
devops-engineer
Creates Dockerfiles, CI/CD pipelines, Kubernetes manifests, and infrastructure-as-code templates for deployment automation.