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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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.
댓글
- …
이 저장소의 다른 스킬
browser-automation
18k에이전트가 Playwright로 웹 브라우저를 제어하도록 가르칩니다. CSS 선택자로 버튼, 양식, 링크를 찾습니다.
clip-hand-skill
18k에이전트가 영상 클립을 만들도록 돕습니다. 영상을 내려받고, 음성을 텍스트로 옮기고, 자막 파일을 만들고, ffmpeg로 클립을 자릅니다.
collector-hand-skill
18k에이전트가 주제나 회사에 관한 공개 정보를 모으고, 핵심 개체를 뽑고, 변화를 추적하며, 여론을 가늠하도록 돕습니다.
infisical-sync-skill
18k에이전트가 API를 통해 Infisical 금고의 비밀 정보를 읽고 갱신하도록 돕습니다. 로그인 단계와 명확한 오류 처리를 포함합니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.