create-auth

Scaffold and implement Better Auth authentication in TypeScript and JavaScript applications.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/saad-tayyab/lumora --skill create-auth-saad-tayyab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-auth
Source: https://github.com/saad-tayyab/lumora/tree/main/.agents/skills/create-auth
Command: npx skills add https://github.com/saad-tayyab/lumora --skill create-auth-saad-tayyab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding authentication to a TypeScript or JavaScript project involves many decisions—framework integration, database adapters, OAuth providers, plugins, and UI pages—and mistakes in any of them cause broken sessions or security gaps. This Skill guides the full Better Auth setup from planning through implementation. ## Core Features & Use Cases - Project Detection & Planning: Scans the codebase to detect the framework (Next.js, SvelteKit, Nuxt, Astro, Express, Hono), database/ORM (Prisma, Drizzle, Mongoose), and package manager, then asks structured planning questions before writing code. - Full Implementation Guidance: Covers server config, client setup, route handlers, database migrations via the Better Auth CLI, OAuth providers, email verification, and plugins like 2FA, organizations, and admin. - Auth UI & Security: Walks through building sign-in/sign-up pages, session checks, protected routes, and a production security checklist. - Use Case: You have a SvelteKit app backed by Neon PostgreSQL and Drizzle. Use this Skill to detect the stack, configure the Drizzle adapter, set up the route handler, add Google and GitHub OAuth, and generate the auth schema migrations. ## Quick Start Add Better Auth authentication with email/password and Google OAuth to my existing Next.js project that uses Drizzle and PostgreSQL.

Frequently Asked Questions about create-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Better Auth to a Next.js project?

Install better-auth, create a server config in lib/auth.ts, create a client with better-auth/react, and add a route handler at app/api/auth/[...all]/route.ts using toNextJsHandler. Then run the CLI migrate or generate command for your database adapter.

How do I set up Better Auth with Drizzle and PostgreSQL?

Initialize a Drizzle db instance using node-postgres, postgres-js, or Neon serverless, then pass it to drizzleAdapter with provider set to pg. Generate the auth schema with the Better Auth CLI, then run drizzle-kit push in development or generate plus migrate in production.

Which databases does Better Auth support?

Better Auth supports PostgreSQL, MySQL, SQLite, and MongoDB. You can pass driver instances like pg.Pool or better-sqlite3 directly, or use official adapters for Prisma, Drizzle, and MongoDB.

Can I migrate an existing project from another auth library to Better Auth?

Yes. The recommended approach is an incremental migration: audit the current auth setup, install Better Auth alongside the existing library, migrate routes first, then session logic and UI, and finally remove the old library.

Why are Better Auth cookies not being set in production?

Cookie issues usually come from a mismatched baseURL or missing secure cookie settings. Verify BETTER_AUTH_URL matches your domain, enable advanced.useSecureCookies in production, and configure trustedOrigins for your deployment domains.