본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)18k · #10692

nextjs-expert

하는 일

이 스킬은 App Router, 서버 컴포넌트, 데이터 가져오기, 캐싱, 배포를 포함해 Next.js로 웹 앱을 만드는 방법을 안내합니다. 빠르고 검색에 친화적인 웹사이트와 웹 앱을 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓새 Next.js 앱을 시작하거나 기존 앱을 App Router로 옮길 때.
  • ✓페이지가 느리고 클라이언트 측 자바스크립트를 줄이고 싶을 때.
  • ✓Next.js 프로젝트에 API 라우트나 미들웨어가 필요할 때.

스킬 링크

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/nextjs-expert/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/nextjs-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“서버에서 제품 데이터를 불러오고, 가져오는 동안 로딩 상태를 보여 주는 Next.js App Router 페이지를 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 기본으로 서버 컴포넌트, 폴더 기반 라우트, 로딩 및 오류 경계, 라우트 핸들러를 권장하며, 정적 또는 요청 시 렌더링 옵션도 제시합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Next.js Expert

A seasoned Next.js architect with deep expertise in the App Router paradigm, server-side rendering strategies, and production deployment patterns. This skill provides guidance on building performant, SEO-friendly web applications using Next.js 14+ conventions, including Server Components, Streaming, and the full spectrum of data fetching and caching mechanisms.

Key Principles

  • Prefer Server Components by default; only add "use client" when the component requires browser APIs, event handlers, or React state
  • Leverage the app/ directory structure where each folder segment maps to a URL route, using layout.tsx for shared UI and page.tsx for unique content
  • Design data fetching at the server layer using async Server Components and fetch with Next.js caching semantics
  • Use generateStaticParams for static pre-rendering of dynamic routes at build time, falling back to on-demand ISR for long-tail pages
  • Keep client bundles small by pushing logic into Server Components and using dynamic imports for heavy client-only libraries

Techniques

  • Structure routes with app/[segment]/page.tsx, using route groups (parentheses) to organize without affecting URL paths
  • Implement loading.tsx and error.tsx boundaries at each route segment to provide instant loading states and graceful error recovery
  • Use Route Handlers (app/api/.../route.ts) with exported GET, POST, PUT, DELETE functions for API endpoints
  • Configure middleware in middleware.ts at the project root with a matcher config to intercept requests for auth, redirects, or header injection
  • Optimize images with next/image (automatic srcSet, lazy loading, AVIF/WebP) and fonts with next/font (zero layout shift, self-hosted subsets)
  • Enable ISR by returning revalidate values from fetch calls or using revalidatePath/revalidateTag for on-demand cache invalidation
  • Set up next.config.js with redirects, rewrites, headers, and the experimental options appropriate to your deployment target

Common Patterns

  • Parallel Routes: Use @named slots in layouts to render multiple page-level components simultaneously, enabling dashboards and split views
  • Intercepting Routes: Place (..) convention routes to show modals on navigation while preserving the direct URL as a full page
  • Server Actions: Define async functions with "use server" for form submissions and mutations without building separate API routes
  • Streaming with Suspense: Wrap slow data-fetching components in Suspense boundaries to stream HTML progressively and improve TTFB

Pitfalls to Avoid

  • Do not use useEffect for data fetching in Server Components; fetch directly in the component body or use server-side utilities
  • Do not place "use client" at the layout level unless every child truly requires client interactivity, as this opts out the entire subtree from server rendering
  • Do not confuse the Pages Router (pages/ directory) patterns with App Router conventions; they have different data fetching and routing models
  • Do not skip setting proper cache headers and revalidation times, as stale data and unnecessary re-renders degrade both performance and user experience
자주 묻는 질문

서버 컴포넌트란 무엇인가요?

서버에서 실행되는 컴포넌트이므로, 브라우저에 추가 코드를 보내지 않고도 데이터를 가져올 수 있습니다.

use client는 언제 추가하나요?

스킬의 설명처럼, 컴포넌트가 브라우저 기능, 이벤트 핸들러, React 상태를 필요로 할 때만 추가합니다.

loading.tsx와 error.tsx는 무엇을 하나요?

라우트가 불러와지는 동안 로딩 상태를 보여 주고, 무언가 실패하면 친절한 메시지를 보여 줍니다.

상세 정보

작성자의 원본 설명

Next.js expert for App Router, SSR/SSG, API routes, middleware, and deployment

repo: RightNow-AI/openfang

인기도

GitHub 스타
18k
순위
#10692
라이선스
Apache-2.0
업데이트
2026. 7. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬