nextjs-developer
Expert Next.js development with App Router, Server Components, and modern React patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Expert Next.js development with App Router, Server Components, and modern React patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Guides an autonomous blog manager agent to propose topics, draft articles, and skip topics with structured JSON output for a Leaflet.pub publication.
Design and build AI agents with persistent memory, tool use, and multi-turn conversation. Covers architecture selection, memory design, model selection, tool configuration, and implementation patterns across agent frameworks. Use when creating, debugging, or improving AI agents.
Automate configuration management and application deployment with Ansible. Use when tasks mention ansible-playbook, inventory files, Ansible roles, ad-hoc commands, ansible-galaxy, or agentless SSH automation.
Deploy Kubernetes apps declaratively with Argo CD applications and projects. Use when tasks mention argocd, Argo CD, argocd app sync, Application CRD, AppProject, or GitOps with Argo CD.
Query Datadog observability data including logs, metrics, monitors, dashboards, hosts, APM spans, and incidents via direct API. Use when investigating production issues, checking monitors, searching logs, alerting, or accessing Datadog data.
Build, run, debug, and manage Docker containers, images, compose files, networking, volumes, registries, Buildx/Bake, Scout/SBOM, Swarm, and Docker AI tooling. Use when the user mentions docker, containers, containerizing, Dockerfile, compose, image registry, volumes, or any docker subcommand.
| name | nextjs-developer |
| description | Expert Next.js development with App Router, Server Components, and modern React patterns |
This skill provides comprehensive expertise in building production-ready Next.js applications using the App Router (Next.js 15+). It covers Server Components, React 19 support, data fetching patterns, routing, API routes, caching, and performance optimization.
"use client" directiveloading.tsx fileserror.tsx[param] and catch-all [...slug] patterns(folder) for organization without URL impact@slot for simultaneous route rendering(.), (..), (...)action attributeapp/
├── layout.tsx # Root layout
├── page.tsx # Home page
├── globals.css # Global styles
├── (auth)/ # Route group
│ ├── login/page.tsx
│ └── register/page.tsx
├── dashboard/
│ ├── layout.tsx # Dashboard layout
│ ├── page.tsx # Dashboard home
│ ├── loading.tsx # Loading UI
│ ├── error.tsx # Error boundary
│ └── [id]/page.tsx # Dynamic route
├── api/
│ └── [route]/route.ts # API routes
└── components/ # Shared components
// app/posts/page.tsx
async function PostsPage() {
const posts = await db.posts.findMany()
return (
<ul>
{posts.map(post => (
<li key={post.id}>{post.title}</li>
))}
</ul>
)
}
export default PostsPage
// app/components/counter.tsx
"use client"
import { useState } from "react"
export function Counter() {
const [count, setCount] = useState(0)
return (
<button onClick={() => setCount(c => c + 1)}>
Count: {count}
</button>
)
}
// In Next.js 15+, fetch is uncached by default (implicit cache: 'no-store')
async function Page() {
const data = await fetch('https://api.example.com/data')
return <div>{data}</div>
}
// Explicitly opt into caching
async function Page() {
const data = await fetch('https://api.example.com/data', {
cache: 'force-cache',
})
return <div>{data}</div>
}
async function Page() {
const data = await fetch('https://api.example.com/data', {
next: { revalidate: 3600 }, // Revalidate every hour
})
return <div>{data}</div>
}
Note: The client router cache is also uncached by default in Next.js 15, replacing the old 30s/5m defaults.
// app/actions.ts
"use server"
import { revalidatePath } from "next/cache"
export async function createPost(formData: FormData) {
const title = formData.get("title") as string
await db.posts.create({ data: { title } })
revalidatePath("/posts")
}
// app/posts/new/page.tsx
import { createPost } from "@/app/actions"
export default function NewPost() {
return (
<form action={createPost}>
<input name="title" required />
<button type="submit">Create</button>
</form>
)
}
experimental.ppr: 'incremental' in next.config.js, or use ppr: true when you want full PPR.Suspense boundaries to define dynamic holes inside static shells.// app/page.tsx — static shell with dynamic hole
export const experimental_ppr = true
export default function Page() {
return (
<main>
<StaticHeader />
<Suspense fallback={<ProductSkeleton />}>
<DynamicProductList />
</Suspense>
</main>
)
}
next dev in Next.js 15 and for next build in Next.js 15.3+.next dev --turbopack and next build --turbopack to opt in.next dev --turbopack
next build --turbopack
use() to consume promises and contexts during render.useFormStatus() for form state without prop drilling.useOptimistic() for optimistic UI updates.import { use } from "react"
import { useFormStatus } from "react-dom"
import { useOptimistic } from "react"
function ProductName({ productPromise }: { productPromise: Promise<{ name: string }> }) {
const product = use(productPromise)
return <h1>{product.name}</h1>
}
after() Post-Response Workafter() for post-response work.next/server.import { after } from 'next/server'
after(() => {
logAnalytics()
})
useLinkStatus() helps show inline link-loading indicators.onNavigate lets you track or block client-side navigation.useLinkStatus() is a client hook from next/link and returns { pending }.onNavigate is a Link prop for SPA navigations only.'use client'
import Link, { useLinkStatus } from 'next/link'
function LinkHint() {
const { pending } = useLinkStatus()
return <span aria-hidden>{pending ? 'Loading…' : null}</span>
}
export function Nav() {
return (
<nav>
<Link href="/dashboard" prefetch={false} onNavigate={() => trackNavigation('/dashboard')}>
Dashboard <LinkHint />
</Link>
</nav>
)
}
experimental.ppr: 'incremental' for route-by-route PPR adoption.ppr: true only when you want a fully PPR-enabled app.next.config.js switch.// next.config.ts
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
experimental: {
ppr: 'incremental',
},
// For full PPR:
// ppr: true,
}
export default nextConfig
{
"scripts": {
"dev": "next dev --turbopack",
"build": "next build --turbopack"
}
}
next/imagenext/font for font optimizationThis skill includes executable scripts in the scripts/ folder:
dev-server.sh: Start the development server with hot reloading
./scripts/dev-server.sh [--port PORT] [--turbo]
build-production.sh: Create optimized production build
./scripts/build-production.sh [--analyze]
analyze-bundle.sh: Analyze bundle size and dependencies
./scripts/analyze-bundle.sh
create-page.sh: Generate a new page with optional layout/loading/error files
./scripts/create-page.sh <page-path> [--layout] [--loading] [--error]
create-api-route.sh: Generate API route handlers
./scripts/create-api-route.sh <route-name> [--dynamic]
create-component.sh: Generate React components with optional tests
./scripts/create-component.sh <name> [--client] [--test] [--dir DIR]
setup-testing.sh: Set up Jest and React Testing Library
./scripts/setup-testing.sh [--playwright]
run-tests.sh: Run tests with various options
./scripts/run-tests.sh [--watch] [--coverage] [--file FILE]
This skill includes production-ready templates in the templates/ folder:
This skill includes detailed reference guides in the resources/ folder:
Specialization: Next.js App Router Development Version: 2.0 Last Updated: May 2026