next-js-better-auth-integration
Next.js に Better Auth を統合する
App Router プロジェクトにおける認証は、多くの場合、server components、middleware、sessions、client state にまたがります。このスキルは、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 plan。
- cookies、CSRF、secrets、rate limiting をカバーするセキュリティチェックリスト。
「next-js-better-auth-integration」を使用しています。 私の protected route strategy をレビューする。
期待される結果:
- server-side と client-side の session checks の評価。
- unauthenticated users 向けの redirect behavior。
- 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 のセットアップ、session context、protected pages を計画します。
認証アーキテクチャをレビューする
session handling、redirects、token behavior、cookie settings がカバーされているかを確認します。
実装タスクを準備する
認証要件を App Router、middleware、UI states 向けの焦点を絞った作業項目に変換します。
これらのプロンプトを試す
このスキルを使用して、私の Next.js App Router プロジェクト向けの Better Auth セットアップ手順を概説してください。必要なファイル、session flow、environment variables を含めてください。
このスキルを使用して、次のページの protected route behavior を設計してください: dashboard, settings, and billing. unauthenticated redirects と session checks を含めてください。
このスキルを使用して、私が計画している Better Auth session strategy をレビューしてください。cookies、JWT expiration、CSRF protection、rate limiting、secret handling に焦点を当ててください。
このスキルを使用して、social login と protected server components を備えた Next.js App Router アプリで、custom auth から Better Auth への段階的な migration plan を作成してください。
ベストプラクティス
- routes を変更する前に、session と provider requirements から始めてください。
- authentication secrets は管理された environment variables に保持してください。
- expired sessions、invalid tokens、unauthenticated access paths をテストしてください。
回避
- session tokens を安全でない client-side storage に保存しないでください。
- client-side checks だけで pages を保護しないでください。
- rate limiting と CSRF review なしで authentication flows をリリースしないでください。