create-auth-skill

Implements authentication in TypeScript and JavaScript applications using Better Auth.

Updated May 7, 2026
One-click install
npx skills add https://github.com/Pieter-1337/Euricom-tsz --skill create-auth-skill-pieter-1337
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-auth-skill
Source: https://github.com/Pieter-1337/Euricom-tsz/tree/main/.agents/skills/create-auth-skill
Command: npx skills add https://github.com/Pieter-1337/Euricom-tsz --skill create-auth-skill-pieter-1337

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 full process of setting up Better Auth, from project detection and planning through implementation and security hardening. ## Core Features & Use Cases - Guided Planning Phase: Scans the project to auto-detect framework, database/ORM, existing auth libraries, and package manager, then asks structured questions to build a confirmed implementation plan before writing code. - Framework & Database Coverage: Provides route handler setup for Next.js, SvelteKit, Express, Hono, SolidStart, and adapters for Prisma, Drizzle, MongoDB, PostgreSQL, MySQL, and SQLite. - Plugins, OAuth & UI: Configures social providers (Google, GitHub, Apple, etc.), plugins like 2FA, organizations, admin, and passkeys, plus sign-in/sign-up page implementation. - Use Case: A developer with a Next.js app using Prisma and PostgreSQL wants login with email/password and GitHub OAuth. The Skill detects the stack, confirms a plan, generates the auth config, route handler, schema migrations, and auth pages. ## Quick Start Add authentication with Better Auth to my Next.js project using email/password and GitHub OAuth with a PostgreSQL database via Prisma.

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, a client in lib/auth-client.ts, and a route handler at app/api/auth/[...all]/route.ts using toNextJsHandler. Then configure your database adapter and run the CLI migrate or generate command.

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

Add the provider to the socialProviders field in your auth config with client ID and secret from environment variables. Set the redirect URI in the provider's developer dashboard to match your Better Auth callback URL.

Does Better Auth support Prisma and Drizzle adapters?

Yes, Better Auth provides prismaAdapter from better-auth/adapters/prisma and 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 incrementally migrating routes, session logic, and UI before removing the old library.

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 and add your domain to trustedOrigins.