Skip to content

better-auth-best-practices

Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.

— (0 ratings) 134.6K downloads better-auth
$ npx skills add https://github.com/better-auth/skills --skill better-auth-best-practices

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Summary

Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.

  • Covers full workflow from installation through database migration, environment variable setup, and route handler creation across multiple frameworks
  • Supports multiple database adapters (Prisma, Drizzle, MongoDB, direct connections) with critical guidance on model vs. table naming conventions
  • Includes session storage strategies with secondary storage (Redis/KV), cookie caching modes (compact, JWT, JWE), and stateless operation options
  • Provides 10+ popular plugins (two-factor, organization, passkey, magic link, OAuth provider, SSO) with tree-shaking imports and client-side integration
  • Features before/after hooks at endpoint and database levels, rate limiting configuration, CSRF/origin security controls, and type-safe client methods across vanilla, React, Vue, Svelte, and Solid frameworks

Better Auth Integration Guide

Documentation Version

Use documentation that matches the Better Auth version installed in the project. APIs and plugin names can differ across maintained release lines.

  1. Prefer a version explicitly named by the user.
  2. Otherwise, inspect the resolved better-auth version in the lockfile, falling back to the package manifest when no lockfile is available.
  3. When the Better Auth MCP is available, call get_doc with /llms.txt to resolve that package version to a documentation identifier. Pass the identifier to every search_docs call and pass result paths to get_doc unchanged.
  4. Without MCP, start at better-auth.com/llms.txt and follow the matching version index.
  5. Use the latest documentation only when the project version cannot be determined or the user explicitly asks about the latest release or an upgrade.

When planning an upgrade, separate guidance for the currently installed version from guidance for the target version.


Setup Workflow


Installs: 134.6K | GitHub stars: 232 | First seen: Jan 19, 2026

Related skills

New

DevOps & cloud

azure-compliance

Azure compliance scanning, Key Vault expiration auditing, and resource configuration validation.

New • 779.8K
New

Security

entra-app-registration

Microsoft Entra ID app registration, OAuth 2.0 configuration, and MSAL integration for secure application authentication.

New • 779.4K
New

Agent workflows

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces,

New • 662.2K