Communitygithub.com

Geruyang/agent-skills-library

Next.js App Router 전문가 가이드. Next.js 애플리케이션을 빌드, 디버깅 또는 설계할 때 — 라우팅, 서버 컴포넌트, 서버 액션, 캐시 컴포넌트, 레이아웃, 미들웨어/프록시, 데이터 가져오기, 렌더링 전략, Vercel 배포에 이르기까지 사용합니다.

agent-skills-library란 무엇인가요?

이 스킬은 Next.js App Router를 사용하는 프로젝트에서 개발자가 자주 마주치는 다양한 주제에 대한 모범 사례를 제공합니다. 라우팅, 서버 컴포넌트 경계, 비동기 패턴, 런타임 선택, 데이터 가져오기, 에러 처리, 이미지 및 폰트 최적화, 번들링, 하이드레이션 오류 디버깅 등 20개 이상의 세부 문서를 참조합니다. 각 문서는 실제 코드 예제와 함께 구체적인 규칙과 주의사항을 설명하여 AI 에이전트가 정확한 코드를 생성하도록 돕습니다. 이 스킬은 Claude Code, Cursor, Codex 등 다양한 AI 코딩 도구와 호환되며, SKILL.md에 정의된 규칙을 기반으로 AI 어시스턴트가 일관된 Next.js 코드를 작성하도록 안내합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Geruyang/agent-skills-library/tree/HEAD/original-skills/x-openai-nextjs-0babc94

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

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

문서

Next.js 모범 사례

Next.js 코드를 작성하거나 검토할 때 다음 규칙을 적용하세요.

파일 규칙

자세한 내용은 file-conventions.md를 참조하세요:

  • 프로젝트 구조 및 특수 파일
  • 라우트 세그먼트 (동적, 포괄적, 그룹)
  • 병렬 및 인터셉팅 라우트
  • v16에서 미들웨어 이름 변경 (middleware → proxy)

RSC 경계

잘못된 React 서버 컴포넌트 패턴을 감지합니다.

자세한 내용은 rsc-boundaries.md를 참조하세요:

  • 비동기 클라이언트 컴포넌트 감지 (잘못됨)
  • 직렬화 불가능한 props 감지
  • 서버 액션 예외 처리

비동기 패턴

Next.js 15+ 비동기 API 변경 사항.

자세한 내용은 async-patterns.md를 참조하세요:

  • 비동기 params 및 searchParams
  • 비동기 cookies() 및 headers()
  • 마이그레이션 codemod

런타임 선택

자세한 내용은 runtime-selection.md를 참조하세요:

  • 기본적으로 Node.js 런타임 사용
  • Edge 런타임이 적합한 경우

지시문

자세한 내용은 directives.md를 참조하세요:

  • 'use client', 'use server' (React)
  • 'use cache' (Next.js)

함수

자세한 내용은 functions.md를 참조하세요:

  • 탐색 훅: useRouter, usePathname, useSearchParams, useParams
  • 서버 함수: cookies, headers, draftMode, after
  • 생성 함수: generateStaticParams, generateMetadata

에러 처리

자세한 내용은 error-handling.md를 참조하세요:

  • error.tsx, global-error.tsx, not-found.tsx
  • redirect, permanentRedirect, notFound
  • forbidden, unauthorized (인증 에러)
  • catch 블록에서 unstable_rethrow

데이터 패턴

자세한 내용은 data-patterns.md를 참조하세요:

  • 서버 컴포넌트 vs 서버 액션 vs 라우트 핸들러
  • 데이터 워터폴 방지 (Promise.all, Suspense, preload)
  • 클라이언트 컴포넌트 데이터 가져오기

라우트 핸들러

자세한 내용은 route-handlers.md를 참조하세요:

  • route.ts 기본 사항
  • page.tsx와 GET 핸들러 충돌
  • 환경 동작 (React DOM 없음)
  • 서버 액션 대비 사용 시기

메타데이터 및 OG 이미지

자세한 내용은 metadata.md를 참조하세요:

  • 정적 및 동적 메타데이터
  • generateMetadata 함수
  • next/og를 사용한 OG 이미지 생성
  • 파일 기반 메타데이터 규칙

이미지 최적화

자세한 내용은 image.md를 참조하세요:

  • 항상 <img> 대신 next/image 사용
  • 원격 이미지 구성
  • 반응형 sizes 속성
  • 블러 플레이스홀더
  • LCP를 위한 우선 로딩

폰트 최적화

자세한 내용은 font.md를 참조하세요:

  • next/font 설정
  • Google Fonts, 로컬 폰트
  • Tailwind CSS 통합
  • 서브셋 사전 로드

번들링

자세한 내용은 bundling.md를 참조하세요:

  • 서버 비호환 패키지
  • CSS 임포트 (link 태그 아님)
  • 폴리필 (이미 포함됨)
  • ESM/CommonJS 문제
  • 번들 분석

스크립트

자세한 내용은 scripts.md를 참조하세요:

  • next/script vs 네이티브 script 태그
  • 인라인 스크립트에는 id 필요
  • 로딩 전략
  • @next/third-parties를 사용한 Google Analytics

하이드레이션 에러

자세한 내용은 hydration-error.md를 참조하세요:

  • 일반적인 원인 (브라우저 API, 날짜, 잘못된 HTML)
  • 에러 오버레이로 디버깅
  • 각 원인에 대한 수정 방법

Suspense 경계

자세한 내용은 suspense-boundaries.md를 참조하세요:

  • useSearchParams 및 usePathname을 사용한 CSR 전환
  • Suspense 경계가 필요한 훅

병렬 및 인터셉팅 라우트

자세한 내용은 parallel-routes.md를 참조하세요:

  • @slot 및 (.) 인터셉터를 사용한 모달 패턴
  • 폴백을 위한 default.tsx
  • router.back()을 사용하여 모달을 올바르게 닫기

자체 호스팅

자세한 내용은 self-hosting.md를 참조하세요:

  • Docker를 위한 output: 'standalone'
  • 다중 인스턴스 ISR을 위한 캐시 핸들러
  • 작동하는 것과 추가 설정이 필요한 것

디버그 팁

자세한 내용은 debug-tricks.md를 참조하세요:

  • AI 지원 디버깅을 위한 MCP 엔드포인트
  • --debug-build-paths로 특정 라우트 재빌드

Individual skills in this repo

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

Geruyang/agent-skills-library

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

Geruyang/agent-skills-library

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

Geruyang/agent-skills-library

Use for new frontend applications, dashboards, games, creative websites, hero sections, and visually driven UI from scratch, or when the user explicitly asks for a redesign/restyle/modernization. Builds from clean, airy, high-taste, readable image-generated concept design with section-specific references, faithful implementation, and browser testing.

Geruyang/agent-skills-library

Use when testing, debugging, or making targeted improvements to rendered frontend apps through the Build Web Apps or web dev plugin: local dev servers, UI regressions, interaction bugs, console errors, responsive layout, and visual QA. Check whether the Browser plugin is available and use it first when it is; otherwise use regular Playwright with the recorded reason.

Geruyang/agent-skills-library

Design UI surfaces for browser games. Use when the user asks for HUDs, menus, overlays, responsive layouts, or visual direction that must protect the playfield.

Geruyang/agent-skills-library

GSAP animation reference for HyperFrames. Covers gsap.to(), from(), fromTo(), easing, stagger, defaults, timelines (gsap.timeline(), position parameter, labels, nesting, playback), and performance (transforms, will-change, quickTo). Use when writing GSAP animations in HyperFrames compositions.

Geruyang/agent-skills-library

Guide for building, configuring, and deploying microfrontends on Vercel. Use this skill when the user mentions microfrontends, multi-zones, splitting an app across teams, independent deployments, cross-app routing, incremental migration, composing multiple frontends under one domain, microfrontends.json, @vercel/microfrontends, the microfrontends local proxy, or path-based routing between Vercel projects. Also use when the user asks about shared layouts across projects, navigation between microfrontends, fallback environments, asset prefixes, or feature flag controlled routing.

Geruyang/agent-skills-library

Use when sizing Public Equity Investing positions, finding equity hedges, or building an integrated position-and-hedge risk plan from a listed-equity thesis. Do not use for thesis construction, standalone event underwriting, trade execution, personal investment advice, or credit-instrument risk.

Geruyang/agent-skills-library

Integrate data visualizations into React and Next.js applications. Use when the user needs chart components, UML-like or architecture diagram components, React integration patterns, Next.js client or server boundaries, hydration-safe rendering, lazy loading, framework-aware performance, scroll-driven visual stories, or export guidance.

Geruyang/agent-skills-library

shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring themes, or troubleshooting component issues.

Geruyang/agent-skills-library

v0 by Vercel expert guidance. Use when discussing AI code generation, generating UI components from prompts, v0 CLI usage, v0 SDK/API integration, or integrating v0 into development workflows with GitHub and Vercel deployment.

Geruyang/agent-skills-library

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".

관련 스킬