better-auth
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
Skill by vibery-studio
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/vibery-studio-better-auth
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, security, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
better-auth- Description
- Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework. Features include email/password authentication with verification, OAuth providers (Google, GitHub, Discord, etc.), two-factor authentication (TOTP, SMS), passkeys/WebAuthn support, session management, role-based access control (RBAC), rate limiting, and database adapters. Use when adding authentication to applications, implementing OAuth flows, setting up 2FA/MFA, managing user sessions, configuring authorization rules, or building secure authentication systems for web applications.
- License
- MIT
- Instructions
- 209 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (10)
- SKILL.md
- advanced-features.md · references/
- database-integration.md · references/
- email-password-auth.md · references/
- oauth-providers.md · references/
- .coverage · scripts/
- better_auth_init.py · scripts/
- requirements.txt · scripts/
- .coverage · scripts/tests/
- test_better_auth_init.py · scripts/tests/
SKILL.md (first lines)
# Better Auth Skill
Better Auth is comprehensive, framework-agnostic authentication/authorization framework for TypeScript with built-in email/password, social OAuth, and powerful plugin ecosystem for advanced features.
## When to Use
- Implementing auth in TypeScript/JavaScript applications
- Adding email/password or social OAuth authentication
- Setting up 2FA, passkeys, magic links, advanced auth features
- Building multi-tenant apps with organization support
- Managing sessions and user lifecycle
- Working with any framework (Next.js, Nuxt, SvelteKit, Remix, Astro, Hono, Express, etc.)
## Quick Start
### Installation
```bash
npm install better-auth
# or pnpm/yarn/bun add better-auth
```
### Environment Setup
Create `.env`:
```env
BETTER_AUTH_SECRET=<generated-secret-32-chars-min>
BETTER_AUTH_URL=http://localhost:3000
```
### Basic Server Setup
Create `auth.ts` (root, lib/, utils/, or under src/app/server/):
```ts
import { betterAuth } from "better-auth";
export const auth = betterAuth({
database: {
// See references/database-integration.md
},
emailAndPassword: {
enabled: true,
autoSignIn: true,
},
socialProviders: {
github: {
clientId: process.env.GITHUB_CLIENT_ID!,
clientSecret: process.env.GITHUB_CLIENT_SECRET!,
},
},
});
```
### Database Schema
```bash
npx @better-auth/cli generate # Generate schema/migrations
npx @better-auth/cli migrate # Apply migrations (Kysely only)
```
### Mount API Handler
**Next.js App Router:**
```ts
// app/api/auth/[...all]/route.ts
import { auth } from "@/lib/auth";
import { toNextJsHandler } from "better-auth/next-js";
export const { POST, GET } = toNextJsHandler(auth);
```
**Other frameworks:** See references/email-password-auth.md#framework-setup
### Client Setup
Create `auth-client.ts`:
```ts
import { createAuthClient } from "better-auth/client";
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL || "http://localhost:3000",
});
```
### Basic Usage
```ts
// Sign up
await authClient.signUp.email({
email: "user@example.com",
password: "secure123",
name: "John Doe",
});
// Sign in
await authClient.signIn.email({
email: "user@example.com",
password: "secure123",
});
// OAuth
await authClient.signIn.social({ provider: "github" });
// Session
const { data: session } = authClient.useSession(); // React/Vue/Svelte
const { data: session } = await authClient.getSession(); // Vanilla JS
```
## Feature Selection Matrix
| Feature | Plugin Required | Use Case | Reference |
| ---------------------------- | -------------------- | ---------------------- | ------------------------------------------------------------------------------------- |
| Email/Password | No (built-in) | Basic auth | [email-password-auth.md](./references/email-password-auth.md) |
| OAuth (GitHub, Google, etc.) | No (built-in) | Social login | [oauth-providers.md](./references/oauth-providers.md) |
| Email Verification | No (built-in) | Verify email addresses | [email-password-auth.md](./references/email-password-auth.md#email-verification) |From vibery-studio/templates, MIT.
More from vibery-studio/templates
- 0.449score
context-engineering
vibery-studio
Master context engineering for AI agents - token optimization, degradation patterns, compression, memory systems, multi-agent coordination, evaluation.
SkillDFreshness: D★ 3Claude Code +9 - 0.446score
google-adk-python
vibery-studio
Build AI agents with Google's Agent Development Kit (ADK) Python - an open-source toolkit for building, evaluating, and deploying AI agents.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
brand-guidelines
vibery-studio
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
canvas-design
vibery-studio
Create beautiful visual art in .png and .pdf documents using design philosophy.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
algorithmic-art
vibery-studio
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
doc-coauthoring
vibery-studio
Guide users through a structured workflow for co-authoring documentation.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
frontend-design
vibery-studio
Create distinctive, production-grade frontend interfaces with high design quality.
SkillDFreshness: D★ 3Claude Code +9 - 0.235score
claude-code
vibery-studio
No description from the publisher yet.
SkillDFreshness: D★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Dec 31, 2025 (10 months ago)
- Last release
- Mar 3, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/vibery-studio/templates
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.654score
better-auth
VoDaiLocz
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
SkillAFreshness: A★ 28Claude Code +9 - 0.275score
better-auth
rafaelcalleja
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
SkillDFreshness: D★ 4Claude Code +9
More from vibery-studio
- 0.449score
context-engineering
vibery-studio
Master context engineering for AI agents - token optimization, degradation patterns, compression, memory systems, multi-agent coordination, evaluation.
SkillDFreshness: D★ 3Claude Code +9 - 0.446score
google-adk-python
vibery-studio
Build AI agents with Google's Agent Development Kit (ADK) Python - an open-source toolkit for building, evaluating, and deploying AI agents.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
brand-guidelines
vibery-studio
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
canvas-design
vibery-studio
Create beautiful visual art in .png and .pdf documents using design philosophy.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
algorithmic-art
vibery-studio
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.
SkillDFreshness: D★ 3Claude Code +9 - 0.419score
doc-coauthoring
vibery-studio
Guide users through a structured workflow for co-authoring documentation.
SkillDFreshness: D★ 3Claude Code +9
Cite this page
better-auth skill. Agent Mart. https://agentmart.dev/skills/vibery-studio-better-auth (last updated 2026-10-24)