Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
spences10 avatar

Auth Patterns

  • 4 installs
  • 6 repo stars
  • Updated August 3, 2026
  • spences10/devhub-crm

Helps with ai & agent building tasks.

About

auth-patterns is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • auth-patterns
  • AI & Agent Building
  • AI-coding skill

Auth Patterns by the numbers

  • 4 all-time installs (skills.sh)
  • Ranked #13,372 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/spences10/devhub-crm --skill auth-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs4
repo stars6
Last updatedAugust 3, 2026
Repositoryspences10/devhub-crm

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Auth Patterns

Quick Pattern

// Login form
export const login = form(schema, async ({ email, password }) => {
	const event = getRequestEvent();
	await auth.api.signInEmail({
		body: { email, password },
		headers: event.request.headers,
	});
	redirect(303, '/dashboard'); // Outside try/catch
});

// Protected query
export const get_data = guarded_query(() => {
	return { message: 'Protected data' };
});

Core Principles

  • Use getRequestEvent() for headers (cookie access)
  • Redirect MUST be outside try/catch (throws error)
  • Use guarded_query/form/command for protected endpoints
  • Email verification required before login
  • Commands cannot redirect - use client-side goto()

Reference Files

  • auth-setup.md - Complete better-auth

configuration

  • auth-usage.md - All auth patterns and

examples

  • email-verification.md - Email

verification flow

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.