スキル next-js-better-auth-integration
📦

next-js-better-auth-integration

v1.0.0 安全

Next.js に Better Auth を統合する

App Router プロジェクトにおける認証は、多くの場合、server components、middleware、sessions、client state にまたがります。このスキルは、Better Auth パターンを実装するための焦点を絞ったチェックリストを Claude、Codex、Claude Code に提供します。

対応: Claude Codex Code(CC)
🥈 80 シルバー
1

スキルの ZIP をダウンロード

2

Claudeでアップロード

設定 → 機能 → スキル → スキルをアップロード に移動

3

オンにして使い始める

エージェントが読めるリソース

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 前に確認すべきギャップ。

セキュリティ監査

安全
v6 • 6/28/2026

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.

1
スキャンされたファイル
170
解析済み行数
0
Review items
3
False positives ignored
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.

False Positive: Secure Cookie Guidance
The static analyzer flagged browser credential files at SKILL.md:142. The line recommends secure, HTTP-only cookies for sessions, which is defensive authentication guidance and does not access browser credential files.
The line contains a secure cookie recommendation only. No filesystem path, browser profile access, or credential extraction behavior appears in the skill.
False Positive: Weak Cryptographic Algorithm
The static analyzer flagged weak cryptography at SKILL.md:7. The line is frontmatter description text for a conceptual Better Auth integration skill and does not name or configure a cryptographic algorithm.
The flagged line is plain metadata text. There is no MD5, SHA-1, DES, or other weak algorithm configuration at that location.
False Positive: Network Reconnaissance
The static analyzer flagged network reconnaissance at SKILL.md:122. The line advises using server components for server-side session access and does not describe port scanning, probing, or network enumeration.
The surrounding context is App Router integration guidance. No command, endpoint list, scanner, or reconnaissance workflow is present.
セキュリティ問題は見つかりませんでした
監査者: codex 監査履歴を表示 →

品質スコア

55
アーキテクチャ
100
保守性
87
コンテンツ
70
コミュニティ
100
セキュリティ
83
仕様準拠

作成できるもの

新しいアプリに認証を追加する

実装コードを書く前に、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 Routes を設計する
このスキルを使用して、次のページの protected route behavior を設計してください: dashboard, settings, and billing. unauthenticated redirects と session checks を含めてください。
Session Security をレビューする
このスキルを使用して、私が計画している Better Auth session strategy をレビューしてください。cookies、JWT expiration、CSRF protection、rate limiting、secret handling に焦点を当ててください。
Auth Migration Plan を作成する
このスキルを使用して、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 をリリースしないでください。

よくある質問

このスキルは完全な Better Auth 実装を生成しますか?
いいえ。実装の計画とレビューのための構造化されたガイダンスを提供します。
これは Next.js Pages Router 向けですか?
いいえ。このスキルは Next.js App Router プロジェクトに焦点を当てています。
protected routes に役立ちますか?
はい。middleware、server-side checks、redirects、session state handling をカバーします。
social login はカバーしていますか?
はい。認証計画フローの一部として provider configuration を含みます。
本番環境のセキュリティレビューの代わりになりますか?
いいえ。Production settings、provider configuration、secrets については、引き続き人間によるレビューが必要です。
どの AI tools がこのスキルを使用できますか?
Claude、Codex、Claude Code 向けとしてマークされています。

開発者情報

ファイル構成

📄 SKILL.md