better-auth-add-plugin
Add a better-auth plugin to an existing project. Configures server and client plugins with proper imports.
Display Better Auth available authentication providers and their configuration
$ npx -y skills add secondsky/claude-skills --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/providersContext preview
What this command does when you run it.
Display Better Auth available authentication providers and their configuration
description: Display Better Auth available authentication providers and their configuration argument-hint: [provider_name]
Provide quick reference for Better Auth authentication providers.
1. **Specific provider** (e.g., `/better-auth:providers google`):
2. **No argument** (e.g., `/better-auth:providers`):
**Popular:**
**Social Media:**
**Developer Platforms:**
**Gaming & Streaming:**
**Communication:**
**Enterprise:**
**Other Providers:**
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
sendResetPassword: async ({ user, url, ctx }) => {
// Send password reset email
}
}import { magicLink } from "better-auth/plugins/magic-link"
plugins: [
magicLink({
sendMagicLink: async ({ email, url, ctx }) => {
// Send magic link email
}
})
]import { passkey } from "@better-auth/passkey"
plugins: [passkey()]For a specific provider (e.g., Google):
// Server config (auth.ts)
import { betterAuth } from "better-auth"
import { drizzleAdapter } from "better-auth/adapters/drizzle"
export const auth = betterAuth({
database: drizzleAdapter(db, { provider: "sqlite" }),
socialProviders: {
google: {
clientId: env.GOOGLE_CLIENT_ID,
clientSecret: env.GOOGLE_CLIENT_SECRET,
scope: ["openid", "email", "profile"] // Optional
}
}
})
// Client code
import { authClient } from "./auth-client"
await authClient.signIn.social({
provider: "google",
callbackURL: "/dashboard"
})# For each OAuth provider GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret GITHUB_CLIENT_ID=your_client_id GITHUB_CLIENT_SECRET=your_client_secret # ... repeat for each provider
https://yourdomain.com/api/auth/callback/{provider}Examples:
**Critical**: No trailing slash, exact match required in provider dashboard
1. **Create OAuth app** in provider dashboard 2. **Set redirect URI** to callback URL (exact match) 3. **Copy client ID and secret** to environment variables 4. **Configure scopes** (optional, use defaults) 5. **Add to socialProviders config** 6. **Test authentication flow**
**Google:**
**GitHub:**
**Microsoft:**
**Apple:**
**Discord:**
**Vercel (v1.4.3)**
vercel: {
clientId: env.VERCEL_CLIENT_ID,
clientSecret: env.VERCEL_CLIENT_SECRET
}**Kick (v1.4.6)** - with refresh tokens
kick: {
clientId: env.KICK_CLIENT_ID,
clientSecret: env.KICK_CLIENT_SECRET
}**Patreon (v1.4.8)**
patreon: {
clientId: env.PATREON_CLIENT_ID,
clientSecret: env.PATREON_CLIENT_SECRET,
scope: ["identity", "identity[email]", "campaigns"]
}If user is currently working on authentication code, offer to: 1. Generate complete integration code for selected provider 2. Create environment variable template 3. Set up OAuth callback route 4. Implement client-side sign-in component
145 production-ready skills for Claude Code CLI 🔌 Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).
Repo: secondsky/claude-skills
Add a better-auth plugin to an existing project. Configures server and client plugins with proper imports.
Interactive setup wizard for better-auth authentication. Guides through database, framework, OAuth providers, and plugin configuration.
Explain Better Auth error codes and provide solutions with code examples