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.jsondeps (pg,postgres,@neondatabase/serverless,mysql2,better-sqlite3,mongoose,mongodb). Ifdrizzle.config.tsexists, read itsdialectfield 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) inpackage.jsonor imports. - Package manager â Check for
pnpm-lock.yaml,yarn.lock,bun.lockb, orpackage-lock.json.
Installs: 15.8K | GitHub stars: 232 | First seen: Jul 11, 2026


