# Build Better Auth Authentication

Authentication setup requires coordinated framework, database, provider, route, and interface changes. This skill plans and implements a Better Auth integration for your application.

## Install

```bash
npx skillstore add better-auth/create-auth-skill
```

## Metadata

- Status: approved
- Slug: better-auth-create-auth-skill
- Skillstore revision: r1
- Version status: missing
- Tree hash: 198dba8a28ca0f8eb314265a5d6ec4bf5d9ce821754da10745900c6be3e6643c
- Author: better-auth
- GitHub username: better-auth
- License: MIT
- Repository: https://github.com/better-auth/skills/tree/main/better-auth/create-auth/
- Ref: d71c7417a35d5c2624161bd2fe8de8a41a362128
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, env\_access
- Quality score: 69
- Public page: https://skillstore.pages.dev/skills/better-auth-create-auth-skill
- Manifest: https://skillstore.pages.dev/api/skills/better-auth-create-auth-skill/manifest

## Capabilities

- Detects supported frameworks, package managers, databases, ORMs, and existing authentication libraries.
- Collects authentication methods, providers, plugins, email requirements, and interface preferences.
- Creates Better Auth server, client, route handler, and environment configuration.
- Configures Prisma, Drizzle, MongoDB, PostgreSQL, MySQL, or SQLite database integrations.
- Adds OAuth, email authentication, two-factor authentication, organizations, passkeys, and related plugins.
- Builds authentication pages and provides migration, deployment, testing, and security guidance.

## Use Cases

- Launch Authentication: Create sign-in, sign-up, session, route, database, and provider integration for a new web application.
- Add Auth to an Existing App: Inspect the current architecture and integrate Better Auth without replacing unrelated application structure.
- Migrate Authentication: Plan an incremental transition from another authentication library while preserving routes, sessions, and user flows.

## Prompt Templates

### Create Basic Authentication

```
Add Better Auth to this project with email and password sign-in. Inspect the framework and database, then ask for missing requirements.
```

### Add Social Providers

```
Configure Better Auth with Google and GitHub OAuth. Include callback routes, required environment variables, sign-in pages, and provider setup steps.
```

### Migrate Existing Authentication

```
Audit the current authentication implementation and plan a staged Better Auth migration. Preserve active sessions where feasible and identify compatibility risks.
```

### Build Enterprise Authentication

```
Implement Better Auth with organizations, two-factor authentication, passkeys, email verification, rate limits, and production migrations. Review every security-sensitive configuration.
```

## Limitations

- Supports TypeScript and JavaScript applications that can use Better Auth.
- Requires users to provide database access, OAuth credentials, email services, and deployment settings.
- Database migrations and package installation can change project and database state.
- Generated interfaces may require adjustment for existing design systems and accessibility requirements.

## Best Practices

- Confirm the implementation plan before changing dependencies, files, or database schemas.
- Store secrets in environment variables and configure secure cookies, trusted origins, verification, and rate limits.
- Pin package versions, review generated migrations, and back up production databases before applying changes.

## Anti Patterns

- Do not disable CSRF protection or weaken cookie security to resolve configuration errors.
- Do not embed database URLs, authentication secrets, or OAuth credentials in source files.
- Do not run development schema push commands against production databases.

## Security Audit

- Audited at: 2026-07-12T14:39:20.321\+00:00
- Summary: Contextual review confirmed five findings because the skill directs package installation and database migration commands. Other matches are documentation syntax, links, configuration examples, or standard environment access. No prompt injection or data exfiltration intent was found.

## Stats

- Views: 151
- Downloads: 10
- Favorites: 0
- Popularity score: 0
