create-auth-skill

Implements Better Auth authentication in TypeScript and JavaScript applications.

2|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zester4/zilmate --skill create-auth-skill-zester4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-auth-skill
Source: https://github.com/zester4/zilmate/tree/main/.agents/skills/create-auth-skill
Command: npx skills add https://github.com/zester4/zilmate --skill create-auth-skill-zester4

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 create security risks. This Skill guides the process with a structured planning phase and framework-specific implementation steps for Better Auth. ## Core Features & Use Cases - Guided Planning Phase: Scans the project to detect the framework, ORM, existing auth libraries, and package manager, then asks structured questions about auth methods, providers, and features before writing code. - Framework-Specific Implementation: Provides route handler setups for Next.js, SvelteKit, Nuxt, Astro, Express, Hono, and SolidStart, plus database adapter configuration for Prisma, Drizzle, Kysely, and MongoDB. - Plugin and UI Support: Covers plugins like two-factor authentication, organizations, admin, bearer tokens, and passkeys, along with sign-in/sign-up page implementation and a security checklist. - Use Case: A developer adding login to an existing Next.js app with PostgreSQL and Prisma can follow the plan to configure email/password plus Google OAuth, run schema migrations, and build the auth pages. ## Quick Start Add authentication with Better Auth to my Next.js project using email/password and GitHub OAuth with a Prisma PostgreSQL database.

Frequently Asked Questions about create-auth-skill

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 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 schema.

How to set up Google or GitHub OAuth with Better Auth?

Add the provider to the socialProviders field in your auth config with the client ID and secret from the provider dashboard. Set the corresponding environment variables like GITHUB_CLIENT_ID and verify the redirect URIs match your BETTER_AUTH_URL.

Does Better Auth support Prisma and Drizzle adapters?

Yes, Better Auth supports Prisma via prismaAdapter from better-auth/adapters/prisma and Drizzle via drizzleAdapter from better-auth/adapters/drizzle. Use the CLI generate command to create the schema, then run prisma migrate dev or drizzle-kit push.

Can I migrate from NextAuth or Lucia to Better Auth?

Yes, the migration path involves auditing your current auth setup, installing Better Auth alongside the existing library, then migrating routes, session logic, and UI incrementally before removing the old library. Official migration guides are available in the Better Auth docs.

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 ensure BETTER_AUTH_URL matches the deployed URL.