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

better-auth

Self-hosted auth for TypeScript/Cloudflare Workers with social auth, 2FA, passkeys, organizations, RBAC, and 15+ plugins. Requires Drizzle ORM or Kysely for D1 (no direct adapter). Self-hosted alternative to Clerk/Auth.js. Use when: self-hosting auth on D1, building OAuth provider, multi-tenant SaaS, or troubleshooting D1 adapter errors, session caching, rate limits, Expo crashes, additionalFields bugs.

Why use this skill?

Learn how to self-host authentication on Cloudflare D1 using better-auth. Expert guide for Drizzle ORM, Kysely, OAuth, and RBAC.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/veeramanikandanr48/better-auth
Or

What This Skill Does

The better-auth skill provides a comprehensive interface for managing authentication in Cloudflare Workers and TypeScript environments. It acts as a powerful, self-hosted alternative to Auth.js or Clerk. The skill facilitates the integration of complex authentication workflows, including social logins (GitHub, Google, Patreon, etc.), 2FA, passkeys, RBAC, and multi-tenancy. It handles the critical D1 database adapter requirements, ensuring that developers use the recommended Drizzle ORM or Kysely patterns for high-performance database interactions. This skill is essential for maintaining secure, scalable user identity management within modern edge-native architectures.

Installation

To install this skill, run the following command in your terminal: clawhub install openclaw/skills/skills/veeramanikandanr48/better-auth

Ensure that you have your database environment properly configured, as this skill specifically requires an ORM adapter to interface with Cloudflare D1. We recommend Drizzle ORM for the most robust integration.

Use Cases

  • Multi-tenant SaaS: Implementing organization-based access control (RBAC) and team management features for B2B applications.
  • OAuth Provider Creation: Leveraging the OAuth 2.1 plugin to build your own identity provider service.
  • Enterprise Auth: Integrating SAML 2.0 via the @better-auth/sso package for SSO compliance.
  • High-Performance Edge Apps: Offloading session management to stateless JWTs or database-backed sessions on Cloudflare D1 without the overhead of external auth services.

Example Prompts

  1. "Help me configure a Drizzle ORM adapter for better-auth on Cloudflare D1, ensuring I have the correct schema for multi-tenant users."
  2. "I am getting a session caching error in my Workers environment; can you help me troubleshoot my better-auth configuration for performance?"
  3. "Guide me through implementing the Patreon OAuth provider using the latest better-auth v1.4.10 plugins."

Tips & Limitations

  • D1 Requirement: Note that better-auth lacks a direct d1Adapter(). You must utilize Drizzle ORM or Kysely. Using unsupported adapter patterns will lead to runtime errors.
  • Breaking Changes: Keep in mind the v1.4.0 shift to ESM-only. Ensure your package.json reflects "type": "module".
  • Admin Security: Remember that impersonation of admins is disabled by default as of v1.4.6. You will need to explicitly override this if your internal tooling requires it.
  • Versioning: Always check the release notes at better-auth.com/changelogs before upgrading, as recent versions have introduced significant changes to table structures, particularly regarding multi-team support.

Metadata

Stars946
Views0
Updated2026-02-13
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-veeramanikandanr48-better-auth": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#authentication#typescript#cloudflare#database#identity
Safety Score: 4/5

Flags: external-api, code-execution

Related Skills

earnings-calendar

This skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calendar data, wants to know which companies are reporting earnings in the upcoming week, or needs a weekly earnings review. The skill focuses on mid-cap and above companies (over $2B market cap) that have significant market impact, organizing the data by date and timing in a clean markdown table format. Supports multiple environments (CLI, Desktop, Web) with flexible API key management.

veeramanikandanr48 946

dividend-growth-pullback-screener

Use this skill to find high-quality dividend growth stocks (12%+ annual dividend growth, 1.5%+ yield) that are experiencing temporary pullbacks, identified by RSI oversold conditions (RSI ≤40). This skill combines fundamental dividend analysis with technical timing indicators to identify buying opportunities in strong dividend growers during short-term weakness.

veeramanikandanr48 946

cli-developer

Use when building CLI tools, implementing argument parsing, or adding interactive prompts. Invoke for CLI design, argument parsing, interactive prompts, progress indicators, shell completions.

veeramanikandanr48 946

options-strategy-advisor

Options trading strategy analysis and simulation tool. Provides theoretical pricing using Black-Scholes model, Greeks calculation, strategy P/L simulation, and risk management guidance. Use when user requests options strategy analysis, covered calls, protective puts, spreads, iron condors, earnings plays, or options risk management. Includes volatility analysis, position sizing, and earnings-based strategy recommendations. Educational focus with practical trade simulation.

veeramanikandanr48 946

security-reviewer

Use when conducting security audits, reviewing code for vulnerabilities, or analyzing infrastructure security. Invoke for SAST scans, penetration testing, DevSecOps practices, cloud security reviews.

veeramanikandanr48 946