Communitygithub.com

ComeOnOliver/skillshub

올바른 패턴과 독특한 디자인으로 Next.js 16 애플리케이션을 구축합니다. 페이지, 레이아웃, 동적 라우트 생성, Next.js 15에서 업그레이드, 또는 proxy.ts 구현 시 사용하세요. 비호환 변경 사항(async params/searchParams, Turbopack, cacheComponents)과 프론트엔드 미학을 다룹니다. React가 아닌 앱이나 백엔드 전용 앱을 구축할 때는 사용하지 마세요.

skillshub란 무엇인가요?

이 스킬은 Next.js 16 애플리케이션을 올바른 패턴과 독특한 디자인으로 구축하는 데 특화된 AI 에이전트 스킬입니다. Next.js 16의 주요 비호환 변경 사항(async params/searchParams, Turbopack, cacheComponents)을 정확히 처리하고, App Router, 동적 라우트, 서버 액션, API 라우트, proxy.ts 등 핵심 패턴을 안내합니다. Claude, Cursor, Codex 등 다양한 AI 에이전트 플랫폼에서 사용할 수 있으며, SKILL.md 문서를 기반으로 Next.js 16 프로젝트 생성부터 배포까지 전 과정을 지원합니다. 주요 기능으로는 next-devtools-mcp 서버를 통한 실시간 진단 및 개발 자동화, 자동 업그레이드 도구, 브라우저 테스트 자동화 등이 포함되어 있습니다. 이 스킬은 정확한 코드 패턴을 강조하며, 특히 params와 searchParams가 Promise로 변경된 점을 중요하게 다루어 개발자들이 흔히 하는 실수를 방지하도록 설계되었습니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/asmayaseen/building-nextjs-apps

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Next.js 16 애플리케이션

올바른 패턴과 독특한 디자인으로 Next.js 16 애플리케이션을 구축합니다.

중요한 비호환 변경 사항 (Next.js 16)

1. params와 searchParams가 이제 Promise

이것은 가장 흔한 실수입니다.

// 잘못된 예 - Next.js 15 패턴 (실패함)
export default function Page({ params }: { params: { id: string } }) {
  return <div>ID: {params.id}</div>
}

// 올바른 예 - Next.js 16 패턴
export default async function Page({
  params,
}: {
  params: Promise<{ id: string }>
}) {
  const { id } = await params
  return <div>ID: {id}</div>
}

2. 클라이언트 컴포넌트는 use() 훅 필요

"use client"
import { use } from "react"

export default function ClientPage({
  params,
}: {
  params: Promise<{ id: string }>
}) {
  const { id } = use(params)
  return <div>ID: {id}</div>
}

3. searchParams도 비동기

export default async function Page({
  searchParams,
}: {
  searchParams: Promise<{ page?: string }>
}) {
  const { page } = await searchParams
  return <div>Page: {page ?? "1"}</div>
}

핵심 패턴

프로젝트 설정

npx create-next-app@latest my-app --typescript --tailwind --eslint
cd my-app

# shadcn/ui 추가
npx shadcn@latest init
npx shadcn@latest add button form dialog table sidebar

App Router 레이아웃

// app/layout.tsx
export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <body className="min-h-screen">
        {children}
      </body>
    </html>
  )
}

동적 라우트

// app/tasks/[id]/page.tsx
export default async function TaskPage({
  params,
}: {
  params: Promise<{ id: string }>
}) {
  const { id } = await params
  const task = await getTask(id)

  return (
    <main>
      <h1>{task.title}</h1>
    </main>
  )
}

서버 액션

// app/actions.ts
"use server"

import { revalidatePath } from "next/cache"

export async function createTask(formData: FormData) {
  const title = formData.get("title") as string

  await db.insert(tasks).values({ title })

  revalidatePath("/tasks")
}

// 컴포넌트에서 사용
<form action={createTask}>
  <input name="title" />
  <button type="submit">Create</button>
</form>

API 라우트

// app/api/tasks/route.ts
import { NextResponse } from "next/server"

export async function GET() {
  const tasks = await db.select().from(tasksTable)
  return NextResponse.json(tasks)
}

export async function POST(request: Request) {
  const body = await request.json()
  const task = await db.insert(tasksTable).values(body).returning()
  return NextResponse.json(task, { status: 201 })
}

미들웨어 → proxy.ts

// proxy.ts (Next.js 16에서 middleware.ts를 대체)
import { NextRequest } from "next/server"

export function proxy(request: NextRequest) {
  // 인증 확인
  const token = request.cookies.get("token")
  if (!token && request.nextUrl.pathname.startsWith("/dashboard")) {
    return Response.redirect(new URL("/login", request.url))
  }
}

export const config = {
  matcher: ["/dashboard/:path*"],
}

데이터 가져오기

서버 컴포넌트 (기본)

// 서버에서 실행됨 - async/await 직접 사용 가능
async function TaskList() {
  const tasks = await fetch("https://api.example.com/tasks", {
    cache: "no-store", // SSR, 또는
    // next: { revalidate: 60 } // ISR
  }).then(r => r.json())

  return (
    <ul>
      {tasks.map(task => <li key={task.id}>{task.title}</li>)}
    </ul>
  )
}

클라이언트 컴포넌트

"use client"

import useSWR from "swr"

const fetcher = (url: string) => fetch(url).then(r => r.json())

export function ClientTaskList() {
  const { data, error, isLoading } = useSWR("/api/tasks", fetcher)

  if (isLoading) return <div>Loading...</div>
  if (error) return <div>Error loading tasks</div>

  return (
    <ul>
      {data.map(task => <li key={task.id}>{task.title}</li>)}
    </ul>
  )
}

프로젝트 구조

app/
├── layout.tsx           # 루트 레이아웃
├── page.tsx             # 홈 페이지
├── globals.css          # 전역 스타일
├── api/                 # API 라우트
│   └── tasks/route.ts
├── tasks/
│   ├── page.tsx         # /tasks
│   └── [id]/page.tsx    # /tasks/:id
├── actions.ts           # 서버 액션
└── proxy.ts             # 요청 프록시 (미들웨어)
components/
├── ui/                  # shadcn/ui 컴포넌트
└── task-list.tsx        # 앱 컴포넌트
lib/
├── db.ts                # 데이터베이스 연결
└── utils.ts             # 유틸리티

Next.js DevTools MCP

런타임 진단 및 개발 자동화를 위해 next-devtools-mcp 서버를 사용하세요.

설정

claude mcp add next-devtools npx next-devtools-mcp@latest

또는 settings.json 파일:

{
  "mcpServers": {
    "next-devtools": {
      "type": "stdio",
      "command": "npx",
      "args": ["next-devtools-mcp@latest"]
    }
  }
}

사용 가능한 도구

도구목적
init사용 가능한 도구 및 모범 사례에 대한 컨텍스트 설정
nextjs_docs공식 Next.js 문서 검색 및 가져오기
browser_evalPlaywright로 브라우저 테스트 자동화
nextjs_index실행 중인 Next.js 개발 서버 검색
nextjs_call실행 중인 개발 서버에서 MCP 도구 실행
upgrade_nextjs_16Codemod를 통한 자동 업그레이드
enable_cache_componentsNext.js 16용 Cache Components 구성

주요 사용 사례

1. 실시간 오류 확인

"내 Next.js 앱에 어떤 빌드 오류가 있나요?"
"현재 프로젝트의 TypeScript 오류를 보여주세요"

2. 런타임 문제 디버깅

"개발 서버 로그에서 오류를 확인하세요"
"대시보드 페이지에서 어떤 런타임 오류가 발생하나요?"

3. 업그레이드 지원

"이 프로젝트를 Next.js 16으로 업그레이드하세요"
"이 앱에 캐시 컴포넌트를 활성화하세요"

4. 문서 검색

"Next.js 16에서 Image 컴포넌트를 어떻게 사용하나요?"
"동적 라우트를 처리하는 올바른 방법은 무엇인가요?"

Next.js 16 MCP 엔드포인트

Next.js 16+는 http://localhost:3000/_next/mcp (또는 개발 서버 포트)에 내장 MCP 엔드포인트를 노출합니다. devtools MCP는 실행 중인 서버를 자동으로 검색하고 연결합니다.


검증

실행: python3 scripts/verify.py

예상 결과: ✓ building-nextjs-apps skill ready

검증 실패 시

  1. 확인: references/ 폴더에 nextjs-16-patterns.md 파일이 있는지 확인하세요
  2. 계속 실패하면 중단하고 보고하세요

관련 스킬

  • styling-with-shadcn - Next.js 앱용 UI 컴포넌트
  • fetching-library-docs - 최신 Next.js 문서: --library-id /vercel/next.js --topic routing
  • configuring-better-auth - Next.js 앱용 OAuth/SSO

참고 자료

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Next.js 16+ uses App Router with Server Components by default. Client Components are only used when interactivity is needed (hooks, event handlers, browser APIs).

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬