Add authentication with Better Auth
Adds Better Auth to a JS/TS app: scans the stack, asks planning questions, gets a plan approved, then writes config, route handler, migrations, plugins and sign-in pages, or migrates from another auth library. Use when adding login to a project.
better-auth-create-auth- Author
- Better Auth
- Source
- better-auth/skills/better-auth/create-auth @ 20c9e88
- License
- none stated
About this skill
What it does
The skill adds Better Auth to a TypeScript or JavaScript app and writes no code until you approve a plan. It scans the project for the framework, the database and ORM, an existing auth library such as next-auth or Clerk, and the package manager, then asks what is still open in one AskQuestion call plus follow-ups: project type, framework, database, sign-in methods and social providers, email verification and mail sending (Resend or a console.log mock), extras such as 2FA or organizations, pages and their style. The answers become a checklist you confirm.
Implementation takes one of three branches: a new project, auth added to an existing one, or a migration that installs Better Auth beside the old library, moves routes, then sessions, then UI, and removes the old library last. It ends with the steps left to you, such as OAuth app credentials and production env vars.
The rest is reference: scoped packages such as @better-auth/passkey and @better-auth/sso, route handlers for five frameworks (Next.js with both routers), migration commands per adapter (drizzle-kit push for development only), a nine-item security checklist and a troubleshooting table. The folder holds only SKILL.md; the app needs BETTER_AUTH_SECRET, BETTER_AUTH_URL, DATABASE_URL and the chosen OAuth keys.
When to use it, and when not
Use it to add sign-in to a new or existing JS/TS project, or to move off another auth library.
For one setting in a working Better Auth the planning round is overhead; setup and best practices answers directly. Backends in other languages are out of scope.
How to run it
We do not copy this skill: the author's repository has no licence. Install it from there with the button to the source. The repository's .claude-plugin/marketplace.json defines a Claude Code plugin, auth-skills, holding this skill and best-practices: claude plugin marketplace add better-auth/skills, then claude plugin install auth-skills@better-auth-agent-skills. The skill may then appear as auth-skills:create-auth. For other agents, copy the better-auth/create-auth folder. The name is create-auth:
- Claude Code:
/create-auth, or ask for the skill by name. - Codex:
$create-auth. - Cursor: type
/in the Agent chat and pickcreate-auth.
Example: /create-auth Add email and GitHub sign-in to this Next.js app on Drizzle and Postgres, with sign-in and sign-up pages.
How it differs from similar skills
Neon Auth first decides whether to keep the current provider, then sets up Better Auth managed by Neon; this skill installs it in your own app and database. The pack's two-factor and organizations skills build out what this one only switches on. It imports plugins from better-auth/plugins; setup and best practices asks for dedicated paths like better-auth/plugins/two-factor.
Install
This skill is not copied to the catalog: the author's repository has no licence text. Install it from there.
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel