Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
bobmatnyc avatar

Better Auth Plugins

  • 245 installs
  • 63 repo stars
  • Updated July 18, 2026
  • bobmatnyc/claude-mpm-skills

Add Better Auth plugins for 2FA, organizations, passkeys, rate limits, and custom auth extensions in existing apps.

About

Documents how to select, configure, and extend Better Auth plugins on the server: multi-factor auth, organizations, passkeys, and custom hooks with correct schema updates and middleware ordering for SaaS backends.

  • Plugin registration order
  • Schema migrations for plugins
  • 2FA and passkey setup
  • Organization and RBAC plugins
  • Custom hook extensions

Better Auth Plugins by the numbers

  • 245 all-time installs (skills.sh)
  • Ranked #1,543 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 1, 2026 (Skillselion catalog sync)
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill better-auth-plugins

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs245
repo stars63
Last updatedJuly 18, 2026
Repositorybobmatnyc/claude-mpm-skills

What it does

Add Better Auth plugins for 2FA, organizations, passkeys, rate limits, and custom auth extensions in existing apps.

Files

SKILL.mdMarkdownGitHub ↗

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

1. Import the plugin from better-auth/plugins and add it to plugins. 2. Run migrations (generate or migrate) when required. 3. 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.

References

  • toolchains/platforms/auth/better-auth/better-auth-plugins/references/plugins-index.md

Related skills

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.