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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/leonaaardob/lb-better-auth-skillWhat 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
- "How do I configure the Drizzle adapter in my Next.js project to work with Better Auth?"
- "Can you provide a step-by-step guide on setting up Google OAuth with Better Auth, including the required environment variables?"
- "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
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-leonaaardob-lb-better-auth-skill": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read
Related Skills
shadcn/ui
Complete shadcn/ui documentation. Beautifully designed components built with Radix UI and Tailwind CSS. Copy-paste into your apps. Covers installation, components, theming, forms, charts, and framework integrations.
tailwind
Complete Tailwind CSS documentation. Use when working with Tailwind CSS utility classes, responsive design, dark mode, animations, custom configurations, plugins, or styling questions. Covers all utility classes, modifiers, configuration options, and best practices.
zod
Complete Zod validation library documentation. Use when working with Zod schema validation, TypeScript type inference, form validation, API validation, error handling, or data parsing. Covers schema definition, refinements, transforms, error customization, and ecosystem integrations.
bmad-method
Use BMad (Breakthrough Method of Agile AI Driven Development) framework for AI-driven development. Use for: architecture analysis, sprint planning, story generation, PRD creation, and full development workflows. Requires coding-agent skill with Claude Code.
motion
Complete Motion.dev documentation - modern animation library for React, JavaScript, and Vue (formerly Framer Motion)