create-auth-skill
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.
Developer Setup
Setup & Installation
npx skills add https://github.com/better-auth/skills --skill create-auth-skillnpx skills add https://github.com/better-auth/skills --skill create-auth-skillOverview
What This Skill Does
Guides the interactive scan and step-by-step scaffolding of Better Auth configurations, database setups, and UI pages tailored to your detected framework.
Application
When to use this Skill
- Bootstrapping authentication in a new TypeScript project using an interactive CLI guide.
- Scanning the codebase to auto-detect the project framework, database, ORM, and package manager.
- Creating structured planning checklists for auth requirements before writing implementation code.
- Scaffolding standard authentication UI pages (Sign in, Sign up, Forgot Password) with consistent styles.
- Ensuring database models and initial credentials configurations align with framework best practices.
Documentation
Show Skills.md file
Create Auth Skill
Guide for adding authentication to TypeScript/JavaScript applications using Better Auth.
For code examples and syntax, see better-auth.com/docs.
Phase 1: Planning (REQUIRED before implementation)
Before writing any code, gather requirements by scanning the project and asking the user structured questions. This ensures the implementation matches their needs.
Step 1: Scan the project
Analyze the codebase to auto-detect:
- Framework — Look for
next.config,svelte.config,nuxt.config,astro.config,vite.config, or Express/Hono entry files. - Database/ORM — Look for
prisma/schema.prisma,drizzle.config,package.jsondeps (pg,mysql2,better-sqlite3,mongoose,mongodb). - Existing auth — Look for existing auth libraries (
next-auth,lucia,clerk,supabase/auth,firebase/auth) inpackage.jsonor imports. - Package manager — Check for
pnpm-lock.yaml,yarn.lock,bun.lockb, orpackage-lock.json.
Use what you find to pre-fill defaults and skip questions you can already answer.
Step 2: Ask planning questions
Use the AskQuestion tool to ask the user all applicable questions in a single call. Skip any question you already have a confident answer for from the scan. Group them under a title like "Auth Setup Planning".
Recommendations