Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

better-auth

Skill by giuseppe-trisciuoglio

Provides Better Auth integration patterns for NestJS backend and Next.js frontend with Drizzle ORM and PostgreSQL. It helps developers set up authentication, social login, session handling and plugins such as 2FA and passkeys.

  • Score 68
  • 372 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install better-auth

Built from the published package, never by AI.

git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit /tmp/developer-kit && mkdir -p ~/.claude/skills && cp -r /tmp/developer-kit/plugins/developer-kit-typescript/skills/better-auth ~/.claude/skills/better-auth

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install better-auth in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The better-auth skill gives an AI assistant integration patterns for Better Auth, a type-safe TypeScript authentication framework. It covers a NestJS backend with Drizzle ORM and PostgreSQL, and a Next.js App Router frontend. The guide follows four phases: database setup, backend setup, frontend setup, and plugins.

It also covers social login with GitHub and Google, email and password authentication with session management, and protected routes and middleware. Plugin coverage includes 2FA, Organization, SSO, Magic Link and Passkey. Reference files cover NestJS setup, Next.js setup, MFA, passkeys, the Drizzle schema and social providers. It is aimed at developers building TypeScript apps with these tools.

Written from the project's SKILL.md and checked against it.

What it can do

  • Database setup with DrizzleConfigures a Drizzle schema for PostgreSQL and runs migrations.
  • NestJS backend setupCreates a Better Auth instance and an auth controller in NestJS.
  • Next.js frontend setupConfigures an auth client, adds middleware and creates a sign-in page.
  • Social loginSets up social providers such as GitHub and Google.
  • Two-factor authenticationCovers TOTP 2FA with OTP sending and trusted devices.
  • Passkey sign-inCovers WebAuthn passkey registration and passwordless sign-in.
  • Organizations and SSOCovers multi-tenant organizations and SSO configuration.
  • Magic linkCovers passwordless sign-in through magic links.
  • Protected routesRedirects unauthenticated users away from routes such as /dashboard.

What you need

  • Node.js 18 or later
  • PostgreSQL database
  • OAuth provider client ID and secret, such as GitHub or Google
  • HTTPS for OAuth callbacks

Try asking

  • Set up Better Auth with a NestJS backend and Drizzle ORM on PostgreSQL.
  • Add GitHub and Google social login to my Next.js App Router app.
  • Enable passkey sign-in and 2FA with trusted devices in Better Auth.

Good to know

  • Passkeys require HTTPS and compatible browsers.
  • OAuth callbacks need HTTPS, so local testing needs a tool such as ngrok.
  • Better Auth requires Node.js 18+ for Next.js App Router support.
  • Organization features require additional database tables.

Security check

B
  • Allowed to use Write, Edit, Bash without limitsIn SKILL.md

Checked automatically: plugins/developer-kit-typescript/skills/better-auth/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditGlobGrepBash

Alternatives to better-auth

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

better-auth: common questions

Does this skill handle password hashing?

Better Auth handles password hashing automatically. The skill says never to implement custom hashing.

Which database does it cover?

The patterns use PostgreSQL with Drizzle ORM and the pg package.

Which plugins are covered?

The source covers 2FA, passkey, organizations, SSO and magic link, with details in the plugins reference.

How do I install better-auth?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is better-auth free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is better-auth safe to use?

It scores 68 of 100. Grades: maintenance B, licence A, quality B. Security check: grade B (allowed to use write, edit, bash without limits). Review the code before you install. How grades work.

What are alternatives to better-auth?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

better-auth Install

Add to stack

Loading.