This drops Better Auth into Claude Code projects when you need authentication that actually works with Cloudflare D1 and modern TypeScript stacks. It's built for self-hosting across 15+ frameworks (Next.js, Nuxt, Workers, Remix) and includes OAuth, 2FA, passkeys, RBAC, and multi-tenant setups. The skill prevents about 20 common errors, mostly around D1 adapter confusion (there's no d1Adapter, you use Drizzle or pass the binding directly in v1.5+) and ESM-only requirements since v1.4. It's a solid Clerk alternative if you want control over your auth stack. The documentation makes migration straightforward, and the new CLI tools in v1.5 handle schema generation and upgrades cleanly.

skills.sh installs
502
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill better-auth --agent claude-code

Installs into .claude/skills of the current project.

Files

better-auth

Status: Production Ready Last Updated: 2026-04-08 Package: better-auth@1.6.0 (ESM-only) Dependencies: Drizzle ORM or Kysely (required for D1 complex use cases; D1 native support available in v1.5+)


Quick Start (5 Minutes)

Installation

Option 1: Drizzle ORM (Recommended)

bun add better-auth drizzle-orm drizzle-kit

Option 2: Kysely

bun add better-auth kysely @noxharmonium/kysely-d1

⚠️ v1.4.0+ Requirements

better-auth v1.4.0+ is ESM-only. Ensure:

package.json:

{
  "type": "module"
}

Upgrading from v1.3.x? Load references/migration-guide-1.4.0.md Upgrading from v1.4.x? Load references/migration-guide-1.5.0.md

⚠️ CRITICAL: D1 Adapter Requirements

v1.5.0+: D1 is now natively supported. Pass your D1 binding directly:

// ✅ SIMPLEST - D1 native (v1.5.0+)
import { betterAuth } from "better-auth";

const auth = betterAuth({
    database: env.DB, // D1 binding, auto-detected
});

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Frontend Development, Backend & APIs, Security, Cloud & Infrastructure
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1martinholovsky avatartailwindcssmartinholovsky/claude-skills-generatorTailwind CSS utility-first styling for JARVIS UI components499skills.sh installs
2aj-geddes avatarux-designeraj-geddes/claude-code-bmad-skillsDesigns user experiences, creates wireframes, defines user flows, ensures accessibility. Trigger keywords - UX design, wireframe, user flow, accessibility, WCAG493skills.sh installs
3inertia-rails avatarinertia-rails-formsinertia-rails/skillsFull-stack form handling for Inertia Rails: create, edit, delete, multi-step wizard, and file upload forms with validation errors and progress tracking. React e491skills.sh installs
4webmaxru avatarenonic-nextxp-integrationwebmaxru/enonic-agent-skillsGuides setup, development, and troubleshooting of the Next.js and Enonic XP headless integration (Next.XP framework). Covers Enonic adapter configuration, conte488skills.sh installs
5openstatushq avatardata-table-filtersopenstatushq/data-table-filtersInstall and extend data-table-filters — a React data table system with faceted filters (checkbox, input, slider, timerange), sorting, infinite scroll, virtualiz485skills.sh installs
6bobmatnyc avatarsupabase-backend-platformbobmatnyc/claude-mpm-skillsSupabase open-source Firebase alternative with Postgres, authentication, storage, and realtime subscriptions. Use when building full-stack applications requirin482skills.sh installs