Protect your Next.js actions with Better Auth.
Guides adding authentication and authorization to Next.js safe actions with typed user and session context.
When to use it
Use when adding authentication or authorization to safe actions with Better Auth.
It changes how the agent implements authenticated safe actions, favoring the Better Auth adapter over manual middleware.
What you provide
Uses next-safe-action to create the action client extended by the authentication adapter.
Requires Next.js; the default unauthorized() behavior requires experimental.authInterrupts to be enabled.
This skill
npm install @next-safe-action/adapter-better-auth better-auth
Installs Better Auth integration packages