AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Better Auth Overview And Setup

skill-andrewsrigom-agent-skills-better-auth-overview-and-setup · by andrewsrigom

Use when setting up Better Auth for the first time or routing Better Auth work to the right follow-up skill. Covers package installation, secrets, base URL, auth handler mounting, client creation, and plugin-aware setup decisions.

No reviews yet
0 installs
30 views
0.0% view→install

Install

$ agentstack add skill-andrewsrigom-agent-skills-better-auth-overview-and-setup

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-andrewsrigom-agent-skills-better-auth-overview-and-setup)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Better Auth Overview And Setup? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Better Auth Overview And Setup

Use this skill for first-time Better Auth setup and top-level architecture choices.

Scope

  • installing better-auth
  • configuring BETTER_AUTH_SECRET and BETTER_AUTH_URL
  • mounting the auth handler in the target framework
  • creating the auth client
  • choosing between email/password, social auth, or plugins
  • deciding when a task belongs to sessions, OAuth, Next.js, or plugin-specific work

Default path

  1. Install better-auth in the server boundary and client boundary if they are separate.
  2. Configure a high-entropy BETTER_AUTH_SECRET and the correct app base URL.
  3. Create the server auth instance with betterAuth(...).
  4. Mount the handler at the framework's auth route.
  5. Create the client with createAuthClient(...) and the right baseURL or basePath.
  6. Turn on only the auth methods the app actually needs.
  7. If the task introduces plugins, plan for both server plugin wiring and client plugin wiring.

When to deviate

  • Customize the auth route only if the host framework or an existing app convention truly requires it.
  • Move to the Next.js skill when the work is mostly route protection or App Router integration.
  • Move to the social or plugin skills when the task introduces providers, organizations, SSO, or plugin-specific contracts.
  • Treat dynamic base URL handling as required when previews, multi-domain setups, or changing origins are in play.

Guardrails

  • Keep secrets server-only.
  • Do not guess the deployed base URL when previews or custom domains are involved.
  • Keep the auth route stable unless there is a strong reason to customize it.
  • Treat Better Auth as the auth boundary for sessions and provider callbacks instead of hand-rolling adjacent routes.
  • Use the official client package for the target environment (client, react, etc.) when hooks or reactive helpers are needed.

Common Routing Cues

  • Better Auth installation, betterAuth, createAuthClient, BETTER_AUTH_SECRET, BETTER_AUTH_URL, auth route setup, base URL, base path, auth handler

Avoid

  • hand-rolling provider callback routes or session routes outside Better Auth
  • exposing secrets or provider credentials to the client
  • enabling auth methods “just in case” instead of choosing the ones the app actually needs
  • hardcoding a production base URL when the app has preview or multi-domain environments

Verification checklist

  • BETTER_AUTH_SECRET is high-entropy and server-only
  • BETTER_AUTH_URL or dynamic base URL handling matches the deployment model
  • the auth handler route is mounted and stable
  • the client is created with the correct base URL or base path
  • follow-up work is routed to sessions, social auth, Next.js, or plugin skills when the setup step is complete

Output Shape

When answering with this skill, prefer:

  • required packages
  • required env vars
  • auth server file shape
  • auth client file shape
  • which follow-up Better Auth skill owns the next step

Official References

  • https://better-auth.com/docs/installation
  • https://better-auth.com/docs/basic-usage
  • https://better-auth.com/docs/concepts/client
  • https://better-auth.com/docs/concepts/dynamic-base-url

Current snapshot

  • Checked against official docs on 2026-04-03
  • Current npm line verified live on 2026-04-03: better-auth@1.5.6
  • Core setup docs in scope: installation, basic usage, client concepts, and dynamic base URL

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.