Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

better-auth-best-practices — Claude Code skill: setup

This skill guides Better Auth setup in TypeScript projects, covering the server, client, database, sessions, and plugins for email/password or OAuth flows.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add better-auth/skills --skill better-auth-best-practices -a claude-code
npx skills add better-auth/skills --skill best-practices -a claude-code
Open on GitHub

What better-auth-best-practices does

The skill works from the Better Auth version resolved in the project, using the lockfile or package manifest as the starting point. It guides the agent through auth.ts, BETTER_AUTH_SECRET, BETTER_AUTH_URL, a framework route handler, and a check against GET /api/auth/ok.

Its coverage includes built-in, Drizzle, Prisma, and MongoDB adapters, email/password and OAuth configuration, client methods, session storage, hooks, and plugins. For Drizzle and Prisma, the workflow includes schema generation with npx auth@latest generate followed by the ORM migration commands.

One detail deserves attention: Better Auth expects adapter model names rather than physical table names. With a Prisma model named User mapped to the users table, the configuration uses modelName: "user".

What it helps with

  • set up a Better Auth server and client
  • connect a Drizzle or Prisma database adapter
  • configure email/password and OAuth sign-in
  • choose session storage and cookie cache behavior
  • add Better Auth plugins, hooks, and environment variables

Example prompts for the agent

  • Set up Better Auth in this TypeScript project using `auth.ts`, `BETTER_AUTH_SECRET`, and `BETTER_AUTH_URL`, then add the route handler.
  • Review the Prisma setup for Better Auth and generate the schema at `prisma/schema.prisma`.
  • Add `twoFactor` from `better-auth/plugins/two-factor` and list the required client and database changes.

How to install better-auth-best-practices

1Skills CLI (Vercel)

npx skills add better-auth/skills --skill better-auth-best-practices -a claude-code
npx skills add better-auth/skills --skill best-practices -a claude-code

2Manually: put the files in place

~/.claude/skills/best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/best-practices/

From the same set5

The whole set →

Similar

turborepo-caching Seth Hobson This skill configures Turborepo for local and remote build caching. Use it when setting up a monorepo, tuning CI/CD, or investigating cache misses. Claude Code CX Codex Cursor 10,600installs hybrid-cloud-networking Seth Hobson Plans connectivity between on-premises infrastructure and AWS, Azure, GCP, or OCI through VPNs and dedicated links. Claude Code CX Codex Cursor 10,600installs threejs-fundamentals CloudAI-X Sets up Three.js r186 scenes, cameras, renderers, and animation loops for WebGL or WebGPU with TSL. Claude Code CX Codex Cursor +1 17,100installs employment-contract-templates Seth Hobson Draft employment contracts, offer letters, HR policies, and onboarding documents with reusable templates. Use it when hiring paperwork needs a consistent structure. Claude Code CX Codex Cursor 10,500installs projection-patterns Seth Hobson Build read models from event streams with guidance on projection types and replay. Useful for CQRS read sides, materialized views, and search indexes. Claude Code CX Codex Cursor 10,500installs prisma-driver-adapter-implementation prisma Reference guide for implementing SQL adapters in Prisma ORM 7. Required for transaction handling, savepoint support, value mapping, and database error preservation. Claude Code CX Codex Cursor +1 375,000installs find-skills vercel-labs Discovers and installs agent skills from skills.sh directly inside your coding assistant. Handy when you need domain-specific workflows for a project. Claude Code CX Codex Cursor +1 4,000,000installs frontend-design official anthropics This skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. Claude Code Claude.ai 1,025,790installs

Questions about better-auth-best-practices

How do I install better-auth-best-practices in Claude Code?

Run npx skills add better-auth/skills --skill better-auth-best-practices -a claude-code, then run npx skills add better-auth/skills --skill best-practices -a claude-code. Confirm the file at ~/.claude/skills/best-practices/SKILL.md.

What does better-auth-best-practices do?

It guides Better Auth configuration for the server and client, database adapters, environment variables, sessions, email/password, OAuth, hooks, and plugins.

What should I check when connecting Better Auth to Prisma?

Use the Prisma model name in the adapter configuration, not the physical table name. For a User model mapped to users, use modelName: "user".

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor