Better Auth
einverne/dotfiles
Guide for implementing Better Auth - a framework-agnostic authentication and authorization framework for TypeScript.
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
$ npx skills add Microck/ordinary-claude-skills --skill better-auth -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Microck/ordinary-claude-skills better-auth --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Microck/ordinary-claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills_all/better-auth .claude/skills/better-auth && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "better-auth" agent skill from https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/better-auth into .claude/skills/better-auth/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-auth", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/better-authType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Microck/ordinary-claude-skills --skill better-auth -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Microck/ordinary-claude-skills better-auth --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Microck/ordinary-claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills_all/better-auth .agents/skills/better-auth && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "better-auth" agent skill from https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/better-auth into .agents/skills/better-auth/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-auth", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Microck/ordinary-claude-skills --skill better-auth -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Microck/ordinary-claude-skills better-auth --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Microck/ordinary-claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills_all/better-auth .cursor/skills/better-auth && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "better-auth" agent skill from https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/better-auth into .cursor/skills/better-auth/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-auth", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Microck/ordinary-claude-skills.git --path skills_all/better-auth--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Microck/ordinary-claude-skills --skill better-auth -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Microck/ordinary-claude-skills better-auth --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Microck/ordinary-claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills_all/better-auth .gemini/skills/better-auth && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "better-auth" agent skill from https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/better-auth into .gemini/skills/better-auth/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-auth", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Microck/ordinary-claude-skills better-authInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Microck/ordinary-claude-skills --skill better-auth -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Microck/ordinary-claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills_all/better-auth .github/skills/better-auth && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "better-auth" agent skill from https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/better-auth into .github/skills/better-auth/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-auth", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Microck/ordinary-claude-skills --skill better-auth -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Microck/ordinary-claude-skills better-auth --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Microck/ordinary-claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills_all/better-auth .opencode/skills/better-auth && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "better-auth" agent skill from https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/better-auth into .opencode/skills/better-auth/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "better-auth", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
better-authImplement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
Better Auth is an agent skill from Microck/ordinary-claude-skills. 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…
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).
It sits in Backend & APIs, covering Authorization and RBAC, Authentication and OAuth and OpenID Connect. It works with Better Auth, TypeScript, GitHub and Discord. The repository describes itself as: An unappealing collection of Claude Skills and resources. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 1056d29. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npxnpmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
better-auth.comgithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
BETTER_AUTH_SECRETGITHUB_CLIENT_SECRETFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Better Auth loads about 1.8k tokens when it runs. Until then it costs about 155 tokens; SKILL.md has 451 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
Create `.env`:Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Microck/ordinary-claude-skills at commit 1056d29, republished under its MIT licence (© Microck). 451 words, ~1,847 tokens.
.claude/skills/better-auth/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.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.
npm install better-auth
# or pnpm/yarn/bun add better-authCreate .env:
BETTER_AUTH_SECRET=<generated-secret-32-chars-min>
BETTER_AUTH_URL=http://localhost:3000Create auth.ts (root, lib/, utils/, or under src/app/server/):
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!,
}
}
});npx @better-auth/cli generate # Generate schema/migrations
npx @better-auth/cli migrate # Apply migrations (Kysely only)Next.js App Router:
// 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
Create auth-client.ts:
import { createAuthClient } from "better-auth/client";
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL || "http://localhost:3000"
});// 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 | Plugin Required | Use Case | Reference |
|---|---|---|---|
| Email/Password | No (built-in) | Basic auth | email-password-auth.md |
| OAuth (GitHub, Google, etc.) | No (built-in) | Social login | oauth-providers.md |
| Email Verification | No (built-in) | Verify email addresses | email-password-auth.md |
| Password Reset | No (built-in) | Forgot password flow | email-password-auth.md |
| Two-Factor Auth (2FA/TOTP) | Yes (twoFactor) | Enhanced security | advanced-features.md |
| Passkeys/WebAuthn | Yes (passkey) | Passwordless auth | advanced-features.md |
| Magic Link | Yes (magicLink) | Email-based login | advanced-features.md |
| Username Auth | Yes (username) | Username login | email-password-auth.md |
| Organizations/Multi-tenant | Yes (organization) | Team/org features | advanced-features.md |
| Rate Limiting | No (built-in) | Prevent abuse | advanced-features.md |
| Session Management | No (built-in) | User sessions | advanced-features.md |
Choose Email/Password when:
Choose OAuth when:
Choose Passkeys when:
Choose Magic Link when:
Combine Multiple Methods when:
Better Auth uses client-server architecture:
better-auth): Handles auth logic, database ops, API routesbetter-auth/client): Provides hooks/methods for frontendbetter-auth packagenpx @better-auth/cli generate)scripts/better_auth_init.py - Initialize Better Auth configuration with interactive setup© Microck, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills_all/better-auth of Microck/ordinary-claude-skills.
Open the folder on GitHubat commit 1056d29
Better Auth next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Better Auth this skillMicrock/ordinary-claude-skills | 401 | — | ~1.8k | Automated safety check: Notes | MIT | |
| Better Autheinverne/dotfiles | 121 | — | ~4k | Automated safety check: Notes | MIT | |
| Better Auth Best Practiceslatitude-dev/latitude-llm | 4.7k | 7 repos | ~1.6k | Automated safety check: Pass | MIT | |
| Better Authsecondsky/claude-skills | 227 | — | ~7.5k | Automated safety check: Pass | MIT | |
| Authaiskillstore/marketplace | 430 | — | ~1.6k | Automated safety check: Pass | None | |
| Better Authpproenca/dot-skills | 214 | — | ~2.2k | Automated safety check: Pass | MIT |
einverne/dotfiles
Guide for implementing Better Auth - a framework-agnostic authentication and authorization framework for TypeScript.
latitude-dev/latitude-llm
Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables.
secondsky/claude-skills
Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks.
aiskillstore/marketplace
Authentication and access control skill for Next.js 15 + Supabase applications.
pproenca/dot-skills
Better Auth in TypeScript — setting up the auth instance, picking adapters, wiring framework route handlers, configuring sessions and cookies, adding plugins (2FA, organization, admin, magicLink…
olorehq/olore
Local better-auth documentation reference (latest). An agent skill from olorehq/olore.
Microck/ordinary-claude-skills
This skill should be used when reviewing or editing copy to ensure adherence to Every's style guide.
Microck/ordinary-claude-skills
Generate and edit images using the Gemini API (Nano Banana Pro).
Microck/ordinary-claude-skills
Write Ruby gems following Andrew Kane's proven patterns and philosophy.
Microck/ordinary-claude-skills
Execute Codex CLI for code analysis, refactoring, and automated code changes.
Microck/ordinary-claude-skills
Review documentation changes for compliance with the Metabase writing style guide.
Microck/ordinary-claude-skills
This skill should be used when managing the file-based todo tracking system in the todos/ directory.
Works with
Categories
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework. Better Auth is an agent skill from Microck/ordinary-claude-skills. Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework.
Better Auth fits situations like: adding authentication to applications; implementing OAuth flows; setting up 2FA/MFA; managing user sessions.
Run `npx skills add Microck/ordinary-claude-skills --skill better-auth -a claude-code`. Or copy the skill folder (skills_all/better-auth in Microck/ordinary-claude-skills) into .claude/skills/better-auth in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Microck/ordinary-claude-skills --skill better-auth -a codex`. Or copy the skill folder (skills_all/better-auth in Microck/ordinary-claude-skills) into .agents/skills/better-auth in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Microck/ordinary-claude-skills --skill better-auth -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/better-auth, .gemini/skills/better-auth, .github/skills/better-auth and .opencode/skills/better-auth in your project.
Going by SKILL.md and its folder, Better Auth needs the command-line tools its instructions call (npx and npm) and credentials named BETTER_AUTH_SECRET and GITHUB_CLIENT_SECRET. Our summary lists: Node.js; A credential in BETTER_AUTH_SECRET; A credential in GITHUB_CLIENT_SECRET.
SKILL.md names 2 domains. As links in the text: better-auth.com and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Better Auth is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Better Auth: Better Auth (einverne/dotfiles, 121 stars), Better Auth Best Practices (latitude-dev/latitude-llm, 4.7k stars), Better Auth (secondsky/claude-skills, 227 stars) and Auth (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Microck (a GitHub user) maintains it in Microck/ordinary-claude-skills, which has 401 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on September 6, 2026.
Source: Microck/ordinary-claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.