skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
pproenca/dot-skills132 installs

better-auth

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 authentication, session cookies, OAuth providers, or auth-library migration. Contains 42 rules organized by impact across 8 categories.

How do I install this agent skill?

npx skills add https://github.com/pproenca/dot-skills --skill better-auth
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides a comprehensive set of best practices and security hardening rules for the Better Auth TypeScript library. It promotes secure coding practices such as using environment variables for secrets, implementing CSRF protection via trusted origins, and enabling rate limiting for authentication endpoints. No malicious patterns, obfuscation, or unauthorized data access attempts were detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Better Auth Best Practices

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.

When to Apply

Reference these guidelines when:

  • Setting up a fresh Better Auth instance (config, adapter, route handler, client)
  • Wiring framework-specific integrations (Next.js App/Pages Router, SvelteKit, Hono, Express, Nuxt, Astro)
  • Configuring sessions, cookies, and security (rate limit, trusted origins, password hashing)
  • Adding plugins: 2FA, organization, admin, magicLink, JWT, passkey, multi-session
  • Migrating from another auth library (NextAuth/Auth.js, Clerk, Auth0, Supabase Auth)
  • Debugging "session is null" / "redirect_uri_mismatch" / 403 CSRF errors
  • Reviewing PRs that touch lib/auth.ts, auth-client.ts, or /api/auth/ route handlers

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Setup & ConfigurationCRITICALsetup-
2Database Adapters & SchemaCRITICALdb-
3API Route HandlersCRITICALroute-
4Session & CookiesHIGHsession-
5Auth Methods & ProvidersHIGHauth-
6Security & HardeningHIGHsecurity-
7Plugins & ExtensionsMEDIUMplugins-
8Migration from Other AuthMEDIUMmigrate-

Quick Reference

1. Setup & Configuration (CRITICAL)

2. Database Adapters & Schema (CRITICAL)

3. API Route Handlers (CRITICAL)

4. Session & Cookies (HIGH)

5. Auth Methods & Providers (HIGH)

6. Security & Hardening (HIGH)

7. Plugins & Extensions (MEDIUM)

8. Migration from Other Auth (MEDIUM)

How to Use

For 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.

Reference Files

FileDescription
references/_sections.mdCategory definitions ordered by impact
assets/templates/_template.mdTemplate for adding new rules
metadata.jsonVersion, references, and discipline metadata

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/pproenca/dot-skills/better-auth">View better-auth on skillZs</a>