Communitygithub.com

Anhvu1107/all-agent-skill

사용자가 Next.js 모범 사례를 언급하거나, 빌드, 디버그, 리뷰, 문서화, 자동화, 테스트, 설정, 마이그레이션, 또는 이 도메인에서 의사 결정을 요청할 때 항상 사용합니다. Next.js App Router 원칙이 적용 범위입니다. 최종 출력 전에 번들 워크플로우, 참조, 스크립트, Senior Master 표준 및 Codex 엄격 리뷰 게이트를 적용하세요.

all-agent-skill란 무엇인가요?

이 스킬은 Next.js App Router 개발에 대한 포괄적인 모범 사례 가이드입니다. 서버 및 클라이언트 컴포넌트 분할, 데이터 페칭 패턴, 라우팅 원칙, API 라우트, 성능 최적화, 메타데이터 관리, 캐싱 전략, 서버 액션, 안티 패턴 식별 등 Next.js 애플리케이션 구축의 핵심 영역을 다룹니다. 특히 '서버 컴포넌트 우선' 원칙을 강조하며, `next/image`, 동적 임포트, Zod 유효성 검사 등의 모범 사례를 제시합니다. AI 어시스턴트(Claude Code, Cursor 등)에서 사용자가 Next.js 관련 작업을 요청하거나 언급할 때 이 스킬이 자동으로 활성화되어 구조적이고 일관된 코딩 지침을 제공하도록 설계되었습니다. `references/senior-master-standard.md`, `references/usage-routing.md`, `references/quality-checklist.md`와 같은 참조 문서를 우선 로드하고, 실제 작업과 관련된 하위 문서만 선택적으로 로드하는 '선택적 읽기 규칙'을 통해 효율성을 높입니다.

지원 대상~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/nextjs-best-practices

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

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

문서

Next.js 모범 사례

선택적 읽기 규칙

다음부터 시작합니다:

  • references/senior-master-standard.md
  • references/usage-routing.md
  • references/quality-checklist.md

그런 다음 사용자의 실제 작업과 일치하는 상속된 문서, 스크립트, 자산 또는 예제만 로드합니다.

Next.js App Router 개발을 위한 원칙입니다.


1. 서버 vs 클라이언트 컴포넌트

결정 트리

다음이 필요합니까...?
│
├── useState, useEffect, 이벤트 핸들러
│   └── 클라이언트 컴포넌트 ('use client')
│
├── 직접 데이터 가져오기, 상호 작용 없음
│   └── 서버 컴포넌트 (기본값)
│
└── 둘 다?
    └── 분할: 서버 부모 + 클라이언트 자식

기본값

유형사용
서버데이터 가져오기, 레이아웃, 정적 콘텐츠
클라이언트폼, 버튼, 대화형 UI

2. 데이터 페칭 패턴

페치 전략

패턴사용
기본값정적 (빌드 시 캐시됨)
RevalidateISR (시간 기반 새로 고침)
No-store동적 (모든 요청)

데이터 흐름

출처패턴
데이터베이스서버 컴포넌트 페치
API캐싱을 사용한 페치
사용자 입력클라이언트 상태 + 서버 액션

3. 라우팅 원칙

파일 규칙

파일목적
page.tsx라우트 UI
layout.tsx공유 레이아웃
loading.tsx로딩 상태
error.tsx에러 경계
not-found.tsx404 페이지

라우트 구성

패턴사용
라우트 그룹 (name)URL 없이 구성
병렬 라우트 @slot여러 동일 레벨 페이지
인터셉팅 (.)모달 오버레이

4. API 라우트

라우트 핸들러

메서드사용
GET데이터 읽기
POST데이터 생성
PUT/PATCH데이터 업데이트
DELETE데이터 제거

모범 사례

  • Zod로 입력 유효성 검사
  • 적절한 상태 코드 반환
  • 오류를 우아하게 처리
  • 가능한 경우 Edge 런타임 사용

5. 성능 원칙

이미지 최적화

  • next/image 컴포넌트 사용
  • 접히는 부분 위에는 priority 설정
  • 흐릿한 플레이스홀더 제공
  • 반응형 크기 사용

번들 최적화

  • 무거운 컴포넌트에 대한 동적 임포트
  • 라우트 기반 코드 분할 (자동)
  • 번들 분석기로 분석

6. 메타데이터

정적 vs 동적

유형사용
정적 내보내기고정 메타데이터
generateMetadata라우트별 동적

필수 태그

  • title (50-60자)
  • description (150-160자)
  • Open Graph 이미지
  • 표준 URL

7. 캐싱 전략

캐시 레이어

레이어제어
요청fetch 옵션
데이터revalidate/tags
전체 라우트라우트 설정

재검증

메서드사용
시간 기반revalidate: 60
주문형revalidatePath/Tag
캐시 없음no-store

8. 서버 액션

사용 사례

  • 폼 제출
  • 데이터 변이
  • 재검증 트리거

모범 사례

  • 'use server'로 표시
  • 모든 입력 유효성 검사
  • 타입이 지정된 응답 반환
  • 오류 처리

9. 안티 패턴

❌ 하지 말 것✅ 할 것
'use client'를 모든 곳에 사용기본적으로 서버 사용
클라이언트 컴포넌트에서 페치서버에서 페치
로딩 상태 건너뛰기loading.tsx 사용
에러 경계 무시error.tsx 사용
큰 클라이언트 번들동적 임포트

10. 프로젝트 구조

app/
├── (marketing)/     # 라우트 그룹
│   └── page.tsx
├── (dashboard)/
│   ├── layout.tsx   # 대시보드 레이아웃
│   └── page.tsx
├── api/
│   └── [resource]/
│       └── route.ts
└── components/
    └── ui/

기억하세요: 서버 컴포넌트가 기본값인 데는 이유가 있습니다. 거기서 시작하고, 필요할 때만 클라이언트를 추가하세요.

사용 시기

이 스킬은 개요에 설명된 워크플로우 또는 작업을 실행하는 데 적용됩니다.

제한 사항

  • 작업이 위에서 설명한 범위와 명확하게 일치하는 경우에만 이 스킬을 사용하십시오.
  • 출력을 환경별 검증, 테스트 또는 전문가 검토의 대체물로 취급하지 마십시오.
  • 필요한 입력, 권한, 안전 경계 또는 성공 기준이 누락된 경우 중단하고 명확히 질문하십시오.

Individual skills in this repo

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

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Fixing Motion Performance: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches I18n Localization: Internationalization and localization patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Makepad Animation: CRITICAL: Use for Makepad animation system.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

description: ALWAYS use this when the work is specifically about modern Next.js or React architecture, data flow, rendering strategy, routing, or performance-sensitive frontend behavior.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when working with Remotion code, video compositions, rendering logic, timing, media assets, or React-based motion workflows.

관련 스킬