Better Auth create-auth skill for Claude Code: add login to a project
Makes Claude scan your project, ask planning questions, then add Better Auth login and sign-up to your app.
- Installs
- 13.9K
- on skills.sh
- Stars
- 228
- on GitHub
- Updated
- Oct 2026
- last repo commit
create-auth makes Claude add authentication with Better Auth in two phases. Phase 1 is planning: Claude scans your project for the framework, database, existing auth library and package manager, then asks up to ten questions with the AskQuestion tool and writes a plan you must confirm. Phase 2 is the build, and it only starts after you confirm.
The build covers install, auth.ts, the client, the route handler, environment variables, database migrations, plugins and sign-in pages. The skill's frontmatter name is create-auth. It bundles no scripts, and the commands it runs are listed in the permissions section.
Good for
- Developers adding login or sign-up to a new or existing project
- Teams migrating from NextAuth, Lucia, Clerk, Supabase Auth or Firebase Auth
- Builders who want auth pages, OAuth and 2FA set up in one pass
Install create-auth
Claude Code
- 1
Copy this prompt.
Install the create-auth skill in Claude Code. Run this command: /plugin marketplace add better-auth/skills /plugin install auth-skills@better-auth-agent-skills Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin route installs the auth-skills plugin from the repo's marketplace manifest, which lists two skills: create-auth and best-practices. The manifest lists no hooks, agents or MCP servers. The other four skills in the repo (security, emailAndPassword, organization, twoFactor) are not in that plugin. The skills CLI and folder routes install just this skill. The repo has no README, so these routes come from the manifest and the skills CLI, not from author instructions.
Built from the package data we hold. Not yet tested by us. Source.
What's in the skill
When it loads
Scaffold and implement authentication in TypeScript/JavaScript apps using Better Auth. Detect frameworks, configure database adapters, set up route handlers, add OAuth providers, and create auth UI pages. Use when users want to add login, sign-up, or authentication to a new or existing project with Better Auth.
Sections in SKILL.md
- Phase 1: Planning (REQUIRED before implementation)
- Step 1: Scan the project
- Step 2: Ask planning questions
- Step 3: Summarize the plan
- Auth Implementation Plan
- Steps
- Phase 2: Implementation
- Installation
- Environment Variables
- Server Config (auth.ts)
- Client Config (auth-client.ts)
- Route Handler Setup
- Database Migrations
- Database Adapters
- Drizzle + PostgreSQL Setup
- Drizzle Config (drizzle.config.ts)
Key facts
- Repository
- better-auth/skills
- Installs on skills.sh
- 13,931 (Nov 2, 2026)
- GitHub stars (repo)
- 228 (Nov 2, 2026)
- Last repo commit
- Oct 19, 2026
What it includes
Detects framework, database or ORM, existing auth library and package manager.
Files ·
Scan the projectUp to ten questions in one call: framework, database, sign-in methods, plugins, UI style.
Ask planning questionsShows a checklist plan and waits for you to confirm before any code.
Summarize the plannpm install better-auth, plus scoped packages such as passkey, sso or expo.
Runs code ·
Install packagesCreates auth.ts, auth-client.ts and a route handler for your framework.
Write ·
Write config filesBETTER_AUTH_SECRET, BETTER_AUTH_URL, DATABASE_URL and OAuth secrets.
Write ·
Set environment variablesnpx auth@latest migrate or generate, then Prisma or Drizzle migration commands.
The built-in adapter's migrate applies directly to the database.
Runs code ·
Run database migrationstwoFactor, organization, admin, bearer, passkey, sso, plus sign-in and sign-up pages.
Write ·
Add plugins and auth pagesNine items to check before production, and a troubleshooting table.
Security checklist
From the official docs
Permissions
Medium risk
The skill holds instructions, but its build phase installs packages, writes files and can migrate your database. Confirm the plan, work on a branch and use a dev database.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It installs packages and edits your project
After you confirm the plan it runs npm install better-auth and writes auth.ts, a route handler and auth pages. Commit or branch first. github.com
Migrations change your database
npx auth@latest migrate applies the schema directly for the built-in adapter. drizzle-kit push is flagged in SKILL.md as safe only for development. github.com
It generates secrets and OAuth setup
SKILL.md suggests openssl rand -base64 32 for BETTER_AUTH_SECRET. Keep secrets out of chat and out of committed files. github.com
Technical details
| Talks to | npm registry (package installs) |
|---|---|
| Scopes |
|
Questions
How do I install it?
Use the install box above. The skills CLI and folder routes install only this skill. The plugin route (auth-skills, from the repo's marketplace manifest) installs this skill and best-practices, not the other four skills in the repo.
Which Better Auth skill should I install?
The better-auth/skills repo has six: best-practices (setup and config), create-auth (planning and scaffolding), security, emailAndPassword, organization and twoFactor. Start with create-auth for a new project and best-practices for config questions, then add the topic skill you need.
Will it change my code without asking?
SKILL.md says Phase 2 begins only after you confirm the plan from Phase 1. After that it writes files and runs commands in your project, so use a clean git branch.
Does it work for existing projects with another auth library?
SKILL.md covers it: its decision tree has a migration branch for moving off an existing auth library, and the project scan looks for next-auth, lucia, clerk, supabase/auth and firebase/auth.
Does it need an API key?
SKILL.md names no API key for the skill itself. Your app needs BETTER_AUTH_SECRET and a database connection string, and OAuth client IDs and secrets for each social provider.
Is it safe?
The folder is one Markdown file with no scripts. The build installs packages, writes files and can apply a database migration. Review the plan, work on a branch and point it at a dev database.
Does it work in the Claude app or Codex?
The install box lists a zip upload for the Claude app and a skills folder for Codex. The repo has no README, so it names no supported clients.
Information
updated Nov 2, 2026
- Repository
- better-auth/skills
- Folder
better-auth/create-auth
Sources
Docs, issue trackers and discussions this page is built from.
Show all 7Hide
- Better Auth skills marketplace manifest · github.com
- Claude Code skills · code.claude.com
- Using skills in Claude · support.claude.com
- SKILL.md · github.com
- skills.sh listing · skills.sh
- Repository · github.com
- better-auth/skills repo tree · github.com