Agent skill · software engineering · aiskillstore

authentication-logic

Guide to using Better Auth for client and server-side authentication.

Why this skill is useful

Provides specific usage patterns and integration details for Better Auth that the AI wouldn't reliably generate on its own.

What it needs

Requires better-auth account access. About 1k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Authentication Logic Overview We use Better Auth (better-auth) for identifying users. Config Client: lib/auth-client.ts exports authClient. Server: lib/auth.ts exports auth. Client-Side Usage Use authClient for signing in, signing out, and checking session state in Client Components. Server-Side Usage Use auth.api.getSession for protecting API routes or Server Actions. AuthBar Component Located at textbook/src/components/AuthBar/index.tsx. Displays user avatar or login button. Fetches session from /api/auth/session (Next.js API route proxying Better Auth).

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/authentication-logic

View the source on GitHub

Browse the @skills marketplace