better-auth
Skill by giuseppe-trisciuoglio
Provides Better Auth integration patterns for NestJS backend and Next.js frontend with Drizzle ORM and PostgreSQL. It helps developers set up authentication, social login, session handling and plugins such as 2FA and passkeys.
Install better-auth
Built from the published package, never by AI.
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit /tmp/developer-kit && mkdir -p ~/.claude/skills && cp -r /tmp/developer-kit/plugins/developer-kit-typescript/skills/better-auth ~/.claude/skills/better-authRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit /tmp/developer-kit && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/developer-kit/plugins/developer-kit-typescript/skills/better-auth ~/.gemini/antigravity-cli/skills/better-authAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The better-auth skill gives an AI assistant integration patterns for Better Auth, a type-safe TypeScript authentication framework. It covers a NestJS backend with Drizzle ORM and PostgreSQL, and a Next.js App Router frontend. The guide follows four phases: database setup, backend setup, frontend setup, and plugins.
It also covers social login with GitHub and Google, email and password authentication with session management, and protected routes and middleware. Plugin coverage includes 2FA, Organization, SSO, Magic Link and Passkey. Reference files cover NestJS setup, Next.js setup, MFA, passkeys, the Drizzle schema and social providers. It is aimed at developers building TypeScript apps with these tools.
Written from the project's SKILL.md and checked against it.
What it can do
- Database setup with DrizzleConfigures a Drizzle schema for PostgreSQL and runs migrations.
- NestJS backend setupCreates a Better Auth instance and an auth controller in NestJS.
- Next.js frontend setupConfigures an auth client, adds middleware and creates a sign-in page.
- Social loginSets up social providers such as GitHub and Google.
- Two-factor authenticationCovers TOTP 2FA with OTP sending and trusted devices.
- Passkey sign-inCovers WebAuthn passkey registration and passwordless sign-in.
- Organizations and SSOCovers multi-tenant organizations and SSO configuration.
- Magic linkCovers passwordless sign-in through magic links.
- Protected routesRedirects unauthenticated users away from routes such as /dashboard.
What you need
- Node.js 18 or later
- PostgreSQL database
- OAuth provider client ID and secret, such as GitHub or Google
- HTTPS for OAuth callbacks
Try asking
- Set up Better Auth with a NestJS backend and Drizzle ORM on PostgreSQL.
- Add GitHub and Google social login to my Next.js App Router app.
- Enable passkey sign-in and 2FA with trusted devices in Better Auth.
Good to know
- Passkeys require HTTPS and compatible browsers.
- OAuth callbacks need HTTPS, so local testing needs a tool such as ngrok.
- Better Auth requires Node.js 18+ for Next.js App Router support.
- Organization features require additional database tables.
Security check
B- Allowed to use Write, Edit, Bash without limitsIn
SKILL.md
Checked automatically: plugins/developer-kit-typescript/skills/better-auth/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadWriteEditGlobGrepBash
Alternatives to better-auth
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
better-auth: common questions
Does this skill handle password hashing?
Better Auth handles password hashing automatically. The skill says never to implement custom hashing.
Which database does it cover?
The patterns use PostgreSQL with Drizzle ORM and the pg package.
Which plugins are covered?
The source covers 2FA, passkey, organizations, SSO and magic link, with details in the plugins reference.
How do I install better-auth?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is better-auth free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is better-auth safe to use?
It scores 68 of 100. Grades: maintenance B, licence A, quality B. Security check: grade B (allowed to use write, edit, bash without limits). Review the code before you install. How grades work.
What are alternatives to better-auth?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
