create-auth — Claude Code skill: Better Auth setup, install steps
A skill that walks the agent through planning and wiring authentication in a TypeScript/JavaScript app with Better Auth, from codebase scan to sign-in pages.
npx skills add better-auth/skills --skill create-auth -a claude-codeWhat create-auth does
The skill starts by reading the project: framework configs (next.config, svelte.config, nuxt.config, astro.config, vite.config), ORM files such as prisma/schema.prisma and drizzle.config.ts, any auth library already in package.json, and the lockfile that tells it which package manager you use. Whatever it finds becomes a default answer, so fewer questions come your way.
Then the agent asks everything in one AskQuestion call: project type, framework, database and ORM, sign-in methods (password, OAuth, magic link, passkey, phone), social providers, email verification, plugins like 2FA and organizations, which pages you need, and the UI style. Answers turn into a markdown checklist, and no code gets written until you confirm that plan. Implementation branches three ways: a fresh project, adding auth to an existing one, or migrating off another library.
The core install is npm install better-auth, and the CLI runs as npx auth@latest with nothing extra to install. OAuth needs app credentials from each provider, and env vars have to be set in your deploy — the skill covers those closing steps. If next-auth, lucia, clerk or supabase/auth is already in the project, expect the migration branch: the new library goes in alongside the old one, routes move first, then session logic, then the UI.
What it helps with
- add sign-in and sign-up to an existing Next.js app
- pick an ORM and database adapter for Better Auth
- wire up Google and GitHub OAuth providers
- enable 2FA and organizations through plugins
- migrate off another auth library without a full rewrite
Example prompts for the agent
- Add authentication to this project with Better Auth
- Set up email and password plus Google OAuth
- Plan a migration from next-auth to Better Auth
How to install create-auth
1Skills CLI (Vercel)
npx skills add better-auth/skills --skill create-auth -a claude-code2Manually: put the files in place
~/.claude/skills/create-auth/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/create-auth/
1Skills CLI (Vercel)
npx skills add better-auth/skills --skill create-auth -a codex2Manually: put the files in place
.agents/skills/create-auth/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add better-auth/skills --skill create-auth -a cursor2Manually: put the files in place
.cursor/skills/create-auth/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install better-auth/skills create-auth2Manually: put the files in place
.github/skills/create-auth/SKILL.md1Skills CLI (Vercel)
npx skills add better-auth/skills --skill create-auth -a gemini-cli2Platform CLI
gemini skills install https://github.com/better-auth/skills --path better-auth/create-authManually: put the files in place
.devin/skills/create-auth/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add better-auth/skills --skill create-auth -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about create-auth
How do I install create-auth in Claude?
Run npx skills add better-auth/skills --skill create-auth -a claude-code. The skill lands at ~/.claude/skills/create-auth/SKILL.md.
What does create-auth do?
It guides the agent through planning and implementing Better Auth: detecting the framework and database, asking about sign-in methods, producing a plan, then building it step by step.
What should I have ready before running it?
The core install npm install better-auth and OAuth app credentials if you plan social sign-in. Environment variables need to be set in your deploy.