跳到正文
cccskills
免费在 GitHub 公开

nextjs-developer

Build Next.js 14+ applications with App Router, server-rendered components, and form actions. Produces routes, page layouts, data fetching, loading and error states, and SEO metadata, while supporting performance optimization and deployment preparation.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

集成工具Vercel
查看安装方法

适用场景

  • Building pages and layouts with App Router
  • Implementing form submissions with Server Actions
  • Adding loading states, error handling, and SEO metadata
  • Optimizing an application and preparing Vercel deployment

包含的文件(6)

  • SKILL.md5.6 KB
  • references/app-router.md6.7 KB
  • references/data-fetching.md10.1 KB
  • references/deployment.md10.4 KB
  • references/server-actions.md9.4 KB
  • references/server-components.md8.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

  1. Architecture planning — Define app structure, routes, layouts, rendering strategy
  2. Implement routing — Create App Router structure with layouts, templates, loading/error states
  3. Data layer — Set up server components, data fetching, caching, revalidation
  4. Optimize — Images, fonts, bundles, streaming, edge runtime
  5. Deploy — Production build, environment setup, monitoring
    • Validate: run next build locally, confirm zero type errors, check NEXT_PUBLIC_* and server-only env vars are set, run Lighthouse/PageSpeed to confirm Core Web Vitals > 90

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
App Routerreferences/app-router.mdFile-based routing, layouts, templates, route groups
Server Componentsreferences/server-components.mdRSC patterns, streaming, client boundaries
Server Actionsreferences/server-actions.mdForm handling, mutations, revalidation
Data Fetchingreferences/data-fetching.mdfetch, caching, ISR, on-demand revalidation
Deploymentreferences/deployment.mdVercel, 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 fetch with explicit cache / next.revalidate options — do not rely on implicit caching
  • Use generateMetadata (or the static metadata export) 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.tsx and error.tsx at 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.tsx boundaries on async route segments
  • Deploy without running next build to 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:

  1. App structure (route organization)
  2. Layout/page components with proper data fetching
  3. Server actions if mutations needed
  4. Configuration (next.config.js, TypeScript)
  5. 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

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Build Angular 17+ applications with standalone components, routing, and shared application state. Covers reactive data handling with RxJS, performance improvements, and unit and integration tests, with code and explanations of architecture choices.

中文简介正在准备中。当前显示英语简介。

  • Building Angular screens with standalone components
  • Managing shared application state with NgRx
  • Configuring lazy-loaded routes and access guards
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design REST or GraphQL APIs by defining data relationships, requests, responses, and authentication. Produce OpenAPI specifications, machine-readable API descriptions, with consistent errors, pagination, and versioning plans, then validate contracts using a mock server.

中文简介正在准备中。当前显示英语简介。

  • Designing a new API from business requirements
  • Creating and validating OpenAPI specifications
  • Standardizing errors and paginated responses
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design or review a system’s overall structure, compare technology choices, and plan for growth and failures. Produce architecture diagrams and Architecture Decision Records, documents that explain key choices, alternatives, and their consequences.

中文简介正在准备中。当前显示英语简介。

  • Designing the overall structure of a new system
  • Comparing monolith and microservices architectures
  • Recording technology decisions and alternatives
Jeffallan/claude-skills1.2万2026年10月17日 更新

Connect AI agents to Jira and Confluence through MCP, a protocol for accessing external tools. This skill guides issue searches and updates, page management, sprint workflows, authentication setup, and troubleshooting of Atlassian integrations.

中文简介正在准备中。当前显示英语简介。

  • Find Jira issues by assignee or status
  • Search and update Confluence pages
  • Turn meeting notes into Jira ticket updates
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design controlled failure experiments for distributed systems to examine how services recover. Produce failure injection scripts, monitoring plans, rollback procedures, and exercise guides, then turn findings into documented improvements.

中文简介正在准备中。当前显示英语简介。

  • Planning controlled failure experiments
  • Testing recovery after Kubernetes Pod failures
  • Checking service behavior under network delays
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design and implement command-line tools with subcommands, options, interactive prompts, and progress indicators. Get command structures, configuration handling, clear error messages, and shell completion scripts, with guidance for automated use and testing across operating systems.

中文简介正在准备中。当前显示英语简介。

  • Build a command-line tool with subcommands and options
  • Add interactive prompts and progress indicators
  • Provide bash, zsh, and fish command completion
Jeffallan/claude-skills1.2万2026年10月17日 更新

查看 Jeffallan 的全部技能

报告此技能的问题