PlugWiki

Better Auth best practices skill for Claude Code: server, client and database setup

Helps Claude configure Better Auth in TypeScript apps: server, client, database adapters, sessions and plugins.

Installs
129.5K
on skills.sh
Stars
228
on GitHub
Updated
Oct 2026
last repo commit

This skill makes Claude follow Better Auth's recommended setup when you work on auth.ts or mention Better Auth. Its description says to use it for TypeScript authentication with email and password, OAuth or plugin configuration.

SKILL.md starts with a documentation rule: match the docs to the Better Auth version installed in your project, using the Better Auth MCP (get_doc, search_docs) if you have it, or better-auth.com/llms.txt if not. Then it gives a six-step setup workflow, a config reference and a list of common gotchas. It bundles no scripts.

Good for

  • Developers adding Better Auth login to a TypeScript app
  • Teams choosing a database adapter such as Drizzle, Prisma or MongoDB
  • Anyone debugging sessions, cookies or plugin setup in Better Auth

Install better-auth-best-practices

Claude Code

  1. 1

    Copy this prompt.

    Install the better-auth-best-practices skill in Claude Code. Run this command:
    
    /plugin marketplace add better-auth/skills
    /plugin install auth-skills@better-auth-agent-skills
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Pick one route. The plugin route installs the auth-skills plugin from the repo's marketplace manifest, which lists two skills: create-auth and best-practices. The manifest lists no hooks, agents or MCP servers. The other four skills in the repo (security, emailAndPassword, organization, twoFactor) are not in that plugin. The skills CLI and folder routes install just this skill. The repo has no README, so these routes come from the manifest and the skills CLI, not from author instructions.

Built from the package data we hold. Not yet tested by us. Source.

What's in the skill

When it loads

Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables. Use when users mention Better Auth, betterauth, auth.ts, or need to set up TypeScript authentication with email/password, OAuth, or plugin configuration.

Sections in SKILL.md

  1. Documentation Version
  2. Setup Workflow
  3. Quick Reference
  4. Environment Variables
  5. File Location
  6. CLI Commands
  7. Core Config Options
  8. Database
  9. Session Management
  10. User & Account Config
  11. Email Flows
  12. Security
  13. Hooks
  14. Plugins
  15. Client
  16. Type Safety

Key facts

Installs on skills.sh
129,510 (Nov 2, 2026)
GitHub stars (repo)
228 (Nov 2, 2026)
Last repo commit
Oct 19, 2026

What it includes

  • Match docs to the installed better-auth version, via MCP or llms.txt.

    Uses the Better Auth MCP when available, otherwise starts at better-auth.com/llms.txt.

    Network · Documentation version

  • Install, env vars, auth.ts, route handler, migrations, then a health check.

    Runs npm install better-auth and npx auth@latest migrate or generate, then you call GET /api/auth/ok.

    Runs code · Setup workflow (6 steps)

  • Env vars, where the CLI looks for auth.ts, and the three CLI commands.

    Runs code · Quick reference

  • Table of appName, baseURL, secret, database, plugins, trustedOrigins and more.

    Core config options

  • Direct drivers and the Drizzle, Prisma and MongoDB adapters.

    Database

  • Storage priority, cookie cache strategies and expiry options.

    Session management

  • Field mapping, account linking, verification and reset emails.

    User, account and email flows

  • Secure cookies, CSRF and origin checks, IP headers and rate limits.

    Security and rate limiting

  • Endpoint and database hooks, plugin imports, client packages and methods.

    Hooks, plugins, client

  • Model vs table names, re-run the CLI after plugins, cookie cache limits.

    Common gotchas (8)

From the official docs

Permissions

Medium risk

The skill holds instructions, but its setup steps run npm and CLI commands that can change your database schema. Try them on a dev database and read each command first.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Migrate commands change your database

    The skill lists npx auth@latest migrate, which applies the schema directly for the built-in adapter, plus drizzle-kit push and prisma migrate dev. Run them against a dev database first. github.com

  • It can add an MCP server to your AI tools

    The CLI list includes npx auth@latest mcp --cursor, described as adding MCP to AI tools. Check what config it writes before you accept it. github.com

  • It runs npx auth@latest

    The CLI commands run the latest published auth package from npm each time. Check the version and what it prints before you accept a migration. github.com

Technical details
Talks tobetter-auth.com (docs lookup). npm registry (npm install, npx auth@latest)
Scopes
  • Database connection string (yours)

  • BETTER_AUTH_SECRET (yours)

Questions

How do I install it?

Use the install box above. The skills CLI and folder routes install only this skill. The plugin route (auth-skills, from the repo's marketplace manifest) installs this skill and create-auth, not the other four skills in the repo.

Which Better Auth skill should I install?

The better-auth/skills repo has six: best-practices (setup and config), create-auth (planning and scaffolding), security, emailAndPassword, organization and twoFactor. Start with create-auth for a new project and best-practices for config questions, then add the topic skill you need.

Does it need an API key?

SKILL.md names no API key for the skill itself. The setup it describes needs BETTER_AUTH_SECRET and a database connection string in your own environment, and OAuth client secrets for any social provider.

Does it run commands on my machine?

Only if you or Claude run them. SKILL.md lists npm install better-auth, npx auth@latest migrate and generate, and npx auth@latest mcp --cursor. The migrate command applies the schema to your database.

Is it safe?

The folder is one Markdown file with no scripts. The commands it suggests can change your database schema and add an MCP entry to your AI tools, so run them against a dev database first and read the output.

Does it work in the Claude app or Codex?

The install box lists a zip upload for the Claude app and a skills folder for Codex. The repo has no README, so it names no supported clients.

Information

updated Nov 2, 2026

Folder
better-auth/best-practices

better-auth/skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 7
  1. better-auth/skills marketplace manifest · github.com
  2. Claude Code skills · code.claude.com
  3. Using skills in Claude · support.claude.com
  4. SKILL.md · github.com
  5. skills.sh listing · skills.sh
  6. Repository · github.com
  7. better-auth/skills repo tree · github.com

Updated Nov 2, 2026.