better-auth
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
Skill by wollfoo
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/wollfoo-better-auth-f1c82e
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. | Sử dụng khi xác thực, đăng nhập, login, auth, OAuth, session, bảo mật, phiên đăng nhập.
- License
- MIT
- Instructions
- 199 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (8)
- SKILL.md
- advanced-features.md · references/
- database-integration.md · references/
- email-password-auth.md · references/
- oauth-providers.md · references/
- better_auth_init.py · scripts/
- requirements.txt · scripts/
- 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) |
| Password Reset | No (built-in) | Forgot password flow | [email-password-auth.md](./references/email-password-auth.md#password-reset) |
| Two-Factor Auth (2FA/TOTP) | Yes (`twoFactor`) | Enhanced security | [advanced-features.md](./references/advanced-features.md#two-factor-authentication) |From wollfoo/setup-opencode, MIT.
More from wollfoo/setup-opencode
- 0.414score
payment-integration
wollfoo
Implement payment integrations with SePay (Vietnamese payment gateway with VietQR, bank transfers, cards) and Polar (global SaaS monetization platform with…
SkillDFreshness: DClaude Code +9 - 0.414score
mobile-development
wollfoo
Build modern mobile applications with React Native, Flutter, Swift/SwiftUI, and Kotlin/Jetpack Compose.
SkillDFreshness: DClaude Code +9 - 0.414score
media-processing
wollfoo
Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation…
SkillDFreshness: DClaude Code +9 - 0.414score
backend-development
wollfoo
Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB…
SkillDFreshness: DClaude Code +9 - 0.410score
devops
wollfoo
Deploy and manage cloud infrastructure on Cloudflare (Workers, R2, D1, KV, Pages, Durable Objects, Browser Rendering), Docker containers, and Google Cloud…
SkillDFreshness: DClaude Code +9 - 0.409score
aesthetic
wollfoo
Create aesthetically beautiful interfaces following proven design principles.
SkillDFreshness: DClaude Code +9 - 0.409score
code-review
wollfoo
Use when receiving code review feedback (especially if unclear or technically questionable), when completing tasks or major features requiring review before…
SkillDFreshness: DClaude Code +9 - 0.409score
docs-seeker
wollfoo
Search technical documentation using executable scripts to detect query type, fetch from llms.txt sources (context7.com), and analyze results.
SkillDFreshness: DClaude Code +9 - 0.409score
google-adk-python
wollfoo
Build AI agents with Google's Agent Development Kit (ADK) Python - code-first toolkit for agent orchestration, tool integration, multi-agent systems, workflow…
SkillDFreshness: DClaude Code +9 - 0.409score
mcp-management
wollfoo
Manage Model Context Protocol (MCP) servers - discover, analyze, and execute tools/prompts/resources from configured MCP servers.
SkillDFreshness: DClaude Code +9 - 0.405score
document-skills
wollfoo
Process and manipulate office documents including PDF, DOCX, PPTX, and XLSX files.
SkillDFreshness: DClaude Code +9 - 0.405score
frontend-development
wollfoo
Frontend development guidelines for React/TypeScript applications.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jan 30, 2026 (9 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/wollfoo/setup-opencode
- 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.
More from wollfoo
- 0.414score
media-processing
wollfoo
Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation…
SkillDFreshness: DClaude Code +9 - 0.414score
backend-development
wollfoo
Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB…
SkillDFreshness: DClaude Code +9 - 0.414score
databases
wollfoo
Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin).
SkillDFreshness: DClaude Code +9 - 0.414score
chrome-devtools
wollfoo
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts.
SkillDFreshness: DClaude Code +9 - 0.414score
better-auth
wollfoo
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
SkillDFreshness: DClaude Code +9 - 0.414score
mobile-development
wollfoo
Build modern mobile applications with React Native, Flutter, Swift/SwiftUI, and Kotlin/Jetpack Compose.
SkillDFreshness: DClaude Code +9
Cite this page
better-auth skill. Agent Mart. https://agentmart.dev/skills/wollfoo-better-auth-f1c82e (last updated 2026-10-24)