Individual skill
better-auth-scaffold
Scaffolds a Better Auth setup in a Next.js (App Router) + Drizzle project — lib/auth.ts, lib/auth-client.ts, the /api/auth/[...all] route handler, middleware.ts, .env.example, and a permissions module. Produces convention-enforced templates for three plugin presets (minimal, social, advanced with twoFactor+magicLink). Trigger even when the user doesn't explicitly say "scaffold" — phrases like "set up Better Auth", "wire up auth", "initialize auth in this project", or "add auth to Next.js" should pull this in. Pairs with the `better-auth` skill, which covers the rules these templates encode.
skills/.experimental/better-auth-scaffold/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
- engineering-web Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 6,595 bytesSKILL.mdcore · 6,595 bytesassets/templates/auth-client.ts.templateasset · 1,188 bytesassets/templates/auth.ts.templateasset · 3,912 bytesassets/templates/db-index.ts.templateasset · 1,942 bytesassets/templates/db-schema-better-auth.ts.templateasset · 4,611 bytesassets/templates/email.ts.templateasset · 1,790 bytesassets/templates/env.templateasset · 1,667 bytesassets/templates/middleware.ts.templateasset · 1,507 bytesassets/templates/permissions.ts.templateasset · 1,920 bytesassets/templates/route.ts.templateasset · 706 bytesassets/templates/sign-in-page.tsx.templateasset · 3,107 bytesconfig.jsonasset · 1,183 bytesgotchas.mddoc · 220 bytesmetadata.jsonasset · 1,378 bytesreferences/conventions.mddoc · 7,526 bytes
Read excerpt
# Better Auth Scaffold (Next.js + Drizzle)
Parameterized templates for bootstrapping a Better Auth setup in a Next.js App Router project using the Drizzle adapter. Each template enforces the conventions documented in [`references/conventions.md`](references/conventions.md) — file layout, plugin ordering, env handling, runtime selection.
## When to Apply
Reference these templates when:
- Starting a new Next.js project that needs authentication
- Adding Better Auth to an existing Next.js + Drizzle codebase
- Refactoring a partial Better Auth setup that's missing the catch-all route, middleware, or `nextCookies()` ordering
- Generating a per-feature variant (minimal, social, advanced) on top of an existing project
## Setup
### Required parameters