create-auth-skill

Automate Better Auth integration into TypeScript and JavaScript applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers in adding robust authentication layers to TypeScript and JavaScript apps using Better Auth, removing guesswork and reducing security risks.

Core Features & Use Cases

  • Core setup: identify framework, choose database, install better-auth, create auth.ts and auth-client.ts, set up route handler, run migrations, and extend with plugins.
  • Configuration: environment variables such as BETTER_AUTH_SECRET and BETTER_AUTH_URL; OAuth secrets for providers like GitHub and Google.
  • Server Config (auth.ts): minimal required config and progressively richer setups with socialProviders, email verification, plugins, and session settings.
  • Client Config (auth-client.ts): framework-specific imports and common exports for signIn, signUp, signOut, useSession, getSession.
  • Route Handler Setup: per-framework file mappings (Next.js, Express, SvelteKit, SolidStart, Hono, etc.) to wire authentication flows.
  • Database Migrations & Adapters: guidance for migrating or setting up the chosen database with the authentication schema.
  • Plugins & Extensibility: guidance on adding 2FA, SSO, admin tooling, and other plugins to extend authentication capabilities.

Quick Start

Set up a TypeScript/JavaScript project, install Better Auth, and configure server and client authentication following the installation, server config, client config, and route handler guidance to enable a secure auth flow.

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 TypeScript app using Better Auth?

To add authentication to a TypeScript app using Better Auth, configure environment variables, set up server and client files, wire route handlers, and run database migrations for a secure auth flow.

Can I use Better Auth with frameworks like Next.js, SvelteKit, or Express?

Better Auth works with frameworks like Next.js, Express, SvelteKit, SolidStart, and Hono, providing specific route handler file mappings to wire authentication flows per framework.

How do I configure OAuth providers like GitHub and Google for JavaScript authentication?

Configure OAuth providers for JavaScript authentication by adding socialProviders in the server config and setting OAuth secrets for GitHub and Google in your environment variables.

What's the best way to extend TypeScript authentication with 2FA or SSO?

The best way to extend TypeScript authentication with 2FA or SSO is by integrating Better Auth plugins, adding admin tooling and additional verification layers to the base configuration.

Do I need to run database migrations when setting up Better Auth?

You need to run database migrations when setting up Better Auth to create the required authentication schema, ensuring your chosen database adapts correctly to the session and user tables.

What environment variables are required for Better Auth setup?

Required environment variables for Better Auth setup include BETTER_AUTH_SECRET and BETTER_AUTH_URL, alongside OAuth secrets for any configured social providers like GitHub and Google.