Skip to content

create-auth

Scaffold and implement authentication in TypeScript/JavaScript apps with Better Auth framework detection, database adapter setup, and OAuth integration.

— (0 ratings) 29.3K downloads better-auth
$ npx skills add https://github.com/better-auth/skills --skill create-auth

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Summary

Scaffold and implement authentication in TypeScript/JavaScript apps with Better Auth framework detection, database adapter setup, and OAuth integration.

  • Detects frameworks (Next.js, SvelteKit, Nuxt, Astro, Express, Hono), databases (Prisma, Drizzle, MongoDB, raw drivers), and existing auth libraries through project scanning
  • Supports email/password, OAuth (Google, GitHub, Apple, Microsoft, Discord, Twitter), magic links, passkeys, and phone authentication with configurable email verification and password reset
  • Includes plugins for two-factor authentication, organizations/teams, admin dashboards, API bearer tokens, and enterprise SSO via scoped packages
  • Generates server config (auth.ts), client config (auth-client.ts), route handlers, database migrations, and auth UI pages tailored to your framework and requirements

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.ts, package.json deps (pg, postgres, @neondatabase/serverless, mysql2, better-sqlite3, mongoose, mongodb). If drizzle.config.ts exists, read its dialect field to determine the DB type (e.g., "postgresql" → Drizzle + Postgres). Also check which Drizzle driver is installed (drizzle-orm/node-postgres → pg, drizzle-orm/postgres-js → postgres, drizzle-orm/neon-http → Neon).
  • Existing auth — Look for existing auth libraries (next-auth, lucia, clerk, supabase/auth, firebase/auth) in package.json or imports.
  • Package manager — Check for pnpm-lock.yaml, yarn.lock, bun.lockb, or package-lock.json.

Installs: 29.3K | GitHub stars: 232 | First seen: Jan 19, 2026

Related skills

New

Coding & dev tools

hyperframes-cli

CLI toolkit for scaffolding, validating, previewing, and rendering HyperFrames video compositions.

New • 1.8M
New

Coding & dev tools

improve-codebase-architecture

Analyze codebases for architectural friction and propose module-deepening refactors as testability improvements.

New • 1.3M
New

Coding & dev tools

tdd

Test-driven development with vertical slices, behavior-focused tests, and incremental red-green-refactor cycles.

New • 1.3M