Better Auth skills

Better Auth Skills

Official Better Auth skills: scaffold authentication in JS and TS projects and guide a secure setup

SkillMedium risk

better-auth/skills

Install

npx skills add better-auth/skills

Command from the Better Auth docs.

This is third-party code. Review the repository files before installing.

What it does

The create-auth skill first scans the project: framework, ORM and database, existing auth library and package manager. It then asks clarifying questions in one batch and follows a plan to add Better Auth with a database adapter, route handlers, OAuth providers and sign-in pages. The best-practices skill covers server and client config, sessions, plugins and env vars, and checks the docs for the installed version. Separate skills cover security, email and password, organizations and two-factor auth.

Who it is for. For TypeScript and JavaScript developers adding or migrating authentication to Better Auth.

Good fit when

  • You need sign-in and sign-up in a Next.js, SvelteKit, Nuxt, Astro or Hono project
  • You are migrating from next-auth, Lucia or Clerk to Better Auth
  • You need to review protections: rate limits, secrets, CSRF, cookies

Not a fit when

  • The project is not JavaScript or TypeScript
  • Auth is built on another library and no migration is planned

Example request

Add email and GitHub sign-in to this project with Better Auth

Limitations

The repository has no README; installation is documented on the Better Auth site. The skills rely on better-auth.com docs and only apply to this library. The planning step expects the agent's question tool.

How to disable. Remove the skills via npx skills or delete their folders from the agent's skills directory, or uninstall the auth-skills plugin via /plugin.

Security check

  • The agent changes auth code and the database schema
  • Handles BETTER_AUTH_SECRET and OAuth keys

README in short

The repository has no README. The Better Auth docs describe it as a skill pack that teaches agents library conventions and safe patterns, and give the skills install command. The repository contains a marketplace.json with an auth-skills plugin for Claude Code and SKILL.md files for auth scaffolding, best practices, security, organizations, two-factor auth and email and password.

SKILL.md

---
name: create-auth
description: Scaffold and implement authentication in TypeScript/JavaScript apps using Better Auth. Detect frameworks, configure database adapters, set up route handlers, add OAuth providers, and create auth UI pages. Use when users want to add login, sign-up, or authentication to a new or existing project with Better Auth.
---

# Create Auth Skill

Guide for adding authentication to TypeScript/JavaScript applications using Better Auth.

**For code examples and syntax, see [better-auth.com/docs](https://better-auth.com/docs).**

---

## Phase 1: Planning (REQUIRED before implementation)

Before writing any code, gather requirements by scanning the project and asking the user structured questions. This ensures the implementation matches their needs.

### Step 1: Scan the project

Analyze the codebase to auto-detect:
- **Framework** — Look for `next.config`, `svelte.config`, `nuxt.config`, `astro.config`, `vite.config`, or Express/Hono entry files.
- **Database/ORM** — Look for `prisma/schema.prisma`, `drizzle.config.ts`, `package.json` deps (`pg`, `postgres`, `@neondatabase/serverless`, `mysql2`, `better-sqlite3`, `mongoose`, `mongodb`). If `drizzle.config.ts` exists, read its `dialect` field to determine the DB type (e.g., `"postgresql"` → Drizzle + Postgres). Also check which Drizzle driver is installed (`drizzle-orm/node-postgres` → `pg`, `drizzle-orm/postgres-js` → `postgres`, `drizzle-orm/neon-http` → Neon).
- **Existing auth** — Look for existing auth libraries (`next-auth`, `lucia`, `clerk`, `supabase/auth`, `firebase/auth`) in `package.json` or imports.
- **Package manager** — Check for `pnpm-lock.yaml`, `yarn.lock`, `bun.lockb`, or `package-lock.json`.

Use what you find to pre-fill defaults and skip questions you can already answer.

### Step 2: Ask planning questions

Use the `AskQuestion` tool to ask the user **all applicable questions in a single call**. Skip any question you already have a confident answer for from the scan. Group them under a title like "Auth Setup Planning".

**Questions to ask:**

FAQ

Where are the official instructions?

On the AI resources skills page in the Better Auth docs, which also gives the install command.

Does it respect the library version?

Yes, best-practices first detects the installed version from the lockfile and uses matching docs.

Editors’ pick

The official FastAPI skill, bundled with the package, teaching agents to write code for the installed version

SkillLow risk102.3K
Editors’ pick

Official skills and agents from the .NET team: performance, MSBuild, NuGet, upgrades, testing, ASP.NET Core, Blazor and MAUI

PluginMedium risk5.4K

Firebase MCP Server

Firebase CLI and MCP Server

Editors’ pick

Official Firebase MCP server from the Firebase CLI: projects, Firestore, Auth, Crashlytics, Remote Config and function logs

MCP serverHigh risk4.5K
Editors’ pick

Laravel's official MCP server, guidelines and skills: the agent sees the DB schema, logs and package versions and searches ecosystem docs

MCP serverMedium risk3.6K