
Better Auth Plugins
This walks Claude through Better Auth's plugin system for adding authentication features like 2FA, magic links, passkeys, and organizations to TypeScript apps. You'll use it when you need to extend basic auth with server-side plugins and their matching client-side counterparts. The skill covers the standard flow: import from better-auth/plugins, add to your config, run migrations if the plugin touches the database, then wire up the client plugin. The main gotcha is keeping server and client plugins paired so your APIs stay in sync, and remembering that nextCookies needs to go last if you're using it. Solid reference material for the plugin ecosystem without having to context-switch to docs.
- skills.sh installs
- 362
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill better-auth-plugins --agent claude-codeInstalls into .claude/skills of the current project.
Files
Better Auth Plugins
Goals
- Add server plugins to extend auth features.
- Add client plugins for matching client methods.
- Apply schema changes when plugins add tables.
Quick start
- Import the plugin from
better-auth/pluginsand add it toplugins. - Run migrations (
generateormigrate) when required. - Add the client plugin from
better-auth/client/plugins.
Example: Two-factor authentication
import { betterAuth } from "better-auth";
import { twoFactor } from "better-auth/plugins";
export const auth = betterAuth({
plugins: [twoFactor()],
});
import { createAuthClient } from "better-auth/client";
import { twoFactorClient } from "better-auth/client/plugins";
export const authClient = createAuthClient({
plugins: [twoFactorClient({ twoFactorPage: "/two-factor" })],
});
Migration reminder
Run the CLI when a plugin adds tables:
npx @better-auth/cli generate
npx @better-auth/cli migrate
Guardrails
- Add server and client plugins together to keep APIs aligned.
- Keep
nextCookies(if used) last in the server plugin list. - Review plugin docs for required schema and env variables.
Sponsors
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Category
- Backend & APIs
- First seen
- Jun 3, 2026
More from bobmatnyc/claude-mpm-skills
All 158- Git Worktrees360
- Nextjs Core357
- Fastapi Local Dev356
- Vb Winforms356
- Headlessui355
- Jest Typescript354
- Vercel Networking Domains353
- Svelte352
- Sec Edgar Pipeline351
- Env Manager350
- Mongodb350
- Vb Core350
- Phoenix Api Channels348
- Digitalocean Containers Images347
- Hono Jsx347
- Langgraph346
- Pr Quality Checklist346
- Ecto Patterns345
- Vercel Observability345
- Media Transcoding344
- Clap341
- Phoenix Ops341
- Prisma Orm341
- Graphql340