Skip to content

Framework-agnostic TypeScript authentication with built-in email/password, OAuth, and plugin-based 2FA, passkeys, and RBAC.

CCM score
54 of 100
skills.sh installs
414
GitHub stars
2.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers server setup, client hooks, database schema generation, and mounting the API handler across frameworks like Next.js, SvelteKit, and Express
  • Includes built-in email/password with verification and reset, plus OAuth providers such as GitHub, Google, and Discord
  • Adds opt-in plugins for TOTP and SMS two-factor auth, passkeys/WebAuthn, magic links, usernames, and multi-tenant organizations
  • Provides a Python better_auth_init.py script for interactive configuration, with reference guides for each feature area

Install

$ npx -y skills add mrgoonie/claudekit-skills --skill better-auth -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Better Auth Skill

Better Auth is comprehensive, framework-agnostic authentication/authorization framework for TypeScript with built-in email/password, social OAuth, and powerful plugin ecosystem for advanced features.

When to Use

  • Implementing auth in TypeScript/JavaScript applications
  • Adding email/password or social OAuth authentication
  • Setting up 2FA, passkeys, magic links, advanced auth features
  • Building multi-tenant apps with organization support
  • Managing sessions and user lifecycle
  • Working with any framework (Next.js, Nuxt, SvelteKit, Remix, Astro, Hono, Express, etc.)

Quick Start

Installation

npm install better-auth
# or pnpm/yarn/bun add better-auth

Environment Setup

Create .env:

BETTER_AUTH_SECRET=<generated-secret-32-chars-min>
BETTER_AUTH_URL=http://localhost:3000

Basic Server Setup

Create auth.ts (root, lib/, utils/, or under src/app/server/):

import { betterAuth } from "better-auth";

Details

Repository
github.com/mrgoonie/claudekit-skills
Categories
Backend & APIs, Frontend & UI Code, Security
First seen
Jun 3, 2026

Questions

What is the better-auth skill for Claude Code?

The better-auth skill helps an agent implement authentication and authorization with Better Auth, a framework-agnostic TypeScript authentication framework. It covers email and password sign-in with verification, OAuth providers such as Google and GitHub, two-factor authentication, passkeys, session management, and role-based access control.

Who should use the better-auth skill?

It suits developers adding login to TypeScript or JavaScript web applications, including Next.js, Nuxt, SvelteKit, Remix, Astro, Hono and Express. It fits anyone setting up OAuth flows, 2FA or MFA, user sessions or authorization rules. The skill sits in the Backend and APIs category on Claude Marketplaces.

How do I install the better-auth skill?

Run npx -y skills add mrgoonie/claudekit-skills --skill better-auth -y in your project. Once installed, the agent can set up Better Auth with email and password, social login, two-factor authentication and passkeys, following the skill's guidance on environment variables, server setup and database schema.

Does the better-auth skill need API keys or a database?

Yes, it needs a BETTER_AUTH_SECRET and BETTER_AUTH_URL in your environment, and a database configured through a Better Auth adapter. For OAuth, you also need client IDs and secrets from the provider, such as GitHub. The skill notes running the Better Auth CLI to generate and apply the database schema.

More from mrgoonie/claudekit-skills

All 23

Similar to Better Auth

More Backend & APIs