Better Auth
einverne/dotfiles
Guide for implementing Better Auth - a framework-agnostic authentication and authorization framework for TypeScript.
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…
$ npx skills add pproenca/dot-skills --skill better-auth -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pproenca/dot-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/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/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/pproenca/dot-skills/tree/master/skills/.experimental/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/pproenca/dot-skills/tree/master/skills/.experimental/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 pproenca/dot-skills --skill better-auth -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pproenca/dot-skills better-auth --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.experimental/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/pproenca/dot-skills/tree/master/skills/.experimental/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 pproenca/dot-skills --skill better-auth -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pproenca/dot-skills better-auth --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.experimental/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/pproenca/dot-skills/tree/master/skills/.experimental/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/pproenca/dot-skills.git --path skills/.experimental/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 pproenca/dot-skills --skill better-auth -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pproenca/dot-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/pproenca/dot-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.experimental/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/pproenca/dot-skills/tree/master/skills/.experimental/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 pproenca/dot-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 pproenca/dot-skills --skill better-auth -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.experimental/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/pproenca/dot-skills/tree/master/skills/.experimental/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 pproenca/dot-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 pproenca/dot-skills better-auth --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.experimental/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/pproenca/dot-skills/tree/master/skills/.experimental/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-authBetter Auth in TypeScript — setting up the auth instance, picking adapters, wiring framework route handlers, configuring sessions and cookies, adding plugins (2FA, organization, admin, magicLink…
Better Auth is an agent skill from 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, JWT), or porting from NextAuth/Auth.js, Clerk, Auth0, or Supabase Auth. Covers Next.js, SvelteKit, Hono, Express, Nuxt, Astro, and React/Vue/Svelte clients. Trigger when writing, reviewing, or migrating Better Auth code — and even when the user doesn't explicitly mention Better Auth but is working on TypeScript…
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 49 other files, including reference files and assets (for example `AGENTS.md`, `assets/templates/_template.md` and `metadata.json`).
It sits in Backend & APIs, covering Authentication, Static sites and blogs and OAuth and OpenID Connect. It works with Better Auth, TypeScript, Supabase and Astro. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cf93c57. 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.
No scripts in the folder and no shell commands in SKILL.md.
From 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.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
BETTER_AUTH_SECRETFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Better Auth loads about 2.2k tokens when it runs, and up to ~30k if it reads all its reference files. Until then it costs about 164 tokens; SKILL.md has 642 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 found no risky patterns in SKILL.md.
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 pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 642 words, ~2,204 tokens.
.claude/skills/better-auth/SKILL.md (or your agent's skills folder). This skill also uses 46 other files; get the full folder from GitHub.Implementation and migration guide for Better Auth, the framework-agnostic TypeScript authentication and authorization library. This skill contains 42 rules organized by impact across 8 categories, derived from the official documentation and migration guides.
Reference these guidelines when:
lib/auth.ts, auth-client.ts, or /api/auth/ route handlers| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Setup & Configuration | CRITICAL | setup- |
| 2 | Database Adapters & Schema | CRITICAL | db- |
| 3 | API Route Handlers | CRITICAL | route- |
| 4 | Session & Cookies | HIGH | session- |
| 5 | Auth Methods & Providers | HIGH | auth- |
| 6 | Security & Hardening | HIGH | security- |
| 7 | Plugins & Extensions | MEDIUM | plugins- |
| 8 | Migration from Other Auth | MEDIUM | migrate- |
setup-secret — Set a strong BETTER_AUTH_SECRET per environmentsetup-base-url — Configure an explicit baseURL per environmentsetup-client-base-url — Match the client baseURL to the serversetup-singleton — Export a single auth instance from a server-only modulesetup-trusted-origins — Configure trustedOrigins for all non-baseURL callersdb-adapter-selection — Pick the adapter that matches your ORMdb-schema-generate — Run auth generate then ORM migrate before every deploydb-additional-fields — Extend the user schema via additionalFieldsdb-plugin-schema-customization — Rename plugin tables via the schema optiondb-database-hooks — Use databaseHooks for cross-cutting logicdb-connection-pooling — Share one pooled DB client with the rest of your approute-mount-catchall — Mount the catch-all handler at /api/auth/[...all]route-runtime-selection — Use the Node.js runtime for middleware that calls auth.apiroute-no-body-consumers — Mount auth before any body-parsing middlewaresession-server-vs-client — Use auth.api.getSession on server, authClient.useSession on clientsession-expiry-tuning — Configure expiresIn and updateAge togethersession-cookie-cache — Enable cookieCache to cut session DB lookupssession-cookie-attributes — Set sameSite, secure, partitioned for cross-site flowssession-cross-subdomain — Enable crossSubDomainCookies for multi-subdomain appssession-customsession-fields — Use customSession to add computed fieldsauth-require-email-verification — Enable requireEmailVerification with sendVerificationEmailauth-oauth-redirect-uri — Match OAuth redirectURI exactly with the provider consoleauth-oauth-env-vars — Load OAuth credentials from environment, never inlineauth-magic-link-setup — Implement sendMagicLink before enabling the magicLink pluginauth-client-sign-in-helpers — Use authClient.signIn.social with callbackURLauth-infer-additional-fields — Add inferAdditionalFields to the client for type syncsecurity-rate-limit — Enable rateLimit with persistent storage in productionsecurity-password-hash-interop — Override hash function when migrating from bcrypt/argon2security-revoke-on-password-reset — Enable revokeSessionsOnPasswordResetsecurity-min-password-length — Set minPasswordLength to at least 10security-trusted-origins-strict — Never wildcard trustedOriginsplugins-next-cookies-last — Place nextCookies() as the LAST plugin in Next.jsplugins-two-factor-issuer — Set appName as the 2FA issuerplugins-shared-access-control — Define ac + roles once, share server/clientplugins-pair-client-server — Pair every server plugin with its client counterpartplugins-organization-active-context — Set active organization on sessionplugins-jwt-when-to-use — Use the jwt plugin only for external service consumersplugins-admin-impersonation — Use admin plugin's impersonate method for support accessmigrate-parallel-cutover — Run Better Auth alongside legacy auth during cutovermigrate-oauth-account-mapping — Map legacy OAuth identities to account rowsmigrate-force-allow-id — Use forceAllowId to preserve existing user IDsmigrate-nextauth-schema-mapping — Map NextAuth v5 columns field-by-fieldFor a fresh implementation, read in priority order: start with all setup- rules, then db-, then route- — these CRITICAL categories must be correct or nothing else works. After the foundation, pick the rules that match your scope: session- for cookie/expiry tuning, auth- for provider configuration, security- for production hardening.
For a migration from another auth library, read migrate-parallel-cutover first (strategy), then security-password-hash-interop (preserve user passwords), then migrate-oauth-account-mapping and migrate-nextauth-schema-mapping (data layout).
Read individual reference files for detailed explanations, incorrect vs. correct code examples, and links to the canonical Better Auth documentation.
| File | Description |
|---|---|
| references/_sections.md | Category definitions ordered by impact |
| assets/templates/_template.md | Template for adding new rules |
| metadata.json | Version, references, and discipline metadata |
© pproenca, 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 46 other files (references, assets) in skills/.experimental/better-auth of pproenca/dot-skills.
Open the folder on GitHubat commit cf93c57
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 skillpproenca/dot-skills | 214 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Better Autheinverne/dotfiles | 121 | — | ~4k | Automated safety check: Notes | MIT | |
| Supabasecurvenote/curvenote | 169 | 5 repos | ~2.2k | Automated safety check: Pass | Custom licence | |
| Supabase Development and Debuggingsupabase/agent-skills | 2.7k | 3 repos | ~3.6k | Automated safety check: Pass | MIT | |
| Better Auth Best Practiceslatitude-dev/latitude-llm | 4.7k | 7 repos | ~1.6k | Automated safety check: Pass | MIT | |
| Clerkgeekskai/blog | 103 | 3 repos | ~1.5k | Automated safety check: Pass | MIT |
einverne/dotfiles
Guide for implementing Better Auth - a framework-agnostic authentication and authorization framework for TypeScript.
curvenote/curvenote
A skill your agent uses when doing ANY task involving Supabase.
supabase/agent-skills
General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.
latitude-dev/latitude-llm
Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables.
geekskai/blog
Clerk authentication router. An agent skill from geekskai/blog.
secondsky/claude-skills
Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks.
pproenca/dot-skills
Audio forensics and voice recovery guidelines for CSI-level audio analysis.
pproenca/dot-skills
Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.
pproenca/dot-skills
Create well-structured RFCs and technical proposals for software projects.
pproenca/dot-skills
Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.
pproenca/dot-skills
Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…
pproenca/dot-skills
Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…
Categories
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…. Better Auth is an agent skill from pproenca/dot-skills.js, Clerk, Auth0, or Supabase Auth.
Better Auth fits situations like: migrating Better Auth code — and even when the user doesnt explicitly mention Better Auth but is working on TypeScript authentication; session cookies; OAuth providers; auth-library migration.
Run `npx skills add pproenca/dot-skills --skill better-auth -a claude-code`. Or copy the skill folder (skills/.experimental/better-auth in pproenca/dot-skills) into .claude/skills/better-auth in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pproenca/dot-skills --skill better-auth -a codex`. Or copy the skill folder (skills/.experimental/better-auth in pproenca/dot-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 pproenca/dot-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 credentials named BETTER_AUTH_SECRET. Our summary lists: Node.js; A credential in BETTER_AUTH_SECRET.
SKILL.md names 1 domain. As links in the text: better-auth.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Better Auth is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 28k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Better Auth: Better Auth (einverne/dotfiles, 121 stars), Supabase (curvenote/curvenote, 169 stars), Supabase Development and Debugging (supabase/agent-skills, 2.7k stars) and Better Auth Best Practices (latitude-dev/latitude-llm, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.
Source: pproenca/dot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.