ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

better-auth

Complete Better Auth documentation in markdown format. Use when implementing authentication in TypeScript projects - covers OAuth providers (Google, GitHub, etc.), email/password, passkeys, 2FA, session management, database adapters (Prisma, Drizzle), and framework integrations (Next.js, SvelteKit, etc.).

Why use this skill?

Learn how to implement secure authentication in TypeScript projects using Better Auth. Covers OAuth, 2FA, database adapters, and framework integration.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/leonaaardob/lb-better-auth-skill
Or

What This Skill Does

The better-auth skill serves as an extensive knowledge base and interactive guide for the Better Auth ecosystem. It provides OpenClaw with the ability to retrieve, explain, and synthesize technical documentation related to authentication implementation in TypeScript projects. This skill covers the entire spectrum of identity management, including OAuth provider configuration (Google, GitHub, Apple, etc.), secure email/password credential handling, passkey implementation via WebAuthn, multi-factor authentication (2FA), and robust session management. Furthermore, it assists in configuring complex database adapters like Prisma, Drizzle, and Kysely, and ensures smooth integration with modern web frameworks such as Next.js, SvelteKit, and Astro.

Installation

To integrate this skill into your environment, run the following command in your terminal: clawhub install openclaw/skills/skills/leonaaardob/lb-better-auth-skill Ensure you have your OpenClaw agent initialized correctly before executing the installation command.

Use Cases

  • Project Initialization: Quickly setting up a new Next.js project with secure, production-ready authentication and database schemas.
  • OAuth Debugging: Troubleshooting callback URL mismatches, scope issues, or token exchange failures for various social providers.
  • Database Migration: Defining or updating your database schema for Better Auth compatibility when using ORMs like Drizzle or Prisma.
  • Security Hardening: Implementing advanced security features such as rate limiting, email verification flows, and organization-based access control.
  • Architecture Design: Deciding between different authentication strategies (e.g., Magic Link vs. Passkeys) based on user experience requirements.

Example Prompts

  1. "How do I configure the Drizzle adapter in my Next.js project to work with Better Auth?"
  2. "Can you provide a step-by-step guide on setting up Google OAuth with Better Auth, including the required environment variables?"
  3. "Explain how to implement 2FA using the TOTP plugin and how to structure the database migration for it."

Tips & Limitations

  • Version Control: Always verify the version of Better Auth you are targeting, as syntax or API methods may change frequently in early release cycles.
  • Security Context: While this skill provides code snippets and configurations, always ensure you perform a final security audit on your implementation, especially regarding cookie security flags and environment variable management.
  • Data Privacy: Ensure that you comply with GDPR or CCPA when handling user authentication data, regardless of the library used.

Metadata

Stars1656
Views2
Updated2026-02-28
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-leonaaardob-lb-better-auth-skill": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#authentication#typescript#security#web-development#oauth
Safety Score: 4/5

Flags: file-read