Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add better-auth/skills --skill create-auth -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/create-auth/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/create-auth/

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.

Similar skills

All skills for Backend and APIs →

From the same set6

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor