next-js-better-auth-integration
Next.js에서 Better Auth 통합하기
App Router 프로젝트의 인증은 서버 컴포넌트, middleware, 세션, 클라이언트 상태 전반에 걸쳐 있는 경우가 많습니다. 이 스킬은 Better Auth 패턴을 구현하기 위한 집중 체크리스트를 Claude, Codex, Claude Code에 제공합니다.
스킬 ZIP 다운로드
Claude에서 업로드
설정 → 기능 → 스킬 → 스킬 업로드로 이동
토글을 켜고 사용 시작
에이전트가 읽기 쉬운 리소스
AI 에이전트, 크롤러, 스크립트가 전체 페이지 대신 정리된 컨텍스트만 필요할 때 이 링크를 사용하세요.
테스트해 보기
"next-js-better-auth-integration" 사용 중입니다. 새 App Router 프로젝트를 위한 Better Auth 통합을 계획하세요.
예상 결과:
- auth configuration, provider setup, session context를 위한 권장 설정 순서.
- public pages와 private pages를 위한 route protection 계획.
- cookies, CSRF, secrets, rate limiting을 다루는 보안 체크리스트.
"next-js-better-auth-integration" 사용 중입니다. 내 protected route 전략을 검토하세요.
예상 결과:
- 서버 측 및 클라이언트 측 세션 검사 평가.
- 인증되지 않은 사용자를 위한 redirect 동작.
- production release 전에 확인해야 할 공백.
보안 감사
안전Reviewed the three static findings in SKILL.md and found no confirmed malicious or unsafe behavior. The flagged lines are descriptive authentication guidance, not executable code, credential access, weak cryptography, or network reconnaissance. No prompt injection attempt or data exfiltration intent was found.
Static false positives ignored (3)
These static matches were dismissed by semantic review or matched schema-only tokens, so they are shown for transparency but do not drive the quality score.
품질 점수
만들 수 있는 것
새 앱에 인증 추가
구현 코드를 작성하기 전에 Better Auth 설정, 세션 컨텍스트, 보호된 페이지를 계획합니다.
인증 아키텍처 검토
세션 처리, redirects, 토큰 동작, cookie settings가 포함되어 있는지 확인합니다.
구현 작업 준비
인증 요구 사항을 App Router, middleware, UI 상태를 위한 집중 작업 항목으로 변환합니다.
이 프롬프트를 사용해 보세요
이 스킬을 사용하여 내 Next.js App Router 프로젝트의 Better Auth 설정 단계를 개요로 정리하세요. 필요한 파일, 세션 흐름, 환경 변수를 포함하세요.
이 스킬을 사용하여 dashboard, settings, billing 페이지의 protected route 동작을 설계하세요. 인증되지 않은 사용자의 redirects와 세션 검사를 포함하세요.
이 스킬을 사용하여 내가 계획한 Better Auth 세션 전략을 검토하세요. cookies, JWT expiration, CSRF protection, rate limiting, secret handling에 집중하세요.
이 스킬을 사용하여 social login과 protected server components가 있는 Next.js App Router 앱에서 custom auth를 Better Auth로 전환하는 단계별 마이그레이션 계획을 작성하세요.
모범 사례
- routes를 변경하기 전에 세션 및 provider 요구 사항부터 시작하세요.
- 인증 secrets는 관리형 환경 변수에 보관하세요.
- 만료된 세션, 유효하지 않은 토큰, 인증되지 않은 접근 경로를 테스트하세요.
피하기
- session tokens를 안전하지 않은 클라이언트 측 저장소에 저장하지 마세요.
- 클라이언트 측 검사만으로 페이지를 보호하지 마세요.
- rate limiting과 CSRF review 없이 인증 흐름을 배포하지 마세요.