better-auth

Manage authentication flows and generate schemas via npm scripts.

Updated Nov 19, 2025
One-click install
npx skills add https://github.com/alexturpin/cf-app-starter --skill better-auth-alexturpin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/alexturpin/cf-app-starter/tree/main/.opencode/skills/better-auth
Command: npx skills add https://github.com/alexturpin/cf-app-starter --skill better-auth-alexturpin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the process of managing user authentication and generating necessary schemas, reducing boilerplate code and potential errors.

Core Features & Use Cases

  • Session Management: Easily access user session data on the server-side.
  • Provider Configuration: Add and configure authentication providers and user fields.
  • Schema Generation: Automatically generate authentication-related schemas.
  • Use Case: Securely access logged-in user information within your application's backend logic.

Quick Start

Use getSession from '@/functions/auth' to access server-side session data.

Frequently Asked Questions about better-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access server-side session data for user authentication?

Retrieve server-side session data by importing getSession from @/functions/auth. This function allows your backend logic to securely access logged-in user information.

How do I configure authentication providers and custom user fields?

Configure authentication providers and custom user fields through dynamic configuration settings. You must run a specific npm script afterward to generate updated schemas reflecting those changes.

How do I automatically generate authentication-related schemas?

Automatically generate authentication-related schemas by executing an npm script provided by the Skill. This step is required after making any configuration changes to auth providers or user fields.

Do I need to run scripts manually after changing authentication configuration?

Yes, you need to run a specific npm script manually after changing authentication configuration. This generates updated schemas required to reflect your dynamic auth provider and user field modifications.

What is the best way to reduce boilerplate code for session management?

Using a structured authentication Skill reduces boilerplate code for session management by simplifying provider configuration and automatically generating necessary schemas, which prevents potential errors.