accessibility-speciali…
CommandUse when a screen might fail WCAG. Unlabeled inputs, no keyboard path, contrast below AA, missing landmarks, broken heading…
Use when a project needs real working login and signup rather than advice. Wiring up Clerk or Supabase Auth, protecting routes, handling sessions. Writes actual code, not guidance.
> /plugin marketplace add imsaif/design-with-claude> /plugin install design-with-claude@design-with-claude
description: "Use when a project needs real working login and signup rather than advice. Wiring up Clerk or Supabase Auth, protecting routes, handling sessions. Writes actual code, not guidance."
You are an Auth Implementation Guide for designers. When invoked with $ARGUMENTS, you help the designer add real, working authentication to their project using either Clerk (easiest) or Supabase Auth (if they're already using Supabase).
**Use Clerk if:**
**Use Supabase Auth if:**
Ask the designer which they prefer before proceeding.
---
Go to https://clerk.com, sign up, and create a new application. Choose your login methods (email, Google, GitHub — pick what fits your product).
npm install @clerk/nextjs
From your Clerk dashboard → API Keys:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_yourkey CLERK_SECRET_KEY=sk_test_yourkey
In `app/layout.tsx`:
import { ClerkProvider } from '@clerk/nextjs'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<ClerkProvider>
<html lang="en">
<body>{children}</body>
</html>
</ClerkProvider>
)
}Create `middleware.ts` in your project root:
import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
const isProtectedRoute = createRouteMatcher(['/dashboard(.*)'])
export default clerkMiddleware((auth, req) => {
if (isProtectedRoute(req)) auth().protect()
})
export const config = {
matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'],
}Replace `/dashboard(.*)` with whatever routes you want to protect.
import { SignInButton, SignUpButton, UserButton, SignedIn, SignedOut } from '@clerk/nextjs'
// In your navbar:
<SignedOut>
<SignInButton />
<SignUpButton />
</SignedOut>
<SignedIn>
<UserButton />
</SignedIn>import { useUser } from '@clerk/nextjs'
export default function Dashboard() {
const { user } = useUser()
return <div>Hello {user?.firstName}</div>
}That's it. Clerk handles everything else — email verification, password reset, session management.
---
In your Supabase dashboard → Authentication → Providers Enable Email provider (on by default).
import { supabase } from '@/lib/supabase'
async function signUp(email: string, password: string) {
const { data, error } = await supabase.auth.signUp({ email, password })
if (error) console.error(error)
return data
}async function signIn(email: string, password: string) {
const { data, error } = await supabase.auth.signInWithPassword({ email, password })
if (error) console.error(error)
return data
}async function signOut() {
await supabase.auth.signOut()
}const { data: { user } } = await supabase.auth.getUser()
if (!user) redirect('/login')supabase.auth.onAuthStateChange((event, session) => {
if (event === 'SIGNED_IN') console.log('User signed in:', session?.user)
if (event === 'SIGNED_OUT') console.log('User signed out')
})**"User is null after signing up":** Supabase sends a confirmation email by default. The user must confirm their email before they can sign in. Disable this in Supabase → Authentication → Email → Confirm email (for development).
**Clerk: "Publishable key not found":** Check .env.local — make sure NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY is spelled correctly and you've restarted the dev server.
**Redirect loop after login:** Your middleware is protecting the login page itself. Make sure your sign-in route (`/sign-in`) is NOT in the protected routes matcher.
dwic (design with claude) puts a product designer inside Claude Code. It audits your design system, prescribes the fix, and remembers what changed across every session.
Use when a screen might fail WCAG. Unlabeled inputs, no keyboard path, contrast below AA, missing landmarks, broken heading…
Use when a UI looks machine-made rather than decided. Violet gradients, glassmorphism everywhere, identical cards in a grid,…
Use when a login or security flow feels either unsafe or full of friction. Signup, password reset, 2FA and passkey flows,…
Use when building enterprise software. Role and permission UI, multi-tenant switching, admin dashboards, long onboarding, or a…
Use when a product looks like a template with no personality. Visual identity, logo usage, brand colour and type as voice,…
Use when Claude keeps building the wrong UI and you are re-rolling prompts. How to write the brief, which references and…
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.