Skip to content

auth-pimp

Active router for ALL authentication requests — classifies by use case (self-hosted sessions, hosted auth UI, Supabase-native, TypeScript-first) and routes to the correct auth skill. Use when implementing authentication, choosing auth providers, managing sessions, or handling OAuth flows.

ModelSource
sonnetpack: auth
Full Reference If the request involves authentication, authorization, sessions, OAuth, magic links, JWTs, sign-in/sign-up flows, user management, or role-based access in ANY way — you MUST route through this skill FIRST.

This is not optional. This is not negotiable. You cannot skip this.

The orchestration layer for all authentication expertise. Not documentation — an active router. Every auth request flows through this routing table before any response.

Mandatory Announcement — FIRST OUTPUT before anything else:

┏━ 🔐 auth-pimp ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ [one-line description of what request/routing] ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

No exceptions. Box frame first, then route.

The auth pack covers the full authentication spectrum — from self-hosted session management with Auth.js to fully hosted auth UI + organizations with Clerk to Supabase-native auth with magic links and Row Level Security to TypeScript-first full-control auth with Better Auth.

Classify the request. Invoke the matching skill. No response before invocation.

Request PatternSkill
Auth.js, NextAuth, OAuth providers, session strategy, callbacksauthjs
Clerk auth, Clerk organizations, user management UI, Clerk webhooksclerk
Supabase auth, magic links, Supabase RLS with auth, OAuth via Supabasesupabase-auth
Better Auth, better-auth, TypeScript auth, Drizzle auth adapterbetter-auth
”How do I add auth?” / “Which auth solution should I use?”Decision matrix → route
Social login only, no backend management neededDecision → authjs or clerk

When the user hasn’t specified an auth library, classify their use case:

SignalRoute To
Next.js + multiple OAuth providers (GitHub, Google, Discord)authjs
Needs hosted sign-in/sign-up UI + org/team managementclerk
Already using Supabase + wants magic links or RLSsupabase-auth
Full control over session strategy, no vendor lock-inauthjs or better-auth
TypeScript-first + Drizzle adapter + full session controlbetter-auth
Self-hosted auth with admin plugin and RBACbetter-auth
Non-technical client needs auth UI out of the boxclerk
”Which auth should I use?”Ask one question: using Supabase already?

Shortcut rules:

  • Next.js + multiple OAuth providers → Auth.js, no discussion
  • Hosted auth UI + organizations → Clerk, no discussion
  • Supabase project + magic links/RLS → Supabase Auth, no discussion
  • TypeScript-first + Drizzle adapter + full session control → Better Auth, no discussion
  • Open-source requirement or vendor lock-in concerns → Auth.js or Better Auth, no discussion

Before routing, check project context:

  • stack.json → read auth key if present (authjs, clerk, supabase-auth, better-auth)
  • package.json → detect next-auth, @clerk/nextjs, @clerk/clerk-sdk-node, @supabase/supabase-js already installed
  • auth.config.ts / auth.ts → Auth.js or Better Auth configuration present
  • package.json → detect better-auth installed
  • middleware.ts → check for clerkMiddleware or authMiddleware imports
  • .env.exampleAUTH_SECRET, CLERK_SECRET_KEY, or SUPABASE_SERVICE_ROLE_KEY hint at existing provider
StateAction
auth key in stack.jsonRoute to that solution directly
next-auth in depsRoute to authjs directly
@clerk/nextjs or @clerk/clerk-sdk-node in depsRoute to clerk directly
@supabase/supabase-js in deps + Supabase contextRoute to supabase-auth directly
better-auth in depsRoute to better-auth directly
betterAuth config in auth.tsRoute to better-auth directly
Nothing detectedApply decision matrix
User SaysChain
”Add GitHub OAuth to my Next.js app”authjs
”Set up auth with an org/team feature”clerk
”Add magic link sign-in to my Supabase app”supabase-auth
”Protect API routes with JWT validation”authjs (JWT sessions) or clerk (Clerk middleware)
“Add role-based access control”clerk (hosted RBAC) or supabase-auth (RLS policies)
“Migrate from Passport.js to modern auth”authjs
”Add social login with no backend work”clerk
”Restrict data by user in Postgres”supabase-auth (RLS)
“Set up auth with Drizzle and full control”better-auth
”Add admin panel with user management”better-auth (admin plugin) or clerk
  • Never respond about authentication/authorization before invoking the target skill
  • No summarizing, planning to invoke, or explaining what you’re about to do
  • If unclear, ask ONE clarifying question, then route
  • The skill’s content has the verified facts — always defer to it
  • “How do I add auth?” is decision matrix territory — NEVER jump to implementation