create-auth

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

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/NarixHine/uni-chem --skill create-auth-narixhine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-auth
Source: https://github.com/NarixHine/uni-chem/tree/main/.agents/skills/create-auth
Command: npx skills add https://github.com/NarixHine/uni-chem --skill create-auth-narixhine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding authentication to a web application 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 - Guided Planning Phase: Auto-detects your framework, database/ORM, and package manager, then asks structured questions about auth methods, providers, and features before writing code. - Framework & Database Coverage: Provides route handler setup for Next.js, SvelteKit, Express, Hono, SolidStart, and adapters for Prisma, Drizzle, MongoDB, and raw SQL drivers. - Plugins, Migrations & Security: Covers CLI schema generation, plugins like 2FA and organizations, plus a security checklist and troubleshooting table. - Use Case: You have a Next.js app with Prisma and Postgres and need email/password plus GitHub OAuth login. The Skill detects your stack, confirms the plan, and generates the auth config, route handler, schema migrations, and sign-in pages. ## Quick Start Add Better Auth authentication with email/password and GitHub OAuth to my Next.js app that uses Prisma 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 authentication to a Next.js app with Better Auth?▼

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

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. Run the Better Auth CLI generate command to output the auth schema, then apply it with drizzle-kit push in development or generate plus migrate in production.

Does Better Auth support social OAuth providers like Google and GitHub?▼

Yes, Better Auth supports social OAuth through the socialProviders option in the server config, including Google, GitHub, Apple, Microsoft, Discord, and Twitter. You add client ID and secret environment variables and configure redirect URIs in each provider's dashboard.

Prisma vs Drizzle adapter for Better Auth, which should I use?▼

Both are officially supported adapters. Prisma uses prismaAdapter with a provider string and fits projects already using Prisma migrations, while Drizzle uses drizzleAdapter with pg, mysql, or sqlite providers and integrates with drizzle-kit for schema management.

Why are Better Auth cookies not being set in production?▼

Cookies fail when the baseURL does not match your domain or secure cookies are not enabled. Set advanced.useSecureCookies to true in production, configure trustedOrigins with your domain, and verify BETTER_AUTH_URL matches the deployed URL.